defchinese_to_arabic(cn:str) -> int: unit = 0# current ldig = [] # digest for cndig inreversed(cn): if cndig in CN_UNIT: unit = CN_UNIT.get(cndig) if unit == 10000or unit == 100000000: ldig.append(unit) unit = 1 else: dig = CN_NUM.get(cndig) if unit: dig *= unit unit = 0 ldig.append(dig) if unit == 10: ldig.append(10) val, tmp = 0, 0 for x inreversed(ldig): if x == 10000or x == 100000000: val += tmp * x tmp = 0 else: tmp += x val += tmp if(cn.startswith('拾')): val += 10 return val
sum = 0
for i inrange(1,1001): x = table.cell(i,0).value num = table.cell(i,2).value # print(x) ans = round(aoligeiganle(x),2) num = chinese_to_arabic(num) # print(ans,num) sum += num * ans sum = round(sum,2) # print(sum)
cmd='zbarimg --raw -Sbinary %s > %s' n = 351 for i inrange(0, n): fi = 'frames/frame-x%s%s.png' % (chr(i // 26 + 97), chr(i % 26 + 97)) fo = 'output/%d.txt' % i os.system(cmd%(fi,fo))
把所有输出拼起来可以得到一个 tar 文件,解压出一个 repo.tar.xz,再解压就得到了 flag。
0x10 狗狗银行
随便玩一玩发现银行是四舍五入计算利息的,那就让信用卡的利息<0.5,让储蓄卡的利息>0.5,即保持信用卡的欠钱数x满足$2000\leq x <2100$,同时每天储蓄卡的利息大于信用卡的利息+10,这样就可以不停地薅羊毛了,在用手点了三个小时后,用burp进行攻击,或者写脚本也行,当净资产>2000时,flag就有了
from Crypto.Util.number import * from gmpy2 import * n = 63844357941350242178319124095202481115953584192426618878732935935494834491816826661998861512314880163805697716449959448752976927112954730282916961050961825787515398914123651824294676790072133464576773845129309793573874518742295125788319117463509944821578109553336342869377806251535394443075383675560895153889 x = 123456789021893174903650635675814737536508951450414958364715686536861342396423579368274820142478176573615325936563821749809712758293516356473872587346576457823567826581305234356475896875325463576879854633145263786976543657098425637865432456789765432546786543245678908765432456789765432456789765435678976521453475438657563461373457638769787542657635251524736575462463535 y = 10846691131738259785471222827308910495801759515077645404110247868474133623116109646222365262033737854466441553160299139874151345544060555572980249336846733721387494114433499021384759103856864087154066511739947461316277184688508736656643351154950168083887079604212529291597732445055805912583815500222964765625 c = 41405348264834004155980231506987237741080939152961658436177953795358672013903237175367548103505970706334327307237110222977753966399211501368475417631358331375005030300076478586213047732879710803232046846520582624126685566892150989783694565081820869966206280829504485919835618809474126374909534966769989****** p = gcd(x+y,n) assert n % p == 0 q = n // p e = 65537 phi = (p-1) * (q-1) d = inverse(e,phi) m = pow(c,d,n) flag = long_to_bytes(m) print(flag)
defgetans(number): jz = 10 s = [] e = "114514" for c in e[:1]: s.append("~-" * (int(c)) + c) for c in e[1:]: s.append("-~" * (jz - int(c)) + c) ans = "" for i inrange(len(e)): digit = (number // (jz ** (len(e) - 1 - i))) % jz ans = "(" + ans + "*" + s[i] + ")"if i > 0else s[i] ans = "-~" * digit + ans return ans