Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Commit

Permalink
0.5.1 bump
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowbq committed Mar 4, 2018
1 parent 8f77115 commit 73cae77
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ratd/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.0"
__version__ = "0.5.1"
30 changes: 19 additions & 11 deletions ratd/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def sort_file(self):
# self.options.file_to_upload = sample_fullpath
# filename = os.path.basename(tmp_target)
#except AttributeError:

self.options.file_to_upload = self.src_path
filename = os.path.basename(self.src_path)
sample_fullpath = self.options.file_to_upload
Expand All @@ -288,10 +289,17 @@ def sort_file(self):
id(self.options)
))
sample = SampleSubmit(self.options)

severity = sample.rtnv
md5 = sample.rtv_md5

#Severity = 5 Known malicious
#..
#Severity = 1 Known Trusted
#Severity = 0 means unverified (no of engines provided any score within maximum execution time)
#Severity = -1 means GTI Clean
#Severity = -2 means failed (either sample execution got terminated or platform is not supported)
#Severity = -6 means incomplete (sample analysis is not completed)

try:
if self.options.dirtydir:
if severity >= int(self.options.severity):
Expand Down Expand Up @@ -651,16 +659,16 @@ def malware_name(self, selectors_tuple):
def pad_engine_values(self, selectors_tuple):

for engine in self.engine_names:
found = False
for ran_engine in selectors_tuple:
if engine == ran_engine["Engine"]:
found = True
if not found:
empty_engine = {}
empty_engine["Engine"] = engine
empty_engine["Severity"] = '0'
empty_engine["MalwareName"] = '---'
selectors_tuple.append(empty_engine)
found = False
for ran_engine in selectors_tuple:
if engine == ran_engine["Engine"]:
found = True
if not found:
empty_engine = {}
empty_engine["Engine"] = engine
empty_engine["Severity"] = '0'
empty_engine["MalwareName"] = '---'
selectors_tuple.append(empty_engine)
return selectors_tuple


Expand Down

0 comments on commit 73cae77

Please sign in to comment.