Tripcode decoder (696)

314 Name: Anonymous : 2007-10-22 06:21 ID:eY1W+jH6 [Del]

Horribly in-efficient and shitty code for seeing how many tripcodes per second your machine can push. Needs the shit optimizing out of it.

import re,string,crypt,time,math
def get_tripcode(pw):
pw = pw.encode('sjis', 'ignore') \
.replace('"', '"') \
.replace("'", '\'') \
.replace('<', '&lt;') \
.replace('>', '&gt;') \
.replace(',', ',')
salt = re.sub(r'[^\.-z]', '.', (pw + 'H..')[1:3])
salt = salt.translate(string.maketrans(r':;=?@[\]^_`', 'ABDFGabcdef'))
return crypt.crypt(pw, salt)[-10:]
def ts(): return int(time.time())
end = ts() + 60
i = p = 0
while ts() < end:
p = 0
end2 = ts()+1

while ts() < end2:
p=p+1
i=i+1
get_tripcode("string")
lol = "%d tc/s" % (p)
print(lol)
#print("\b") * len(lol)
print "%d tripcodes generated in 60 seconds\nAverage rate: %d tripcodes per second\n" % (i,int(math.ceil(i/60))) 

My comp is 0.9GhZ (lolol), and with this script I get around 1500 tc/s

This thread has been closed. You cannot post in this thread any longer.