¸®´ª½º

 3923, 8/197 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   indra
   http://indra.linuxstudy.pe.kr
   [re] make½Ã ¿À·ù

http://www.hackerschool.org/HS_Boards/zboard.php?id=QNA_linux&no=1847 [º¹»ç]


>sniffit¼³Ä¡ ÇÒ¶§ °è¼Ó ¿À·ù°¡ ¶ß³×¿ä.
>0.3.7º£Å¸ ¹öÀüÀº. confiure¸¦ ¸¶Ä¡°í make¸¦ ½ÇÇà½ÃÅ°¸é
>[root@localhost sniffit.0.3.7.beta]# make
>gcc -w -O2 -c  sn_packets.c -I./libpcap -L./libpcap -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DUSE_32_LONG_INT=1 -DLINUX=1
>In file included from sn_packets.c:6:
>sn_structs.h:70: error: two or more data types in declaration specifiers
>make: *** [sn_packets.o] ¿À·ù 1
>ÀÌ·¸°Ô ³ª¿À°í..

0.3.7-beta ¹öÀüÀ» ´Ù¿î·Îµå ¹Þ¾Æ¼­ ¼Ò½º¸¦ ºÃ½À´Ï´Ù.
sn_structs.h ÆÄÀÏÀÇ 70¹ø° ¶óÀο¡´Â ´ÙÀ½°ú °°ÀÌ µÇ¾î Àִµ¥¿ä..

_32_bit short source_port, destination_port;

sn_defines.h ÆÄÀÏÀÇ 7¹ø ¶óÀκÎÅÍ typedef·Î _32_bit ŸÀÔÀ» Á¤ÀÇÇÏ´Â ºÎºÐÀÌ ÀÖ½À´Ï´Ù.
ÀÌ ºÎºÐÀ» º¸¸é "unsigned long int" ³ª "unsigned int", "unsigned short" ·Î µÇ¾î ÀÖÀ¸¹Ç·Î,
"_32_bit short" ŸÀÔÀ̶õ°Ç, "unsigned long shot" or "unsigned long int short", "unsigned short short" ·Î
ÄÄÆÄÀÏ·¯¿¡¼­ ¹ø¿ªµÇ¹Ç·Î À߸øµÈ ŸÀÔÀ̶ó´Â °Ì´Ï´Ù.
±×·¡¼­ sn_structs.h ÆÄÀÏÀÇ 70¹ø° ¶óÀο¡¼­ "_32_bit" ´ë½Å "unsigned" ¸¦ ³ÖÀ¸¸é ÄÄÆÄÀÏ ÇÏ¸é µÉ °Ì´Ï´Ù.
(port ´Â 2¹ÙÀÌÆ®¸¦ »ç¿ëÇÏ´Â short·Î ÃæºÐÇÏ°í 0ºÎÅÍ ½ÃÀÛÇϹǷΠunsigned :)

>0.3.5 ¹öÀüÀº
>[root@localhost sniffit.0.3.5]# make
>gcc -w -O2 -c  sn_packets.c -I./libpcap-0.3 -L./libpcap-0.3 -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DLINUX=1
>gcc -w -O2 -c  sn_generation.c -I./libpcap-0.3 -L./libpcap-0.3 -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DLINUX=1
>gcc -w -O2 -c  sn_interface.c -I./libpcap-0.3 -L./libpcap-0.3 -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DLINUX=1
>gcc -w -O2 -c sn_cfgfile.c -I./libpcap-0.3 -L./libpcap-0.3 -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DLINUX=1
>gcc -w -O2 -c  sn_logfile.c -I./libpcap-0.3 -L./libpcap-0.3 -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DLINUX=1
>cd libpcap-0.3; make; cd ..
>make[1]: Entering directory `/root/Desktop/sniffit.0.3.5/libpcap-0.3'
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./pcap-linux.c
>./pcap-linux.c: In function ¡®pcap_read¡¯:
>./pcap-linux.c:70: warning: pointer targets in assignment differ in signedness
>./pcap-linux.c:81: warning: pointer targets in passing argument 6 of ¡®recvfrom¡¯ differ in signedness
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./pcap.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./inet.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./gencode.c
>./gencode.c:82: warning: function definition has qualified void return type
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./optimize.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./nametoaddr.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./etherent.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./savefile.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./bpf_filter.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./bpf_image.c
>flex -Ppcap_ -t scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c
>bison -y -p pcap_ -d grammar.y
>mv y.tab.c grammar.c
>mv y.tab.h tokdefs.h
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -c ./scanner.c
>gcc -O2 -I.  -Ilinux-include -DHAVE_MALLOC_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1  -Dyylval=pcap_lval -c
>grammar.c
>ar rc libpcap.a pcap-linux.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o
>bpf_image.o scanner.o grammar.o
>ranlib libpcap.a
>make[1]: Leaving directory `/root/Desktop/sniffit.0.3.5/libpcap-0.3'
>gcc -w -O2 -o sniffit sniffit.0.3.5.c sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o sn_logfile.o
>-I./libpcap-0.3 -L./libpcap-0.3 -lpcap -lncurses  -DHAVE_LIBNCURSES=1 -DHAVE_NCURSES_H=1 -DHAVE_SHMGET=1
>-DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DLINUX=1
>strip sniffit
>[root@localhost sniffit.0.3.5]# make install
>make: *** Ÿ°Ù `install'¸¦ ¸¸µé ±ÔÄ¢ÀÌ ¾øÀ½.  ¸ØÃã.
>ÀÌ·¸°Ô ³ª¿É´Ï´Ù.
>µµ´ëü ¾î´ÀºÎºÐ¿¡¼­ ¹®Á¦°¡ ÀÖ´ÂÁö Àß ¸ð¸£°Ú½À´Ï´Ù.
>´äº¯ ºÎŹµå¸³´Ï´Ù.
>
>

0.3.7-beta³ª, 0.3.5³ª MakefileÀ» ¿­¾îº¸¸é installÀº ¾ø½À´Ï´Ù.
make ´Â Makefile¿¡ Á¤ÀÇµÈ ´ë·Î ÄÄÆÄÀÏ ÇÕ´Ï´Ù.
ÄÄÆÄÀÏÀÌ ¿Ï·áµÇ¸é sniffit À̶ó´Â ÆÄÀÏÀÌ »ý±â´Âµ¥ ÀÌ°É ±×³É ´Ù¸¥µ¥ º¹»çÇؼ­ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.

  Hit : 4608     Date : 2006/03/03 12:02



    
3783   ftp ¶û telnetÀ̶û Â÷ÀÌÁ¡;[2]     Malcom
04/22 4680
3782     [re] ¸í·É¾î °ü·Ã Áú¹® ÀÔ´Ï´Ù. (bash)[1]     ¼ÒÀ¯
09/14 4678
3781   ³ëÆ®ºÏ¿¡ ¸®´ª½º (Æäµµ¶ó 15) & ¹éÆ®·¢ 5 R1 ¼³Ä¡ (À©7°ú µà¾ó ºÎÆÃ) °ü·Ã Áú¹®[3]     stiven13
08/29 4669
3780   backtrackÀ̶ó´Â ÇÁ·Î±×·¥[3]     gmr12
01/07 4663
3779   USBºÎÆÃÀÌ °¡´ÉÇÑÁö ºÒ°¡´ÉÇÑÁö ¾Ë¾Æº¸´Â¹æ¹ý?[1]     sjh2268
04/22 4653
3778     [re] ¾È³çÇϼ¼¿ä.. Áú¹®Çϳª¿ä~[1]     yl
09/05 4642
3777   Æäµµ¶óÄÚ¾î óÀ½¼³Ä¡Çϴµ¥ °ËÀºÈ­¸é[2]     son9180
02/21 4611
    [re] make½Ã ¿À·ù     indra
03/03 4607
3775   root¿¡¼­ »ç¿ëÀÚÃß°¡µÚ su·Î »ç¿ëÀÚÀüȯ¾È´ë¿ä[4]     hasbeen
07/21 4600
3774   VMware·Î Æäµµ¶ó 13 ¼³Ä¡Çߴµ¥ ÀÎÅͳÝÀÌ ¾ÈµË´Ï´Ù.[2]     hsoshin
10/06 4553
3773   VMware ¶óÀ̼¾½º Å°¸¦ ¹Þ¾Ò´Â´ë..[2]     kangcw98
04/20 4550
3772   ¸®´ª½º Çì´õÆÄÀÏ °æ·Î     daydreamss
01/20 4546
3771   Æäµµ¶ó13¿¡¼­ gcc¼³Ä¡Çϴµ¥ ¿À·ù°¡ ³ª¿©..[3]     mike1952
01/28 4521
3770   ¸®´ª½º ºÎÆÿ¡ °üÇÑ Áú¹®..     0bliss0
09/15 4517
3769   ¹éÆ®·¢ USBºÎÆÃÇÒ·Á¸é...[4]     personai
05/30 4514
3768     [re] Àú ÇãÁ¢Àε¥ ³Ê±×·´°Ô ´äº¯Á»....     ¼ÒÀ¯
09/12 4503
3767   Áú¹® ÀÔ´Ï´Ù .. ssh ´Â Á¤È®ÇÏ°Ô ¹«¾ùÀ» ¶æÇÏ´Â °Ì´Ï±î !!!![3]     JoyanG
10/09 4477
3766   Å©·¢ÀèÀ̳ª nutcrackÀ» ´Ù¿î¹ÞÀ»¼ö Àִ°÷..?     kijibe
09/09 4474
3765   ¹éÆ®·¢ ¹«¼± ·£Ä«µå     ¹éÆ®·¢
12/08 4472
3764   Æäµµ¶óÄÚ¾î 7¼³Ä¡°¡ ¾ÈµÇ³×¿ä... µµ¿òÁ»¿ä ¤Ð.¤Ð[2]     monkiforever
05/23 4457
[1][2][3][4][5][6][7] 8 [9][10]..[197]

Copyright 1999-2024 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org