/4chan.py Secret
Created
April 7, 2019 23:18
4chan tripcode bruteforcer. CPU-bound task perfect for benchmarking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys, re, string, crypt | |
def mktripcode(pw): | |
pw = pw.decode('utf_8', 'ignore') \ | |
.encode('shift_jis', 'ignore') \ | |
.replace('"', '"') \ | |
.replace("'", '') \ | |
.replace('<', '<') \ | |
.replace('>', '>') \ | |
.replace(',', ',') | |
salt = (pw + '...')[1:3] | |
salt = re.compile('[^\.-z]').sub('.', salt) | |
salt = salt.translate(string.maketrans(':;<=>?@[\\]^_`', 'ABCDEFGabcdef')) | |
trip = crypt.crypt(pw, salt)[-10:] | |
return trip | |
x=0 | |
y=0 | |
while 1==1: | |
if re.search('umooth',string.lower(mktripcode(str(x))))>-1: | |
print x | |
print '###########FOUND###########\n'+mktripcode(str(x))+'\n###########FOUND###########\n' | |
break | |
elif x==y: | |
print x | |
y=y+100000 | |
x=x+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment