一个简单的 Python 脚本,在您正常上网时在后台生成随机的 HTTP/DNS 流量噪音,使您的网络流量数据对销售而言价值降低,并增加模糊性。
已在 MacOS High Sierra、Ubuntu 16.04 和 Raspbian Stretch 上测试,兼容 Python 2.7 和 3.6。
这些说明将帮助您在本地计算机上获取项目副本并运行。
如果您尚未安装 requests,请使用 pip 安装:
pip install requests
克隆仓库
git clone https://github.com/1tayH/noisy.git
进入 noisy 目录
cd noisy
运行脚本
python noisy.py --config config.json
该程序可以接受多个命令行参数:
$ python noisy.py --help
usage: noisy.py [-h] [--log -l] --config -c [--timeout -t]
optional arguments:
-h, --help show this help message and exit
--log -l logging level
--config -c config file
--timeout -t for how long the crawler should be running, in seconds
只有配置文件参数是必需的。
$ docker run -it noisy --config config.json --log debug
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 4chan.org:80
DEBUG:urllib3.connectionpool:http://4chan.org:80 "GET / HTTP/1.1" 301 None
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): www.4chan.org:80
DEBUG:urllib3.connectionpool:http://www.4chan.org:80 "GET / HTTP/1.1" 200 None
DEBUG:root:found 92 links
INFO:root:Visiting http://boards.4chan.org/s4s/
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): boards.4chan.org:80
DEBUG:urllib3.connectionpool:http://boards.4chan.org:80 "GET /s4s/ HTTP/1.1" 200 None
INFO:root:Visiting http://boards.4chan.org/s4s/thread/6850193#p6850345
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): boards.4chan.org:80
DEBUG:urllib3.connectionpool:http://boards.4chan.org:80 "GET /s4s/thread/6850193 HTTP/1.1" 200 None
INFO:root:Visiting http://boards.4chan.org/o/
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): boards.4chan.org:80
DEBUG:urllib3.connectionpool:http://boards.4chan.org:80 "GET /o/ HTTP/1.1" 200 None
DEBUG:root:Hit a dead end, moving to the next root URL
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.reddit.com:443
DEBUG:urllib3.connectionpool:https://www.reddit.com:443 "GET / HTTP/1.1" 200 None
DEBUG:root:found 237 links
INFO:root:Visiting https://www.reddit.com/user/Saditon
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.reddit.com:443
DEBUG:urllib3.connectionpool:https://www.reddit.com:443 "GET /user/Saditon HTTP/1.1" 200 None
...
docker build -t noisy .
或者 如果您想在 Raspberry Pi(运行 Raspbian Stretch)上构建:
docker build -f Dockerfile.pi -t noisy .
docker run -it noisy --config config.json
examples 文件夹中提供了一些边缘案例的示例。您可以在此处阅读更多:examples/README.md。
另请参阅参与此项目的贡献者列表。
本项目采用 GNU GPLv3 许可证 - 详情请参阅 LICENSE.md 文件。
本项目受以下项目启发: