跳转至

巅峰极客RE_WP

巅峰极客_RE

Simple Base-N

Download binary

# python3
# encoding = utf-8

def get_index(char, table):
    table = list(table)
    for i in range(len(table)):
        if table[i] == char:
            return i
    return -1

def de_base32(encrypt, table):
    num = encrypt.count('=')
    encrypt.replace('=', '')
    result = ''
    for each in encrypt:
        result += ('00000' + bin(get_index(each, table)).replace('0b', ''))[-5:]
    result += '0' * (len(result) % 8)
    gugugu = ''
    for i in range(int(len(result) / 8)):
        gugugu+= chr(((int(result[i * 8:(i + 1) * 8], 2))))
    return gugugu


def rot13(input):
    input = list(input)
    result=''
    for i in range(len(input)):
        subs_a = ord(input[i])-ord('a')
        subs_A = ord(input[i]) - ord('A')
        if(subs_a <= 25 and subs_a >= 0):
            result+=chr((subs_a +13)%26+ ord('a'))
        elif (abs(subs_A) <= 25 and subs_A >= 0):
            result += chr((subs_A +13)%26+ ord('A'))
        else:
            result += input[i]
    return result

print(rot13(de_base32('weNTDk5LZsNRHk6cVogqTZmFy2NRP7X4ZHLTBZwg', 'NoPqRsTuVwXyZaBcDeFgHiJkLm567234')))

lucky number

xor 0x5a,0x5a是猜出来的

什么鬼题。。。没意思不做了