Skip to content

Instantly share code, notes, and snippets.

@zoogie
Created August 9, 2020 02:20
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 zoogie/42adb5eab6b7f813f569f5250f7c800f to your computer and use it in GitHub Desktop.
Save zoogie/42adb5eab6b7f813f569f5250f7c800f to your computer and use it in GitHub Desktop.
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