Skip to content

Instantly share code, notes, and snippets.

@InersIn
Created August 2, 2021 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save InersIn/15f1e39234ae664125706e965698899e to your computer and use it in GitHub Desktop.
Save InersIn/15f1e39234ae664125706e965698899e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
encflag="3333333733333332333333373333333433333336333633333333333733363332333333373333333233333333333333343333333633363335333333373333333333333336333633363333333633363334333333333333333333333335333633363333333333333331333333333333333533333335333633363333333633363334333333333333333433333336333633333333333633333339333333363333333333333336333333393333333633363336333333373333333530343239353238362185622901563106"
raw = [encflag[i:i+16] for i in range(0, len(encflag), 16)]
chars = [chr(x) for x in range(0x61, 0x7b)]
digits = [chr(x) for x in range(0x30, 0x3a)]
asci=chars+digits
flag=""
for x in raw:
if "33333337333333" in x:
n=int(x[-1])^16
if n>=len(chars):n-=len(chars)
flag+=chars[n-1]
elif "333333363336" in x:
n=(int(x[-1])-16)-2
flag+=chars[n]
elif "333333373336" in x:
flag+="{"
elif "333333333333" in x:
n=x[-1]
flag+=n
elif "333333353336" in x:
flag+="_"
elif "333333363333" in x:
n=int(x[-1])+16
n=(int(x[-1])-1)+n
if n>=len(chars): n-=len(chars)
flag+=chars[n+1]
else:
flag+=" "
print(flag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment