Python3监控linux服务器的http请求
监控v2-ray所在服务器HTTP请求
| 工具 | 版本 |
|---|---|
| linux的版本: | Debian 9 x86_64 |
| Python版本: | 3.6 |
| httpry | 0.1.8-1.el7 |
在linux上下载http监控工具httpry
yum install httpry

在linux上安装subprocess模块
pip3 install subprocess
subprocess官网
Python代码
import subprocess
order=‘httpry‘
pi= subprocess.Popen(order,shell=True,stdout=subprocess.PIPE)
while(1==1):
for i in iter(pi.stdout.readline,‘b‘):
print(i.decode(‘utf-8‘))说明:在jupyter中运行此代码,连接v2-ray去访问几个页面,然后多刷新几次,过一会jupyter会出现httpry的命令的输出。
输出的字符没有弄的很好看。下一步考虑将数据可视化。准备采用Django。可以关注我的github https://github.com/realwuxiong/httpry
相关推荐
chuckchen 2020-10-31
Dreamhome 2020-10-09
xirongxudlut 2020-09-28
星辰大海的路上 2020-09-13
chaochao 2020-08-31
猪猪侠喜欢躲猫猫 2020-08-17
快递小可 2020-08-16
shengge0 2020-07-26
巩庆奎 2020-07-21
张文倩数据库学生 2020-07-19
xirongxudlut 2020-07-18
Ericbig 2020-07-18
kyelu 2020-07-09
liangzhouqu 2020-07-07
GuoSir 2020-06-28
chaigang 2020-06-27
pythonxuexi 2020-06-25