mirror of
https://github.com/hanzoui/custom-nodes-security-scan.git
synced 2026-10-30 20:56:54 +00:00
15 lines
373 B
Python
15 lines
373 B
Python
import random
|
|
import string
|
|
|
|
def random_string(minimum, maximum=None):
|
|
if maximum is None:
|
|
maximum = minimum
|
|
|
|
count = random.randint(minimum, maximum)
|
|
return "".join(random.choice(string.ascii_letters) for x in xrange(count))
|
|
|
|
def random_integer(digits):
|
|
start = 10 ** (digits - 1)
|
|
end = (10 ** digits) - 1
|
|
return random.randint(start, end)
|