빅

ngrep 설치 및 사용하기

· 2012-04-24 (화) 18:48:00 · 4098
 # 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건
+
제목 글쓴이 날짜 조회
12-08-29 조회 4,202
12-08-07 조회 3,865
12-08-03 조회 3,671
12-07-31 조회 3,773
12-07-30 조회 3,721
12-07-16 조회 3,927
12-07-15 조회 3,760
12-07-07 조회 3,617
12-07-06 조회 3,817
12-07-03 조회 3,774
12-06-29 조회 3,405
12-06-22 조회 3,769
12-06-17 조회 4,035
12-05-21 조회 3,950
12-05-02 조회 3,470
12-05-02 조회 4,258
12-05-02 조회 3,381
12-04-30 조회 3,584
12-04-30 조회 3,263
12-03-17 조회 4,137
12-03-10 조회 3,460
12-03-08 조회 3,996
12-03-03 조회 3,700
12-02-27 조회 5,119
12-02-17 조회 4,416
12-02-16 조회 4,694
12-02-03 조회 3,353
12-01-31 조회 3,262
12-01-24 조회 3,261
12-01-17 조회 3,966
12-01-05 조회 3,512
11-12-30 조회 3,242
11-12-23 조회 4,793
11-12-08 조회 3,570
11-12-07 조회 4,523
11-11-27 조회 3,958
11-11-25 조회 4,283
11-11-23 조회 3,722
11-11-22 조회 3,580
11-11-09 조회 3,289
11-10-23 조회 3,229
11-10-19 조회 3,193
11-10-08 조회 2,869
11-10-04 조회 2,869
11-10-04 조회 5,328
11-09-01 조회 4,408
11-08-13 조회 2,582
11-08-06 조회 3,263
11-07-11 조회 3,658
11-06-27 조회 3,014
11-06-21 조회 2,684
11-06-13 조회 2,485
11-06-07 조회 2,498
11-05-26 조회 2,452
11-04-20 조회 2,784
11-03-21 조회 2,878
11-03-18 조회 2,576
11-03-11 조회 2,590
11-02-07 조회 2,425
11-01-18 조회 2,747
11-01-12 조회 2,466
11-01-06 조회 2,555
10-12-10 조회 2,815
10-12-09 조회 2,665
10-12-08 조회 5,095
10-11-29 조회 2,929
10-11-28 조회 2,836
10-11-28 조회 2,665
10-11-19 조회 2,864
10-11-04 조회 2,740
10-10-21 조회 2,462
10-10-19 조회 3,427
10-10-12 조회 2,745
10-10-07 조회 2,584
10-09-30 조회 3,544
10-09-17 조회 3,956
10-09-17 조회 3,892
10-05-31 조회 3,611
09-12-31 조회 3,743
09-07-23 조회 5,063
08-09-16 조회 3,266
08-09-06 조회 3,012
08-09-04 조회 3,435
08-08-16 조회 4,463
08-08-15 조회 3,329
08-08-14 조회 4,545
08-08-12 조회 4,010
08-07-23 조회 2,824
08-07-10 조회 3,781
08-07-04 조회 3,003
08-06-27 조회 7,640
08-06-19 조회 4,953
08-05-27 조회 5,565
08-05-25 조회 5,397
08-05-23 조회 3,472
08-05-23 조회 4,639
08-05-21 조회 4,988
08-05-20 조회 4,101
08-05-20 조회 3,326
08-04-18 조회 4,404