Skip to content

Commit

Permalink
修改bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fe1w0 committed Apr 21, 2021
1 parent b6179f8 commit 477dc9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ cd ScanWebShell
```

* 配置环境
* `php vld` 插件安装
http://pecl.php.net/package/vld
安装后`php -m`来确定是否安装
* `settings.py`
```bash
cp ScanWebShell/settings.example.py ScanWebShell/settings.py
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ redis==3.5.3
requests==2.25.1
toml==0.10.1
tornado==6.1
scikit-learn==0.24.1
urllib3==1.26.4
vine==5.0.0
wcwidth==0.2.5
Expand Down
2 changes: 1 addition & 1 deletion utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def load_php_opcode(phpfilename):
:return:
"""
try:
output = subprocess.check_output(['php.exe', '-dvld.active=1', '-dvld.execute=0', phpfilename], stderr=subprocess.STDOUT).decode()
output = subprocess.check_output(['php', '-dvld.active=1', '-dvld.execute=0', phpfilename], stderr=subprocess.STDOUT).decode()
tokens = re.findall(r'\s(\b[A-Z_]{2,}\b)\s', output) # {2,} 至少匹配两次,规避一开始三个错误的结果
t = " ".join(tokens)
return t
Expand Down

0 comments on commit 477dc9d

Please sign in to comment.