Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tools/fileinfo/detection/linkers/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ class Test_Watcom1(Test):

def test_pe_linker(self):
assert self.fileinfo.succeeded
self.assertTrue((self.fileinfo.output['tools'][1]['name'] == 'Watcom') or (self.fileinfo.output['tools'][3]['name'] == 'Watcom'))
linker_found = False
for tool in self.fileinfo.output['tools']:
if tool['name'] == 'Watcom':
linker_found = True
break
self.assertTrue(linker_found)
Binary file not shown.
13 changes: 13 additions & 0 deletions tools/fileinfo/detection/packers/ste@lth/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from regression_tests import *

class Test(Test):
settings = TestSettings(
tool='fileinfo',
input='sample.ex',
args='--json'
)

def test_correctly_analyzes_input_file(self):
self.assertTrue(self.fileinfo.succeeded)
self.assertEqual(self.fileinfo.output['tools'][1]['name'], 'Ste@lth')
self.assertEqual(self.fileinfo.output['tools'][1]['version'], '2.10')
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ def test_heuristic_works(self):
self.assertEqual(self.fileinfo.output['tools'][0]['heuristics'], True)
self.assertEqual(self.fileinfo.output['tools'][0]['name'], 'ProCrypt')

class TestRamnit(Test):
settings=TestSettings(
input='b9bf69972077eee9c68d9e6e1841ad662ea072e803f0e02261c7d06528ba15aa',
tool='fileinfo',
args='--json'
)

def test_heuristic_works(self):
assert self.fileinfo.succeeded
self.assertEqual(self.fileinfo.output['tools'][0]['heuristics'], True)
self.assertEqual(self.fileinfo.output['tools'][0]['name'], 'Ramnit')

class TestTSULoader(Test):
settings=TestSettings(
input='4cb6f3563107054610512dfedb951930d2bc799d478e51727fa9d77fe70415d1',
Expand Down