| net :: tcpdumplog. NET :: TCPDUMPLOG´Â PERL ¸ðµâÀÌ TCPDUMP / libpcap ³×Æ®¿öÅ© ÆÐŶ ·Î±× ÀбâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
net :: tcpdumplog. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Brendan Gregg
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~bdgregg/Net-SnoopLog-0.12/SnoopLog.pm
net :: tcpdumplog. ű×
net :: tcpdumplog. ¼³¸í
NET :: TCPDUMPLOG´Â PERL ¸ðµâ Àбâ TCPDUMP / libpcap ³×Æ®¿öÅ© ÆÐŶ ·Î±×ÀÔ´Ï´Ù. NET :: TCPDUMPLOG´Â PERL ¸ðµâ Àбâ TCPDUMP / libpcap ³×Æ®¿öÅ© ÆÐŶ ·Î±×ÀÔ´Ï´Ù. ±×°ÍÀº Perl ±¸Çö (ÀÎÅÍÆäÀ̽º°¡ ¾Æ´Ô)ÀÔ´Ï´Ù. SynopSisuse net :: tcpdumplog; $ log = net :: tcpdumplog-> new (); $ log-> read ( "/ tmp / out01"); @ indexes = $ log-> À妽º; foreach $ index (@indexes) {($ lenge_orig, $ length_incl, $ drops, $ secs, $ msecs) = $ log -> Çì´õ ($ index); $ data = $ log-> µ¥ÀÌÅÍ ($ index); #ÀÌ ¸ðµâÀº TCPDUMP ·Î±×¿¡¼ µ¥ÀÌÅÍ¿Í Çì´õ¸¦ ÀÐÀ» ¼ö ÀÖ½À´Ï´Ù (libpcap ·Î±× Çü½ÄÀ» »ç¿ëÇϽʽÿÀ) .methodsnew () »ý¼ºÀÚ¸¦ ¹ÝȯÇÏ°í, tcpdumplog object.new (ºñÆ®)ÀÌ ¿É¼Ç Àμö´Â ÇØ´ç ¹øÈ£ÀÇ ½Ã°£ ¼ÒÀÎÀ» °Á¦·Î Àд °ÍÀÔ´Ï´Ù. ºñÆ®ÀÇ. ¿¹ : »õ·Î¿î (32). ´Ù¸¥ OS¿¡¼ TCPDUMP¸¦ ó¸® ÇÒ ¶§ ÇÊ¿äÇÒ ¼ö ÀÖ½À´Ï´Ù .New (ºñÆ®, °Ç³Ê ¶Ù±â)ÀÌ µÎ ¹ø° ¿É¼Ç Àμö´Â ¸ðµç ·¹ÄÚµå Çì´õ¿¡ ´ëÇØ °Ç³Ê ¶Û ¹ÙÀÌÆ® ¼öÀÔ´Ï´Ù. "SUSE Linux 6.3"½ºÅ¸ÀÏ ·Î±× °¡ÀÌ ¼¼Æ®°¡ 4·Î ¼³Á¤µÇ¾î ÀÖÀ¸¸ç, else (Áö±Ý±îÁö)´Â 0.read (ÆÄÀÏ À̸§) memory.indexes ()¿¡ Ç¥½ÃµÈ TCPDUMP ÆÄÀÏÀ» TCPDUMP¿¡¼·Îµå ÇÑ ÆÐŶÀÇ À妽º ¹øÈ£ ¹è¿À» ¹ÝȯÇÕ´Ï´Ù. ÆÄÀÏ. 0.maxIndex ()¿¡¼ ½ÃÀÛÇÏ´Â À妽º´Â ¸¶Áö¸· À妽ºÀÇ ¼ö¸¦ ¹ÝȯÇÕ´Ï´Ù. À妽º ()º¸´Ù ´õ ¸¹Àº ¸Þ¸ð¸®°¡ È¿À²ÀûÀÔ´Ï´Ù. ÆÐŶ ¼ö¸¦ ¾òÀ¸·Á¸é 1À» Ãß°¡ÇϽʽÿÀ. 0.Header (À妽º)¿¡¼ ½ÃÀÛÇÏ´Â À妽º´Â Á¤¼ö À妽º ¹øÈ£¸¦ ÃëÇÏ°í ÆÐŶ Çì´õ¸¦ ¹ÝȯÇÕ´Ï´Ù. ÀÌ°ÍÀº ¿ø·¡ ÆÐŶÀÇ ±æÀÌ, ½ÇÁ¦·Î TCPDUMP ·Î±×¿¡ ½ÇÁ¦·Î Æ÷ÇÔ µÈ ±æÀÌ,ÀÌ ÆÐŶ¿¡¼ »èÁ¦ µÈ ¹ÙÀÌÆ® ¼ö, ÆÐŶ µµÂø ½Ã°£ (1 ¿ù 1 ÀÏ 1970 ³â ÀÌÈÄÀÇ ÆÐŶ µµÂø ½Ã°£), MicroSecondsData (À妽º)´Â Á¤¼ö À妽º ¹øÈ£¸¦ ÃëÇÏ¿© ¿ø½Ã ÆÐŶ µ¥ÀÌÅ͸¦ ¹ÝȯÇÕ´Ï´Ù. (ÀÌ°ÍÀº ÀϹÝÀûÀ¸·Î EtherNet / IP / TCP µ¥ÀÌÅÍÀÔ´Ï´Ù). ¹öÀü ()Àº "2.4".LinkType ()°¡ µÉ °ÍÀ¸·Î ¿¹»óµÇ´Â libpcap ·Î±× ¹öÀü, ÁÖ ¼ýÀÚ°¡ Æ÷ÇÔ µÈ ¹®ÀÚ¿À» ¹ÝȯÇÕ´Ï´Ù. () Packet Log.Accuracy ()¿¡ ´ëÇÑ ZoneOffsetÀ» ¹ÝȯÇÕ´Ï´Ù. Packet Log.DumPlength () ÆÐŶ ·Î±×ÀÇ Á¤È®µµ¸¦ ¹ÝȯÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
net :: tcpdumplog. °ü·Ã ¼ÒÇÁÆ®¿þ¾î