DASCTF Sept X 浙江工业大学秋季挑战赛 writeup

Posted 拾光丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DASCTF Sept X 浙江工业大学秋季挑战赛 writeup相关的知识,希望对你有一定的参考价值。

crypto-welcome 签到

已知n、m、c 求e,sage脚本

m = 73964803637492582853353338913523546944627084372081477892312545091623069227301
c = 21572244511100216966799370397791432119463715616349800194229377843045443048821
n = 2 ** 256
e=discrete_log(c,mod(m,n))
print(e)
#34852863801130149185238904762083023615101

misc-Girlfriend’s account

需要脚本把大写金额转数字,网上找的脚本改下:

import re
def aoligeiganle(amount):
    amount = amount.replace('\\r\\b','')
    amount = amount.strip()

    chinese_num = {'零': 0, '壹': 1, '贰': 2, '叁': 3, '肆': 4, '伍': 5, '陆': 6, '柒': 7, '捌': 8, '玖': 9}
    chinese_amount = {'分': 0.01, '角': 0.1, '元': 1, '拾': 10, '佰': 100, '仟': 1000, '圆': 1}
    amount_float = 0
    if '亿' in amount:
        yi = re.match(r'(.+)亿.*', amount).group(1)
        amount_yi = 0
        for i in chinese_amount:
            if i in yi:
                amount_yi += chinese_num[yi[yi.index(i) - 1]] * chinese_amount[i]
        if yi[-1] in chinese_num.keys():
            amount_yi += chinese_num[yi[-1]]
        amount_float += amount_yi * 100000000
        amount = re.sub(r'.+亿', '', amount, count=1)
    if '万' in amount:
        wan = re.match(r'(.+)万.*', amount).group(1)
        amount_wan = 0
        for i in chinese_amount:
            if i in wan:
                amount_wan += chinese_num[wan[wan.index(i) - 1]] * chinese_amount[i]
        if wan[-1] in chinese_num.keys():
            amount_wan += chinese_num[wan[-1]]
        amount_float += amount_wan * 10000
        amount = re.sub(r'.+万', '', amount, count=1)

    amount_yuan = 0
    for i in chinese_amount:
        if i in amount:
            if amount[amount.index(i) - 1] in chinese_num.keys():
                amount_yuan += chinese_num[amount[amount.index(i) - 1]] * chinese_amount[i]
    amount_float += amount_yuan

    return round(amount_float,2)

def getnum(bigg):
    big = bigg.replace('\\r\\b','')
    bigg = bigg.strip()
    chinese_num = {'零': 0, '壹': 1, '贰': 2, '叁': 3, '肆': 4, '伍': 5, '陆': 6, '柒': 7, '捌': 8, '玖': 9}
    return chinese_num[bigg]

a=aoligeiganle("肆佰陆拾柒元叁角肆分")
print(a)
f1=open('misc1.txt','rb')
f2=open('misc2.txt','rb')
sum=0
for i in range(5000):
    d1=f1.readline().decode()
    d2=f2.readline().decode()
    r1=aoligeiganle(d1)
    r2=getnum(d2)
    print(r1,r2,r1*r2)
    sum += r1*r2
print(sum)

re-ea5ycpp

brainfuck编码处理 具体执行步骤如下,分析后得到算法很简单 第一个字节加2 第二个+3…

>>>>>>>>>>>>>>>>>>>>>>>>++[<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>+++[<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>++++[<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>+++++[<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>++++++[<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>+++++++[<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>++++++++[<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>+++++++++[<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>++++++++++[<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>+++++++++++[<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<
>>>>>>>>>>>>>>++++++++++++[<<<<<<<<<<<<<<+>>>>>>>>>>>>>>-]<<<<<<<<<<<<<
>>>>>>>>>>>>>+++++++++++++[<<<<<<<<<<<<<+>>>>>>>>>>>>>-]<<<<<<<<<<<<
>>>>>>>>>>>>++++++++++++++[<<<<<<<<<<<<+>>>>>>>>>>>>-]<<<<<<<<<<<
>>>>>>>>>>>+++++++++++++++[<<<<<<<<<<<+>>>>>>>>>>>-]<<<<<<<<<<
>>>>>>>>>>++++++++++++++++[<<<<<<<<<<+>>>>>>>>>>-]<<<<<<<<<
>>>>>>>>>+++++++++++++++++[<<<<<<<<<+>>>>>>>>>-]<<<<<<<<
>>>>>>>>++++++++++++++++++[<<<<<<<<+>>>>>>>>-]<<<<<<<
>>>>>>>+++++++++++++++++++[<<<<<<<+>>>>>>>-]<<<<<<
>>>>>>++++++++++++++++++++[<<<<<<+>>>>>>-]<<<<<
>>>>>+++++++++++++++++++++[<<<<<+>>>>>-]<<<<
>>>>++++++++++++++++++++++[<<<<+>>>>-]<<<
>>>+++++++++++++++++++++++[<<<+>>>-]<<
>>++++++++++++++++++++++++[<<+>>-]<
>+++++++++++++++++++++++++[<+>-]

exp:

v15 = [ _ for _ in range(24)]
v15[0] = 0x68;
v15[1] = 0x6F;
v15[2] = 0x65;
v15[3] = 0x6C;
v15[4] = 0x81;
v15[5] = 0x69;
v15[6] = 0x7A;
v15[7] = 0x3D;
v15[8] = 0x3B;
v15[9] = 0x79;
v15[10DASCTF X CBCTF 2022九月挑战赛 Writeup

DASCTF X CBCTF 2022九月挑战赛 Writeup

DASCTF X GFCTF 2022十月挑战赛 WriteUp

DASCTF X GFCTF 2022十月挑战赛 Writeup

DASCTF X GFCTF 2022十月挑战赛 Writeup

2022DASCTF Apr X FATE 防疫挑战赛 Writeup