Skip to content

Commit 24b289a

Browse files
author
s4dhul4bs
committed
adds module for generating fuzzer payloads
1 parent 315805d commit 24b289a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

resources/vmnf_payloads.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import os
2+
import random
3+
import secrets
4+
from datetime import datetime
5+
from random import randint, choice
6+
import mimesis
7+
8+
9+
class VMNFPayloads:
10+
def __init__(self, **settings):
11+
'''VMNF Payloads'''
12+
13+
self.settings = settings
14+
self.patterns = settings['patterns']
15+
16+
def get_random_int(self):
17+
return randint(0,
18+
choice(range(datetime.now().minute + datetime.now().second + len(self.patterns) * choice(bytes(range(256))))))
19+
def get_random_unicode(self):
20+
return choice(''.join(tuple(chr(i) for i in range(32, 0x110000) if chr(i).isprintable())))
21+
def get_os_urandom(self):
22+
return os.urandom(choice(range(18)))
23+
def get_secure_random_string(self):
24+
return secrets.token_urlsafe(choice(range(33)))
25+
def get_random_float(self):
26+
return random.random()
27+
def get_random_credential(self):
28+
gen = mimesis.Generic(choice([loc for loc in mimesis.locales.LIST_OF_LOCALES]))
29+
return {'username':gen.person.username(),'password':gen.person.password()}

0 commit comments

Comments
 (0)