Skip to content

Commit

Permalink
time.sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
grayddq authored and grayddq committed May 5, 2019
1 parent f00dd2b commit 8eeda09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ def analysis_file(file):
try:
SCAN_TYPE = get_value('SCAN_TYPE')
DEBUG = get_value('DEBUG')
time.sleep(0.05)
if not os.path.exists(file): return ""
if os.path.isdir(file): return ""
if " " in file: return ""
Expand All @@ -267,14 +266,15 @@ def analysis_file(file):
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 ""
time.sleep(0.01)
for str in strings:
time.sleep(0.01)
mal = check_shell(str)
if mal:
if DEBUG: print(u'bash shell :%s' % mal)
return mal
# 完全扫描会带入恶意特征扫描
if SCAN_TYPE == 2:
time.sleep(0.01)
for malware in malware_infos:
if malware.replace('\n', '') in str:
if DEBUG: print(u'malware :%s' % malware)
Expand Down

0 comments on commit 8eeda09

Please sign in to comment.