Skip to content

Commit

Permalink
adds module for generating fuzzer payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
s4dhul4bs committed Dec 12, 2020
1 parent 315805d commit 24b289a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions resources/vmnf_payloads.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os
import random
import secrets
from datetime import datetime
from random import randint, choice
import mimesis


class VMNFPayloads:
def __init__(self, **settings):
'''VMNF Payloads'''

self.settings = settings
self.patterns = settings['patterns']

def get_random_int(self):
return randint(0,
choice(range(datetime.now().minute + datetime.now().second + len(self.patterns) * choice(bytes(range(256))))))
def get_random_unicode(self):
return choice(''.join(tuple(chr(i) for i in range(32, 0x110000) if chr(i).isprintable())))
def get_os_urandom(self):
return os.urandom(choice(range(18)))
def get_secure_random_string(self):
return secrets.token_urlsafe(choice(range(33)))
def get_random_float(self):
return random.random()
def get_random_credential(self):
gen = mimesis.Generic(choice([loc for loc in mimesis.locales.LIST_OF_LOCALES]))
return {'username':gen.person.username(),'password':gen.person.password()}

0 comments on commit 24b289a

Please sign in to comment.