Created
May 4, 2012 08:36
-
-
Save Bobbias/2593335 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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