[HNCTF 2022 Week1]超级签到
str2是
编写脚本
str2 = '{hello_world}'
print(str2.replace(chr(111),chr(48)))
#{hell0_w0rld}
[HNCTF 2022 Week1]贝斯是什么乐器啊?
enc为
码表为
脚本为
a = "NRQ@PAu;8j[+(R:2806.i"
flag = ""
for i in range(len(a)):
flag += chr(ord(a[i]) + i)
print(flag)
#NSSCTF{B@se64_HAHAHA}
[HNCTF 2022 Week1]X0r
编写脚本
arr = [0x3FE,0x3EB,0x3EB,0x3FB,0x3E4,0x3F6,0x3D3,0x3D0,0x388,0x3CA,0x3EF,0x389,0x3CB,0x3EF,0x3CB,0x388,0x3EF,0x3D5,0x3D9,0x3CB,0x3D1,0x3CD]
flag = ""
for i in range(len(arr)):
flag += chr((arr[i] - 900) ^ 0x34)
print(flag)
#NSSCTF{x0r_1s_s0_easy}
[HNCTF 2022 Week1]你知道什么是Py嘛?
s = str(input("please input your flag:"))
arr=[29, 0, 16, 23, 18, 61, 43, 41, 13, 28, 88, 94, 49, 110, 66, 44, 43, 28, 91, 108, 61, 7, 22, 7, 43, 51, 44, 46, 9, 18, 20, 6, 2, 24]
if(len(s)!=35 or s[0]!='N'):
print("error")
exit(0)
for i in range(1,len(s)):
if(ord(s[i-1])^ord(s[i])!=arr[i-1]):
print("error!")
exit(0)
print("right!")
编写脚本
print(ord('N'))
arr=[78, 29, 0, 16, 23, 18, 61, 43, 41, 13, 28, 88, 94, 49, 110, 66, 44, 43, 28, 91, 108, 61, 7, 22, 7, 43, 51, 44, 46, 9, 18, 20, 6, 2, 24]
flag = 'N'
for i in range(1,len(arr)):
flag += chr(ord(flag[i-1]) ^ arr[i])
print(flag)
#NSSCTF{Pyth0n_1s_th3_best_l@nguage}
[HNCTF 2022 Week1]CrackMe
关键是这个
如果Str1不等于Str2的话,就会弹出“ThisSerialSuck”,反之则会弹出Text
在这下断点,动调
名字CrackMe,Serial随便输
[HNCTF 2022 Week1]给阿姨倒一杯Jvav
Class文件
拖进jadx中
编写脚本
key = [180, 136, 137, 147, 191, 137, 147, 191, 148, 136, 133, 191, 134, 140, 129, 135, 191, 65]
result = ""
for i in key:
result += chr((i - 64) ^ 32)
print(result)
#This_is_the_flag_!
[HNCTF 2022 Week1]Little Endian
enc为
编写脚本(小端序要倒过来一下)
from Crypto.Util.number import *
enc = [0x51670536,0x5E4F102C,0x7E402211,0x7C71094B,0x7C553F1C,0x6F5A3816,]
flag = ""
for i in enc:
flag += long_to_bytes(i ^ 0x12345678).decode()[::-1]
print(flag, end='')
#NSSCTF{Littl3_Endiannnn}
标签:arr,HNCTF,Week1,print,flag,2022,WEEK1
From: https://www.cnblogs.com/kelec0ka/p/18050737