Added shell, python test programs for comparision (Ca)

This commit is contained in:
mrbesen 2017-05-20 21:22:08 +02:00
parent 37992dd2d4
commit d95f4dd71a
3 changed files with 28 additions and 1 deletions

View File

@ -11,11 +11,14 @@ Host defaults to "127.0.0.1" and port default to "5454".
ctl + c to stop ctl + c to stop
## Start a Server ## Start a Server
Warning: Server needs a HUGE amount of RAM!
``` ```
java -jar Server.jar [c:classname] [p:port] java -jar -Xmx 6G -Xms 1G Server.jar [c:classname] [p:port]
``` ```
classname default to "Test" and is the class thats loaded to generate Jobs. classname default to "Test" and is the class thats loaded to generate Jobs.
port defaults to "5454". port defaults to "5454".
to stop enter "stop" into the console. to stop enter "stop" into the console.
Force Stop: ctl + c Force Stop: ctl + c
crack.py and crack.sh need much ram.

10
crack.py Normal file
View File

@ -0,0 +1,10 @@
#!/bin/python
public=14012539
mod=4862802614
step = mod / 100
for j in range(0, 100):
print "Testing from", step*j, " to ", step*(j+1), " (", j, "%)"
for i in range(j*step, (j+1)*step):
if (( i * public ) % mod) == 1:
print i
break

14
crack.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
public="14012539"
mod="4862802614"
for i in `seq 1 $mod`
do
let out=( $i * $public ) % $mod
if [ $out == 1 ]
then
echo "$i true"
exit 0
else
echo "$i false"
fi
done