[BUUCTF]REVERSE解题记录 [watevrCTF 2019]Repyc

这个题并不难,就是看起来有点麻烦。

根据题目给的提示是py代码,反编译一下

#!/usr/bin/env python
# visit https://tool.lu/pyc/ for more information
佤 = 0
侰 = ~佤 * ~佤
俴 = 侰 + 侰

def 䯂(䵦):
    굴 = 佤
    굿 = 佤
    괠 = [
        佤] * 俴 ** (俴 * 俴)
    궓 = [
        佤] * 100
    괣 = []
    while 䵦[굴][佤] != '\xeb\x93\x83':
        굸 = 䵦[굴][佤].lower()
        亀 = 䵦[굴][侰:]
        if 굸 == '\xeb\x89\x83':
            괠[亀[佤]] = 괠[亀[侰]] + 괠[亀[俴]]
        elif 굸 == '\xeb\xa0\x80':
            괠[亀[佤]] = 괠[亀[侰]] ^ 괠[亀[俴]]
        elif 굸 == '\xeb\xa0\xb3':
            괠[亀[佤]] = 괠[亀[侰]] - 괠[亀[俴]]
        elif 굸 == '\xeb\x83\x83':
            괠[亀[佤]] = 괠[亀[侰]] * 괠[亀[俴]]
        elif 굸 == '\xeb\xa2\xaf':
            괠[亀[佤]] = 괠[亀[侰]] / 괠[亀[俴]]
        elif 굸 == '\xeb\xa5\x87':
            괠[亀[佤]] = 괠[亀[侰]] & 괠[亀[俴]]
        elif 굸 == '\xeb\xa7\xb3':
            괠[亀[佤]] = 괠[亀[侰]] | 괠[亀[俴]]
        elif 굸 == '\xea\xb4\xa1':
            괠[亀[佤]] = 괠[亀[佤]]
        elif 굸 == '\xeb\xab\x87':
            괠[亀[佤]] = 괠[亀[侰]]
        elif 굸 == '\xea\xbc\x96':
            괠[亀[佤]] = 亀[侰]
        elif 굸 == '\xeb\xab\xbb':
            궓[亀[佤]] = 괠[亀[侰]]
        elif 굸 == '\xeb\x94\x93':
            괠[亀[佤]] = 궓[亀[侰]]
        elif 굸 == '\xeb\x8c\x92':
            괠[亀[佤]] = 佤
        elif 굸 == '\xeb\xac\x87':
            궓[亀[佤]] = 佤
        elif 굸 == '\xeb\xac\x9f':
            괠[亀[佤]] = input(괠[亀[侰]])
        elif 굸 == '\xea\xbd\xba':
            궓[亀[佤]] = input(괠[亀[侰]])
        elif 굸 == '\xeb\x8f\xaf':
            print(괠[亀[佤]])
        elif 굸 == '\xeb\xad\x97':
            print(궓[亀[佤]])
        elif 굸 == '\xeb\xad\xbf':
            굴 = 괠[亀[佤]]
        elif 굸 == '\xeb\xae\x93':
            굴 = 궓[亀[佤]]
        elif 굸 == '\xeb\xae\xb3':
            굴 = 괣.pop()
        elif 굸 == '\xeb\xaf\x83' or 괠[亀[侰]] > 괠[亀[俴]]:
            굴 = 亀[佤]
            괣.append(굴)
            continue
        elif 굸 == '\xea\xbd\xb2':
            괠[7] = 佤
            for i in range(len(괠[亀[佤]])):
                if 괠[亀[佤]] != 괠[亀[侰]]:
                    괠[7] = 侰
                    굴 = 괠[亀[俴]]
                    괣.append(굴)
        elif 굸 == '\xea\xbe\xae':
            괢 = ''
            for i in range(len(괠[亀[佤]])):
                괢 += chr(ord(괠[亀[佤]][i]) ^ 괠[
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值