Skip to content

Instantly share code, notes, and snippets.

@CreateRemoteThread
Created April 15, 2018 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CreateRemoteThread/f2eb2ac31ffac7c20c3f4253ad4f429c to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/f2eb2ac31ffac7c20c3f4253ad4f429c to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import hashlib
import requests
import random
import string
import json
import sys
# f = open(sys.argv[1])
# data = [l.rstrip() for l in f.readlines()]
# f.close()
# currentSuffix = "rd"
def cpwpow(i):
while True:
rndstr = ''.join(random.choice("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890") for _ in range(10))
h = hashlib.sha256(i + rndstr).hexdigest()
if h.endswith("66666"):
return (rndstr,h)
def checkForSuffix(inchar):
(d,h) = cpwpow(inchar)
r = requests.get("http://web.midnightsunctf.se:8000/login/" + inchar + "/" + d)
print r.text
if "suffix" in r.text:
return r.text
print checkForSuffix(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment