-
Notifications
You must be signed in to change notification settings - Fork 0
/
capture.sh
57 lines (55 loc) · 1.33 KB
/
capture.sh
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
#!/bin/sh
case $1 in
net)
echo tshark -t ad -i eth5 net 172.16.1.0/24 -w LCS_172.16.1.0.pcap
tshark -t ad -i eth5 net 172.16.1.0/24 -w LCS_172.16.1.0.pcap
chown lcsapp.lcsapp LCS_172.16.1.0.pcap
mv LCS_172.16.1.0.pcap /home/lcsapp/
;;
signal)
echo tshark -t ad -i eth5 port 15490 -w signal.pcap
tshark -t ad -i eth5 port 15490 -w signal.pcap
chown lcsapp.lcsapp signal.pcap
mv signal.pcap /home/lcsapp/
;;
6681)
echo tshark -t ad -i eth5 port 6681
tshark -t ad -i eth5 port 6681
;;
6682)
echo tshark -t ad -i eth5 port 6682
tshark -t ad -i eth5 port 6682
;;
6683)
echo tshark -t ad -i eth5 port 6683
tshark -t ad -i eth5 port 6682
;;
send)
echo tshark -t ad -i eth5 port 38000
tshark -t ad -i eth5 port 38000
;;
host)
echo tshark -t ad -i eth5 host $2 -w capture.pcap
tshark -t ad -i eth5 host $2 -w LCS_$2.pcap
chown lcsapp.lcsapp LCS_$2.pcap
mv LCS_$2.pcap /home/lcsapp/
;;
svc)
echo tshark -t ad -i eth5 host $2 and port $3 -w LCS_$2_$3.pcap
tshark -t ad -i eth5 host $2 and port $3 -w LCS_$2_$3.pcap
chown lcsapp.lcsapp LCS_$2_$3.pcap
mv LCS_$2_$3.pcap /home/lcsapp/
;;
*)
echo "Usage $0 [signal|6681|6682|6683|host|svc]"
echo "signal : port 15490"
echo "6681 : 1:1 영상"
echo "6682 : 4:1 영상"
echo "6683 : 4:1 영상"
echo "send : 단말발신영상"
echo "host : 특정단말IP"
echo "svc : 특정단말IP+Port"
echo "net : 모든단말"
;;
esac
exit