You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Roman edited this page Feb 29, 2024
·
1 revision
The Binwalk API in 10 Lines of Code
importbinwalk# Equivalent to: 'binwalk --signature firmware1.bin firmware2.bin'.# Note the use of 'quiet=True' to suppress normal binwalk output.formoduleinbinwalk.scan('firmware1.bin',
'firmware2.bin',
signature=True,
quiet=True):
# binwalk.scan returns a module object for every executed# module; in this case, there should be only one, which is# the signature module.print ("%s Results:"%module.name)
# Each module has a list of result objects, describing# the results returned from the executed module.forresultinmodule.results:
print ("\t%s 0x%.8X %s"% (result.file.name,
result.offset,
result.description))