빅

ngrep 설치 및 사용하기

· 2012-04-24 (화) 18:48:00 · 4012
 # ngrep 설치
 
bunzip2 ngrep-1.43.tar.bz2
tar xvfp ngrep-1.43.tar
cd ngrep-1.43
* gcc 가 없다면 설치
yum -y install gcc
* pcap 
yum -y install libpcap-devel
./configure
make
 
 
# 사용방법
 
usage: ngrep <-hXViwqpevxlDtTRM> <-IO pcap_dump> <-n num> <-d dev> <-A num>
             <-s snaplen> <-S limitlen> <-W normal|byline|none> <-c cols>
             <-P char> <-F file> <match expression> <bpf filter>
   -h  is help/usage
   -V  is version information
   -q  is be quiet (don't print packet reception hash marks)
   -e  is show empty packets
   -i  is ignore case
   -v  is invert match
   -R  is don't do privilege revocation logic
   -x  is print in alternate hexdump format
   -X  is interpret match expression as hexadecimal
   -w  is word-regex (expression must match as a word)
   -p  is don't go into promiscuous mode
   -l  is make stdout line buffered
   -D  is replay pcap_dumps with their recorded time intervals
   -t  is print timestamp every time a packet is matched
   -T  is print delta timestamp every time a packet is matched
   -M  is don't do multi-line match (do single-line match instead)
   -I  is read packet stream from pcap format file pcap_dump
   -O  is dump matched packets in pcap format to pcap_dump
   -n  is look at only num packets
   -A  is dump num packets after a match
   -s  is set the bpf caplen
   -S  is set the limitlen on matched packets
   -W  is set the dump format (normal, byline, none)
   -c  is force the column width to the specified size
   -P  is set the non-printable display char to what is specified
   -F  is read the bpf filter from the specified file
   -d  is use specified device instead of the pcap default
 
 
./ngrep -t port 80
 
 
[root@www ngrep-1.43]# ./ngrep -t port 80
interface: eth0 (211.x.x.x/255.255.255.128)
filter: ip and ( port 80 )
####
T 2011/09/16 10:57:18.288304 x.x.x.x:50815 -> x.x.x.x:80 [AP]
  GET / HTTP/1.1..Accept: */*..Accept-Language: ko-KR..User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.1; chromeframe/13.0.782.220; SLCC2; .NET
   CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)..Accept-Encoding: gzip, deflate..Host: x.x.x.x.Connection: Keep-Alive....     
##
...중략
|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
16-06-03 조회 2,762
15-07-30 조회 3,282
15-06-08 조회 5,377
15-05-27 조회 4,275
15-01-08 조회 6,556
14-12-30 조회 5,233
14-10-10 조회 5,241
14-08-13 조회 6,217
14-08-11 조회 5,029
14-08-06 조회 6,369
14-03-19 조회 7,307
13-04-26 조회 9,482
12-12-15 조회 5,018
12-12-15 조회 7,252
12-12-11 조회 5,358
12-11-21 조회 5,845
12-10-11 조회 4,962
12-10-03 조회 4,648
12-09-20 조회 5,987
12-09-02 조회 4,135
12-08-29 조회 5,062
12-08-29 조회 3,968
12-08-24 조회 4,095
12-08-18 조회 4,340
12-08-17 조회 4,378
12-08-16 조회 3,631
12-08-06 조회 5,392
12-08-05 조회 4,666
12-08-03 조회 4,415
12-08-03 조회 4,564
12-07-29 조회 3,390
12-07-24 조회 3,994
12-07-22 조회 3,483
12-07-20 조회 4,179
12-07-19 조회 4,467
12-07-19 조회 3,816
12-07-19 조회 3,759
12-07-19 조회 5,439
12-07-19 조회 3,391
12-07-18 조회 4,944
12-07-15 조회 3,959
12-07-14 조회 3,683
12-07-12 조회 4,375
12-07-11 조회 3,668
12-07-11 조회 3,374
12-07-11 조회 3,334
12-07-10 조회 4,501
12-07-09 조회 3,226
12-07-09 조회 4,106
12-07-09 조회 4,512
12-07-08 조회 4,432
12-07-07 조회 5,372
12-07-06 조회 4,640
12-07-06 조회 3,895
12-07-06 조회 3,659
12-07-06 조회 3,664
12-07-02 조회 5,375
12-07-02 조회 4,079
12-06-29 조회 3,572
12-06-28 조회 4,142
12-06-26 조회 3,681
12-06-26 조회 4,804
12-06-21 조회 3,770
12-06-20 조회 4,461
12-06-20 조회 3,972
12-06-15 조회 4,457
12-06-15 조회 4,208
12-06-13 조회 7,228
12-06-05 조회 7,195
12-06-04 조회 3,804
12-06-03 조회 3,650
12-05-31 조회 3,651
12-05-28 조회 6,472
12-05-27 조회 3,724
12-05-25 조회 3,874
12-05-23 조회 4,144
12-05-21 조회 4,978
12-05-17 조회 3,938
12-05-17 조회 3,850
12-05-09 조회 3,883
12-05-07 조회 4,119
12-05-02 조회 4,383
12-05-01 조회 4,494
12-04-30 조회 3,293
12-04-30 조회 4,242
12-04-25 조회 4,313
12-04-25 조회 4,749
12-04-24 조회 3,723
12-04-24 조회 4,489
12-04-23 조회 3,508
12-04-20 조회 3,143
12-04-17 조회 5,337
12-04-16 조회 4,250
12-04-14 조회 3,543
12-04-14 조회 3,575
12-04-14 조회 3,638
12-04-13 조회 3,262
12-04-13 조회 4,451
12-04-13 조회 6,041
12-04-12 조회 3,202