Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
grayddq authored and grayddq committed May 6, 2019
1 parent bfe24b1 commit f52602f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/Webshell_Analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ def scan_web(self):
for webroot in self.webroot_list:
if not os.path.exists(webroot): continue
for file in gci(webroot):
if not os.path.exists(file): continue
if os.path.isdir(file): continue
if (os.path.getsize(file) == 0) or (
round(os.path.getsize(file) / float(1024 * 1024)) > 10): continue
fp = open(file, 'rb')
matches = self.yararule.match(data=fp.read())
if len(matches):
self.webshell_list.append(file)
try:
if not os.path.exists(file): continue
if os.path.isdir(file): continue
if (os.path.getsize(file) == 0) or (
round(os.path.getsize(file) / float(1024 * 1024)) > 10): continue
fp = open(file, 'rb')
matches = self.yararule.match(data=fp.read())
if len(matches):
self.webshell_list.append(file)
except:
continue

def init_scan(self):
suspicious, malice, skip = False, False, False
Expand Down

0 comments on commit f52602f

Please sign in to comment.