24.11.2016 Views

Not So Random

Not%20So%20Random%20-%20Exploiting%20Unsafe%20Random%20Number%20Generator%20Use

Not%20So%20Random%20-%20Exploiting%20Unsafe%20Random%20Number%20Generator%20Use

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

.NET System.<strong>Random</strong>()- Exploitation<br />

#!/usr/bin/python<br />

def token_decoder(token):<br />

characters =<br />

"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"<br />

raw = []<br />

for character in token:<br />

character_index = characters.index(character)<br />

raw.append(character_index)<br />

return raw<br />

if __name__ == '__main__':<br />

token = raw_input("[*] Please enter token to decode: ")<br />

decoded_token = token_decoder(token)<br />

for character in decoded_token:<br />

print(character)<br />

<strong>Not</strong> <strong>So</strong> <strong>Random</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!