initial commit
This commit is contained in:
35
源码/source/task-src/plain.py
Normal file
35
源码/source/task-src/plain.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# flag{9bc74ce3-a56d-467f-eb52-d5f3d8923c6f}
|
||||
|
||||
__humor_enter__()
|
||||
|
||||
try:
|
||||
from hashlib import sha256
|
||||
from functools import reduce
|
||||
|
||||
flag = input('Enter your flag: ')
|
||||
|
||||
group_1 = [
|
||||
int.from_bytes(flag[1::3].encode(), 'big') % 998244353 == 156881262,
|
||||
sha256(flag[-16:].encode()).hexdigest().endswith('dcf56476457880bf5b39b295416f267b7a636324baeae1fd'),
|
||||
reduce(lambda x, y: x ^ y, map(ord, flag)) == 2,
|
||||
]
|
||||
|
||||
if not all(group_1):
|
||||
print('Wrong')
|
||||
exit(1)
|
||||
|
||||
acc = 0
|
||||
for i in flag:
|
||||
i = ord(i) ^ 0x55
|
||||
acc |= i
|
||||
acc <<= (7 if i & 1 else 8)
|
||||
|
||||
if acc == 27473331342481820165679397757145329260017933200691317902624657196062576436414763023083043884214272:
|
||||
print('Right')
|
||||
else:
|
||||
print('Wrong')
|
||||
exit(1)
|
||||
|
||||
except:
|
||||
print('Stop reverse engineering me, enjoy your day :)')
|
||||
exit(1)
|
Reference in New Issue
Block a user