KMA TTV
Mấy nay tui lười viết wu quá, nhưng mà đại loại là khum clear đc web(6/10 chall) còn làm khá ngoo nữa nên viết sẽ bị chê cười. Đăng tạm 3 prog solve script. T định clear hết prog nhưng lười quá, mà thấy sú nữa, t biết code đ đâu :V
Prog1:
import json
from pwn import *
r = remote('103.162.14.116',14002)
try:
while(True):
print(r.recvline())
r.recvuntil(b"arr =")
s = r.recvline().decode()
print(s)
u = max(json.loads(s))
r.sendline(bytes(str(u),"utf-8"))
except:
print(r.recvline())
r.interactive()
# print(max( [35108217398665520798322916107816, 778190297752053830054479172279829, 433248835926907151366557863609100, 530511307645369300518075525954125, 319041740549641573432614280680049, 54889066684876542565651338313320, 555523546383080759680027939296310, 743500905362792400800205265076928, 568493246032607782686888251069529, 732813167047993901143508964202481, 92930712675954729981037442798251, 177375672003013472879297464327470, 105756479262370542244378182794382, 219269602160189831997167457183935, 436101924193701730249254744074107, 92068897443393232365650926665766, 263090731051333073868099052068863, 973543917558407085893969419700395, 206789386908260216521804981839217, 109009489491907477798876948657198, 304662661464882606830760640331305, 692654722807464722635879523055258, 988735232473551332892086970476328, 969589428790420106743861232056809, 146748377758182499865538639857629, 585151192922940523013305425890822, 44556358736595626681004473130917, 569640931840276641270086279860858, 172184087881776212991920199802735, 698686254890275360183394892685353, 529327223656394290521202317620195, 971863816829583195040694307961600, 686414327516198272574225613720544]))
Prog2:
# a[0] = 1
# a[1] = 1 + a[0] = 1 + 1 = 2
# a[2] = 2 * a[1] = 2 * 2 = 4
def genArtCode(n):
a=[1]
for i in range(1,n+1):
if(i%2==0):
addNum = i * a[i-1]
a.append(addNum)
else:
addNum = i + a[i-1]
a.append(addNum)
return a[n]
from pwn import *
r=remote("103.162.14.116",14005)
while (True):
try:
r.recvuntil(b"n = ")
s = r.recvline().decode()
p = genArtCode(int(s))
print(p)
r.sendline(bytes(str(p),"utf-8"))
except:
print(r.recvline())
Prog3:
def are_brackets_balanced(s):
stack = []
opening_brackets = {'(': ')'}
for ch in s:
if ch in opening_brackets:
stack.append(ch)
elif ch in opening_brackets.values():
if stack and opening_brackets[stack[-1]] == ch:
stack.pop()
else:
return False
return not stack
from pwn import *
r=remote("103.162.14.116",14003)
for i in range(1,200):
try:
Round = f"ROUND {i}: "
z = r.recvuntil(bytes(str(Round),"utf-8"))
print(z)
s = r.recvline().decode()
print(s)
if(are_brackets_balanced(s)):
r.send(b"yes")
else:
r.send(b"no")
except:
print(r.recvline())
#()(())()(())(()((((((((())((()(())()))))(()((()(())(()()(()((())(()()())))()()(((())))(()(())))()((((()))())))()(((()()())((())))(()(()))(()))())((())())))()()()())((())())(()(()((((()((())(()))(((())))))))))))))
buff trafic thôi, blog chết r
Trả lờiXóa