Gotowe i sprawdzone

This commit is contained in:
Michal Pelc 2017-12-13 22:59:01 +01:00
parent 89644280d9
commit aca3ec3aab
3 changed files with 56 additions and 2 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/.idea
/__pycache__

46
output.txt Normal file
View File

@ -0,0 +1,46 @@
73078080: zolw=9885e397171a2a zajac=a0be0181996db5
73078081: zolw=c32ca93b8f717c zajac=258dfb0c692955
73078082: zolw=e4c737d547b18c zajac=9e9e64c78414f8
73078083: zolw=a462adf91fefa7 zajac=40b8c92e43a3e8
73078084: zolw=47f214c8893de7 zajac=88d43500863251
73078085: zolw=26f9d910aca52d zajac=44da455a8adadb
73078086: zolw=0881b858cf6696 zajac=a5fa6ac10dad25
73078087: zolw=bbf04739627079 zajac=f0788bed5086f3
73078088: zolw=269329b95bd0d0 zajac=728a413a54f43d
73078089: zolw=48ae5ff881b8ba zajac=7b9476f626aab1
73078090: zolw=033b0b85fb81ae zajac=47f457f06b4703
73078091: zolw=40de856bd97494 zajac=9790ec5daad165
73078092: zolw=8d433398de4844 zajac=a33122aeabdd21
73078093: zolw=a5f725d9f12cf2 zajac=c0b4e44bdaf4e9
73078094: zolw=62e88c4c8b431c zajac=c79487322a9243
73078095: zolw=ae2f2e7d011cbb zajac=6155404a2e8c4f
73078096: zolw=cb4c912e1804ad zajac=c6ef1d91a543ac
73078097: zolw=dbcd13c5215e67 zajac=187374ed232ae7
73078098: zolw=dad1cdd260bd09 zajac=0cccbaa531275e
73078099: zolw=94155fd7b75b79 zajac=b8de9b7aa38961
73078100: zolw=031b38e7bad343 zajac=c32ca93b8f717c
73078101: zolw=af98169a7f465d zajac=a462adf91fefa7
73078102: zolw=66a24326ca25c1 zajac=26f9d910aca52d
73078103: zolw=0c5fabe2397848 zajac=bbf04739627079
73078104: zolw=60742a2198bbd1 zajac=48ae5ff881b8ba
73078105: zolw=1adac9d8d51272 zajac=40de856bd97494
73078106: zolw=69494b68ef2005 zajac=a5f725d9f12cf2
73078107: zolw=bdfd86acbb88ee zajac=ae2f2e7d011cbb
73078108: zolw=12af1ead7132bc zajac=dbcd13c5215e67
73078109: zolw=124d7906a95da7 zajac=94155fd7b75b79
73078110: zolw=a1735f55f95b59 zajac=af98169a7f465d
73078111: zolw=2264efeba6918d zajac=0c5fabe2397848
73078112: zolw=1afa6b6714e778 zajac=1adac9d8d51272
73078113: zolw=35c294416c0c4a zajac=bdfd86acbb88ee
73078114: zolw=93b4535a4e16cd zajac=124d7906a95da7
73078115: zolw=6471f2384ce22a zajac=2264efeba6918d
73078116: zolw=0e77815306d2dd zajac=35c294416c0c4a
73078117: zolw=e2a30b83dc3929 zajac=6471f2384ce22a
73078118: zolw=b4cc7a7e58c03a zajac=e2a30b83dc3929
73078119: zolw=3899755b1af2c2 zajac=3899755b1af2c2
Zajac jest na polu 6980c34e85e36d a byl na 0a80e36faaf522
Zolw jest na polu 6980c34e85e36d a byl na e45a157f48e428
Dlugosc cyklu: 24359373; Pierwsze wystapienie cyklu 48899032
Hash ciagow: e45a157f48e428, 0a80e36faaf522 to 6980c34e85e36d
Poczatek: 2017-12-13 20:27:21.927965 Koniec: 2017-12-13 22:51:31.854712
(b'\xe4Z\x15\x7fH\xe4(', b'\n\x80\xe3o\xaa\xf5"')

View File

@ -2,10 +2,13 @@
from hashlib import md5
from binascii import hexlify
import datetime
renmich_1 = 'renmich1123376350383621786626'.encode();
renmich_2 = 'renmich3700873222361195459231'.encode();
my_input = 'rabanbar'.encode();
def rmhash(input,n=1):
tmp = input;
for i in range(n):
@ -13,13 +16,15 @@ def rmhash(input,n=1):
x.update(tmp);
y = md5();
y.update(x.digest())
tmp = y.digest()[1:7]
tmp = y.digest()[:7]
return tmp;
def to_string(b):
return hexlify(b).decode();
def find_colision(input):
begin_time = datetime.datetime.now()
tortoise=input;
hare=input;
i=0;
@ -63,4 +68,6 @@ def find_colision(input):
print("Hash ciagow: {}, {} to {}".format(to_string(collision_a),to_string(collision_b),to_string(rmhash(collision_a))))
print("Poczatek: {} Koniec: {}".format(begin_time,datetime.datetime.now()))
return(collision_a,collision_b);