Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanyMonk authored and epinna committed Jun 14, 2023
1 parent 46322a2 commit 49639d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ def setUpModule():
class TestGenerators(TestCase):

def test_generators(self):

for i in range(0, 100):
for i in range(0, 200):
self._randomize_bd()
obfuscated = generate(self.password.decode('utf-8'))
obfuscated = generate(self.password.decode('utf-8'), self.obfuscator)
save_generated(obfuscated, self.path)

self.channel = Channel(
Expand All @@ -52,10 +51,11 @@ def _incremental_requests(
self.channel.send(
'echo("%s");' %
payload.decode('utf-8'))[0],
payload)
payload, f'Obfuscator failed: {self.obfuscator}')

@classmethod
def _randomize_bd(cls):
cls.obfuscator = 'obfusc1_php' if random.randint(0, 100) > 50 else 'phar'
cls.password = utils.strings.randstr(10)
password_hash = hashlib.md5(cls.password).hexdigest().lower()
filename = '%s_%s.php' % (
Expand Down

0 comments on commit 49639d4

Please sign in to comment.