Skip to content

Instantly share code, notes, and snippets.

@rofl0r

rofl0r/4chan.py Secret

Created April 7, 2019 23:18
4chan tripcode bruteforcer. CPU-bound task perfect for benchmarking
#!/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('<', '&lt;') \
.replace('>', '&gt;') \
.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