-
Notifications
You must be signed in to change notification settings - Fork 14
/
README.md
104 lines (69 loc) · 1.7 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#sniffer
sniffer capture http packet in gopacket(libpcap).
The sniffer project captures packets through pcap and parses the http protocol.
The fetched results will be stored in the database.
He also provides a webserver interface to view packet capture results.
# install libpcap
for ubuntu/debian:
sudo aptitude install libcap-dev
for centos/redhat/fedora:
sudo yum install libpcap-devel
#depend
```
go get github.com/asmcos/requests
```
# make
```
make
```
# run
```
nohup ./sniffer -i eth0 &
```
#Support Config Json file
sniffer.json
```
{
"name": "sniffer",
"device": "en0",
"port":80
}
```
# Save data to webserver
The sniffer can store data to a remote server or not save the data.
You can submit data through serverurl.
How to config serverurl?
```
vim sniffer.json
"serverurl":"http://127.0.0.1:1337/", //Save data to server
"serverurl":"" //Don't save data
```
How to build data server ?
```
See https://github.com/asmcos/AIDatas
```
# capture example:
```
192.168.10.110->175.27.0.201:54893->80
extshort.weixin.qq.com
POST /mmtls/1d70cf00 HTTP/1.1
Connection :[close]
Content-Length :[542]
Content-Type :[application/octet-stream]
Upgrade :[mmtls]
User-Agent :[MicroMessenger Client]
Accept :[*/*]
Cache-Control :[no-cache]
175.27.0.201->192.168.10.110:80->54893
HTTP/1.1 200 OK
Content-Type :[application/octet-stream]
Content-Length :[229]
```
# View results through webserver
```
http://zhanluejia.net.cn:8080/httpdata/
```
![image](http://www.zhanluejia.net.cn/static/uploads/8f74446537e233fb2af932355cd927f0.png)
![image](http://www.zhanluejia.net.cn/static/uploads/f5ef64bf4874bd2103945975a1db5d4a.png)
# Use AIDatas and sniffer for linkage
https://note.youdao.com/s/BdhDLrwb