Skip to content

Instantly share code, notes, and snippets.

@zoogie
Created August 9, 2020 02:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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