mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-02 14:56:10 -04:00
crypto modules
This commit is contained in:
parent
f211c1cbab
commit
5fcb5a5cb9
28 changed files with 122 additions and 7 deletions
|
@ -0,0 +1,24 @@
|
|||
'''
|
||||
from asis 2013
|
||||
'''
|
||||
|
||||
from itertools import permutations
|
||||
from hashlib import sha256
|
||||
|
||||
def test(s):
|
||||
e = '9f2a579716af14400c9ba1de8682ca52c17b3ed4235ea17ac12ae78ca24876ef'
|
||||
return sha256('ASIS_' + s).hexdigest() == e
|
||||
|
||||
m = '3c6a1c371b381c943065864b95ae5546'
|
||||
s = '12456789x'
|
||||
for p in permutations(s):
|
||||
def f(sub, c):
|
||||
if c in sub:
|
||||
return sub[c]
|
||||
else:
|
||||
return c
|
||||
sub = {c : d for c, d in zip(s, p)}
|
||||
z = ''.join(f(sub, c) for c in m)
|
||||
if test(z):
|
||||
print z
|
||||
break
|
Loading…
Add table
Add a link
Reference in a new issue