Skip to content

Commit ea333c4

Browse files
grayddqgrayddq
authored andcommitted
filter_path
1 parent a7cbbfd commit ea333c4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

lib/Backdoor_Analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def get_malware_info(self):
256256
with open(malware_path + file) as f:
257257
for line in f:
258258
malware = line.strip().replace('\n', '')
259-
if len(malware) > 4 and ('.' in malware):
259+
if len(malware) > 5 and ('.' in malware) and not ("\\" in malware):
260260
if malware[0] != '#' and ('.' in malware): self.malware_infos.append(malware)
261261
except:
262262
return

lib/File_Analysis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def get_malware_info(self):
118118
with open(malware_path + file) as f:
119119
for line in f:
120120
malware = line.strip().replace('\n', '')
121-
if len(malware) > 4 and ('.' in malware):
121+
if len(malware) > 5 and ('.' in malware) and not ("\\" in malware):
122122
if malware[0] != '#' and ('.' in malware): self.malware_infos.append(malware)
123123
except:
124124
return
@@ -143,6 +143,7 @@ def analysis_file(self, file):
143143
if os.path.isdir(file): return ""
144144
if " " in file: return ""
145145
if 'GScan' in file: return ""
146+
if '.log' in file: return ""
146147
if (os.path.getsize(file) == 0) or (round(os.path.getsize(file) / float(1024 * 1024)) > 10): return ""
147148
strings = os.popen("strings %s" % file).readlines()
148149
if len(strings) > 200: return ""

lib/Proc_Analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_malware_info(self):
3737
with open(malware_path + file) as f:
3838
for line in f:
3939
malware = line.strip().replace('\n', '')
40-
if len(malware) > 4 and ('.' in malware):
40+
if len(malware) > 5 and ('.' in malware) and not ("\\" in malware):
4141
if malware[0] != '#' and ('.' in malware): self.malware_infos.append(malware)
4242
except:
4343
return

0 commit comments

Comments
 (0)