Skip to content

Instantly share code, notes, and snippets.

@Bobbias
Created May 4, 2012 08:36
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 Bobbias/2593335 to your computer and use it in GitHub Desktop.
Save Bobbias/2593335 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import numpy as np
import re
import string
from bitstring import BitStream, BitArray
in_file = open("dump2.bin", "r")
file_bytes = bytearray(in_file.read())
i = 0
b = 0
for byte in file_bytes:
if i == 0:
b=0
b=byte*256
i+=1
print "i==0 "
print int(byte)
if i == 1:
b+=byte
i-=1
print "i==1 "
print int(byte)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment