Skip to content

A python script and class that exploits the deterministic nature of java.util.Random() for two simple cases.

Notifications You must be signed in to change notification settings

zaphoxx/NotSoRandom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

# NotSoRandom

A python script and class that exploits the deterministic nature of java.util.Random() for two simple cases.

The script/class is based on java.util.Random algorithms and values. For other packages you would have to adjust the MULT / ADD / MASK values manually. Depending on the algorithms used additional manual changes would be necessary.

Case 1: a long (64bit) rnd number is known. NotSoRandom() allows to calculate the seed and either previous and next long rnd values based on the found seed.
Case 2: two sequentially calculated rnd int numbers are known. NotSoRandom() allows to calculate the seed and either previous and next int rnd values based on the found seed.

An example script 'get_previous_long.py' is provided that illustrates the usage of class NotSoRandom.

About

A python script and class that exploits the deterministic nature of java.util.Random() for two simple cases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages