Created
February 4, 2018 16:30
-
-
Save ahmed-bhs/90e2e89414f6f0d68242497717c2dc83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import qrtools | |
import re,os | |
def decode_qr(r,i): | |
img="http://35.184.20.243:8002/qrweb/"+r[10:22] | |
os.system("curl "+img+" >> code"+str(i)+".png") | |
qr = qrtools.QR() | |
qr.decode("code"+str(i)+".png") | |
return qr.data | |
url = 'http://35.184.20.243:8002/qrweb/index.php' | |
print "Sending answers... (this challenge takes some time...)" | |
s = requests.Session() | |
r=s.get(url) | |
for i in range(1,11): | |
q=decode_qr(r.text,i) | |
s.post('http://35.184.20.243:8002/qrweb/validate.php', data={"qr": q}) | |
r=s.get(url) | |
print(r.text) | |
print(q) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment