Skip to content

Instantly share code, notes, and snippets.

@eddiez9
Created December 28, 2022 04:48
  • Star 1 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?
Parses putty NAND dump log for information we care about
with open('dump.log') as file:
save = False
for line in file:
# Do we save this line?
if line.isspace():
continue
elif ("------------------ block: 1117" in line):
save = False
continue
elif ("------------------ block:" in line):
save = True
continue
elif ("----------- spare area for block" in line):
save = False
continue
elif ("*** command status = 1" in line):
break
# Checking if we should save this line
if save == True:
print(line, end="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment