Skip to content

Commit

Permalink
filter_path
Browse files Browse the repository at this point in the history
  • Loading branch information
grayddq authored and grayddq committed Apr 25, 2019
1 parent a7cbbfd commit ea333c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Backdoor_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def get_malware_info(self):
with open(malware_path + file) as f:
for line in f:
malware = line.strip().replace('\n', '')
if len(malware) > 4 and ('.' in malware):
if len(malware) > 5 and ('.' in malware) and not ("\\" in malware):
if malware[0] != '#' and ('.' in malware): self.malware_infos.append(malware)
except:
return
Expand Down
3 changes: 2 additions & 1 deletion lib/File_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_malware_info(self):
with open(malware_path + file) as f:
for line in f:
malware = line.strip().replace('\n', '')
if len(malware) > 4 and ('.' in malware):
if len(malware) > 5 and ('.' in malware) and not ("\\" in malware):
if malware[0] != '#' and ('.' in malware): self.malware_infos.append(malware)
except:
return
Expand All @@ -143,6 +143,7 @@ def analysis_file(self, file):
if os.path.isdir(file): return ""
if " " in file: return ""
if 'GScan' in file: return ""
if '.log' in file: return ""
if (os.path.getsize(file) == 0) or (round(os.path.getsize(file) / float(1024 * 1024)) > 10): return ""
strings = os.popen("strings %s" % file).readlines()
if len(strings) > 200: return ""
Expand Down
2 changes: 1 addition & 1 deletion lib/Proc_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_malware_info(self):
with open(malware_path + file) as f:
for line in f:
malware = line.strip().replace('\n', '')
if len(malware) > 4 and ('.' in malware):
if len(malware) > 5 and ('.' in malware) and not ("\\" in malware):
if malware[0] != '#' and ('.' in malware): self.malware_infos.append(malware)
except:
return
Expand Down

0 comments on commit ea333c4

Please sign in to comment.