Skip to content

Commit f52602f

Browse files
grayddqgrayddq
authored andcommitted
bug
1 parent bfe24b1 commit f52602f

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

lib/Webshell_Analysis.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,17 @@ def scan_web(self):
4949
for webroot in self.webroot_list:
5050
if not os.path.exists(webroot): continue
5151
for file in gci(webroot):
52-
if not os.path.exists(file): continue
53-
if os.path.isdir(file): continue
54-
if (os.path.getsize(file) == 0) or (
55-
round(os.path.getsize(file) / float(1024 * 1024)) > 10): continue
56-
fp = open(file, 'rb')
57-
matches = self.yararule.match(data=fp.read())
58-
if len(matches):
59-
self.webshell_list.append(file)
52+
try:
53+
if not os.path.exists(file): continue
54+
if os.path.isdir(file): continue
55+
if (os.path.getsize(file) == 0) or (
56+
round(os.path.getsize(file) / float(1024 * 1024)) > 10): continue
57+
fp = open(file, 'rb')
58+
matches = self.yararule.match(data=fp.read())
59+
if len(matches):
60+
self.webshell_list.append(file)
61+
except:
62+
continue
6063

6164
def init_scan(self):
6265
suspicious, malice, skip = False, False, False

0 commit comments

Comments
 (0)