| 1 | #!/usr/bin/env python |
| 2 | |
| 3 | import sys |
| 4 | import binwalk |
| 5 | |
| 6 | try: |
| 7 | # Perform a signature scan against the files specified on the command line |
| 8 | # and suppress the usual binwalk output. |
| 9 | for module in binwalk.scan(*sys.argv[1:], signature=True, quiet=True): |
| 10 | print ("%s Results:" % module.name) |
| 11 | |
| 12 | for result in module.results: |
| 13 | print ("\t%s 0x%.8X %s [%s]" % (result.file.name, |
| 14 | result.offset, |
| 15 | result.description, |
| 16 | str(result.valid))) |
| 17 | except binwalk.ModuleException as e: |
| 18 | pass |