Skip to content

Commit

Permalink
Merge pull request #49 from avast/improvement-aspack-detection
Browse files Browse the repository at this point in the history
Add tests for newly recognised versions of ASPack.
  • Loading branch information
s3rvac authored Apr 16, 2020
2 parents 04e69c1 + 0410904 commit 7138723
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Binary file added tools/fileinfo/detection/packers/aspack/asp_uv_09
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions tools/fileinfo/detection/packers/aspack/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,23 @@ class Test(Test):
def test_correctly_analyzes_input_file(self):
assert self.fileinfo.succeeded
assert self.fileinfo.output.contains(r'.*ASPack \(2\.12\)*')

class TestASPack(Test):
settings = TestSettings(
tool='fileinfo',
input=[
'asp_uv_09',
'asp_uv_10',
'asp_uv_11',
],
args='--json'
)

def test_correctly_analyzes_input_file(self):
aspack_recognised = False

self.assertTrue(self.fileinfo.succeeded)
for tool in self.fileinfo.output['tools']:
if tool['type'] == 'packer' and tool['name'] == 'ASPack':
aspack_recognised = True
self.assertTrue(aspack_recognised)

0 comments on commit 7138723

Please sign in to comment.