forked from ReFirmLabs/binwalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
:0B00000048656C6C6F20576F726C64D9 | ||
:00000001FF |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
S3100000000048656C6C6F20576F726C64D3 | ||
S5030001FB |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from os.path import dirname | ||
|
||
import binwalk | ||
from nose.tools import eq_, ok_ | ||
|
||
|
||
def test_hello_world_simple_scan(): | ||
''' | ||
Test: Open hello-world.ihex, scan for signatures | ||
verify that only one signature is returned | ||
verify that the only signature returned is Intel HEX data-signature | ||
''' | ||
scan_result = binwalk.scan( | ||
dirname(__file__) + '/input-vectors/hello-world.ihex', | ||
signature=True, | ||
quiet=True, | ||
extract=True) # Throws a warning for missing external extractor | ||
# Test number of modules used | ||
eq_(len(scan_result), 1) | ||
# Test number of results for that module | ||
eq_(len(scan_result[0].results), 1) | ||
# Test result-description | ||
eq_(scan_result[0].results[0].description, | ||
'Intel HEX data, record type: data') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from os.path import dirname | ||
|
||
import binwalk | ||
from nose.tools import eq_, ok_ | ||
|
||
|
||
def test_hello_world_simple_scan(): | ||
''' | ||
Test: Open hello-world.srec, scan for signatures | ||
verify that only one signature is returned | ||
verify that the only signature returned is Motorola S-rec data-signature | ||
''' | ||
scan_result = binwalk.scan( | ||
dirname(__file__) + '/input-vectors/hello-world.srec', | ||
signature=True, | ||
quiet=True, | ||
extract=True) # Throws a warning for missing external extractor | ||
# Test number of modules used | ||
eq_(len(scan_result), 1) | ||
# Test number of results for that module | ||
eq_(len(scan_result[0].results), 1) | ||
# Test result-description | ||
eq_(scan_result[0].results[0].description, | ||
'Motorola S-Record; binary data in text format, record type: data (32-bit)') |