mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: introduce $GetRandom20CharAlNum
This commit is contained in:
parent
ff0b05ea20
commit
8f32887a1a
1 changed files with 8 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
:global EscapeForRegEx;
|
||||
:global FlushEmailQueue;
|
||||
:global GetMacVendor;
|
||||
:global GetRandom20CharAlNum;
|
||||
:global GetRandom20CharHex;
|
||||
:global GetRandomNumber;
|
||||
:global HexToNum;
|
||||
|
@ -400,6 +401,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
# generate random 20 chars alphabetical (A-Z & a-z) and numerical (0-9)
|
||||
:set GetRandom20CharAlNum do={
|
||||
:global EitherOr;
|
||||
|
||||
:return [ :rndstr length=[ $EitherOr [ :tonum $1 ] 20 ] from="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ];
|
||||
}
|
||||
|
||||
# generate random 20 chars hex (0-9 and a-f)
|
||||
:set GetRandom20CharHex do={
|
||||
:global EitherOr;
|
||||
|
|
Loading…
Reference in a new issue