Skip to content

Instantly share code, notes, and snippets.

@zoogie

zoogie/unescape.py Secret

Created Aug 9, 2020
Embed
What would you like to do?
import os,sys,struct
st=u"\ub150\u0027"
c=0
ls=0
ms=0
out=""
for i in st:
if c & 1:
ms=ord(i)<<16
out+="0x%08X," % (ms | ls)
else:
ls=ord(i)
c+=1
if not c & 0x1f:
out+="\n"
with open("dump.txt","w") as f:
f.write(out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment