Skip to content

Commit 24df957

Browse files
committed
xxx.so subprocess call example
1 parent 7d44f7b commit 24df957

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ crawlergo 目前支持以下特性:
2626
**安装使用之前,请仔细阅读并确认[免责声明](./Disclaimer.md)**
2727

2828
1. crawlergo 只依赖或chrome运行即可,前往[下载](https://www.chromium.org/getting-involved/download-chromium)新版本的chromium,或者直接[点击下载Linux79版本](https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/706915/chrome-linux.zip)
29-
3029
2. 前往[页面下载](https://github.com/0Kee-Team/crawlergo/releases)最新版本的crawlergo解压到任意目录,如果是linux或者macOS系统,请赋予crawlergo**可执行权限(+x)**
3130

31+
> 如果你使用linux系统,运行时chrome提示缺少一些依赖组件,请看下方 Trouble Shooting
32+
3233
## Quick Start
3334

3435
### Go!
@@ -128,6 +129,26 @@ crawlergo 返回了全量的请求和URL信息,可以有多种使用方法:
128129
* 'Fetch.enable' wasn't found
129130

130131
Fetch是新版chrome支持的功能,如果出现此错误,说明你的版本较低,请升级chrome到最新版即可。
132+
133+
* chrome运行提示缺少 xxx.so 等依赖
134+
135+
```shell
136+
// Ubuntu
137+
apt-get install -yq --no-install-recommends \
138+
libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
139+
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
140+
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
141+
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3
142+
143+
// CentOS 7
144+
sudo yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 \
145+
libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 \
146+
ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc -y
147+
148+
sudo yum update nss -y
149+
```
150+
151+
131152

132153
## Follow me
133154

examples/subprocess_call.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/python3
2+
# coding: utf-8
3+
4+
import simplejson
5+
import subprocess
6+
7+
8+
def main():
9+
target = "http://testphp.vulnweb.com/"
10+
cmd = ["./crawlergo_cmd", "-c", "/tmp/chrome-linux/chrome", "-o", "json", target]
11+
rsp = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
12+
output, error = rsp.communicate()
13+
14+
result = simplejson.loads(output.decode().split("--[Mission Complete]--")[1])
15+
req_list = result["req_list"]
16+
print(req_list[0])
17+
18+
19+
if __name__ == '__main__':
20+
main()

0 commit comments

Comments
 (0)