Skip to content

Instantly share code, notes, and snippets.

@richardlehane
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save richardlehane/f71a0e8f15c99c805ec4 to your computer and use it in GitHub Desktop.

Select an option

Save richardlehane/f71a0e8f15c99c805ec4 to your computer and use it in GitHub Desktop.
sig = "10 00 00 00 'Word.Document.' ['6'-'7'] 00"
l = sig.split("'")
ns = ""
for i in range(len(l)):
if i % 2 != 0:
ns += "".join([hex(ord(x))[2:] for x in l[i]])
else:
ns += l[i]
print ns
@richardlehane

Copy link
Copy Markdown
Author

Hmm may need to hex() that ord() on reflection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment