´ÙÀ½Àº ¹ÌÄ£°Ô½ÃÆÇ 3.01 (¹«·á¼Ò½º) ¼³Ä¡¹æ¹ýÀÔ´Ï´Ù. - Çö ¼¹ö¿¡¼ ¼³Ä¡ÇÏ´Â ¹æ¹ýÀÇ ¿¹¸¦ º¸À̵µ·Ï ÇÏ°Ú½À´Ï´Ù.
Áï À¯´Ð½º ¶Ç´Â ¸®·è½º ¼¹ö¿¡¼ ¼³Ä¡ÇÏ´Â °úÁ¤ÀÔ´Ï´Ù. 1.
¼Ò½º¸¦ ´Ù¿î ¹Þ½À´Ï´Ù. - ¿·¿¡ cgi ¸Þ´º º¸ÀÌÁÒ? °Å±â °¡¸é crazywwwboard-3.01
¼Ò½º°¡ ÀÖ½À´Ï´Ù. ±×°É ¹ÞÀ¸¼¼¿ä. 2. ´Ù¿î¹ÞÀº°É
°èÁ¤¿¡ ¿Ã¸³´Ï´Ù. ftp¸¦ ÀÌ¿ëÇؼ ¿Ã¸®´Â°Ô Á¦ÀÏ ÆíÇÏ°ÚÁÒ? ¾îµð´Ù ¿Ã¸®½ÃµçÁö »ó°ü¾ø½À´Ï´Ù. ¾îÂ¥ÇÇ
¾ÐÃàÀ» Ç®¾î¼ ÀνºÅç Çϴϱñ »ó°ü¾ø½À´Ï´Ù. ¿©±â¼´Â ÀÚ½ÅÀÇ °èÁ¤ÀÇ cgi-bin µð·ºÅ丮 ¾Æ·¡ ¿Ã·È´Ù°í °¡Á¤ÇÕ´Ï´Ù.
3. telnet Á¢¼ÓÀ» Çؾ߰ÙÁÒ?
4. Á¢¼ÓÀ» Çßµå¸é ¾Æ±î ÈÀÏ ¿Ã¸°´ë·Î À̵¿ÇÕ´Ï´Ù.
#cd cgi-bin 5. ÈÀÏÀÌ ÀÖ³ª °Ë»çÇÕ´Ï´Ù.
#ls
CrazyWWWBoard-3_0_1_tar.Z 6. ¾ÐÃàµÇ¾î
ÀÖÀ¸¹Ç·Î ¾ÐÃàÀ» DZ´Ï´Ù. ¸í·É¾î´Â ´ÙÀ½°ú °°À½
#gzip -d CrazyWWWBoard-3_0_1_tar.Z 7.
¾î¶»°Ô µÇ¾ú³ª È®ÀÎÇغ¾½Ã´Ù.
#ls
CrazyWWWBoard-3_0_1_tar 8. tar¸¦ Ç®±â
À§ÇØ ÈÀϸíÀ» ¹Ù²ß´Ï´Ù.
#mv CrazyWWWBoard-3_0_1_tar CBW3.tar 9.
È®ÀÎÇϸé
#ls
CWB3.tar 10. tar¸¦ ÇØÁ¦ÇսôÙ.
#tar -xvf CWB3.tar
ÈÀÏÀÌ Á¸£¸£ Ç®¸³´Ï´Ù. 11. È®ÀÎÇغ¾½Ã´Ù
#ls
wwwboard-3.0.1/ 12. µð·ºÅ丮À̸§À» °£´ÜÇÏ°Ô
º¯°æÇսô٠- ³Ê¹« ±æÀݽÀ´Ï±î?
#mv wwwboard-3.0.1 bulletin 13. È®ÀÎ
#ls
bulletin 14. µð·ºÅ丮 ¾ÈÀ¸·Î µé¾î°©½Ã´Ù.
#cd bulletin 15. ÇöÀç°æ·Î¸íÀº ´ÙÀ½°ú °°ÁÒ?
/ÀÚ½ÅÀÇ °èÁ¤°æ·Î¸í/cgi-bin/bulletin 16. ¹«½¼ÆÄÀÏÀÌ
ÀÖ´ÂÁö È®ÀÎÇغ¾½Ã´Ù.
#ls -al
total 27
drwxr-xr-x 10 15 60
1024
Jan 8 1998 ./
drwx--x--x 9 root root 1024
Dec 8 15:24 ../
-rw-r--r-- 1 15 60
12443
Jan 8 1998 CrazyWWWBoard.conf
-rwxr-xr-x 1 15 60
615
Nov 19 1997 Install-sh*
lrwxrwxrwx 1 root root 19
Dec 8 15:20 README.english -> message
/help-en.txt
lrwxrwxrwx 1 root root 19
Dec 8 15:20 README.japanese -> messag
e/help-jp.txt
lrwxrwxrwx 1 root root 19
Dec 8 15:20 README.korean -> message/
help-kr.txt
drwxr-xr-x 2 15 60
1024
Nov 19 1997 conf/
drwxr-xr-x 2 15 60
1024
Nov 19 1997 data/
drwxr-xr-x 2 15 60
2048
Nov 19 1997 gdbm-1.7.3/
drwxr-xr-x 3 15 60
1024
Nov 19 1997 icon/
drwxr-xr-x 2 15 60
1024
Nov 19 1997 logs/
drwxr-xr-x 2 15 60
1024
Nov 19 1997 message/
drwxr-xr-x 2 15 60
1024
Nov 19 1997 qDecoder-4.0.1/
-rwxr-xr-x 1 15 60
465
Nov 19 1997 removeDB*
drwxr-xr-x 2 15 60
1024
Nov 19 1997 src/ 17.
ÀÌÁ¦ ÀνºÅçÀ» ½ÃÀÛÇսôÙ.
#./Install-sh
ÀÚ ÀÌÁ¦ ÀνºÅçµÇ´Â °ÍÀ» º¾½Ã´Ù. Àá±ñ ÈÀå½Ç¿¡ ´ó°Ü¿À½ÃµçÁö ±¸°æÇϽõçÁö Çϼ¼¿ä - Àü ÁÖ·Î ÀÌ·²¶§ ´ã¹è¸¦
ÇÉ´ä´Ï´Ù.^^ 18. ¿¶ó ¸Õ°¡¸¦ ÁøÇàÇÕ´Ï´Ù.
- ÇÏÁö¸¸ °á°ú´Â ¿¡·¯Åõ¼ºÀÌÀÔ´Ï´Ù. 19. ÁøÇà°úÁ¤À» Àá½Ã
»ìÆ캾½Ã´Ù.
#./Install-sh
¾î¼±¸ Àú¼±¸...
µù±îµù±î?......
¼¼¼¼¼¼..........
¾ä¾ä¾ä..........
...
(Áß°£»ý·«)
...
gcc -Wall -c
-o cwb_delete.o cwb_delete.c
gcc -Wall -o
CrazyWWWBoard.cgi cwb.o cwb_db.o cwb_admin.o cwb_list.o
cw
b_read.o cwb_write.o cwb_delete.o qDecoder.a libgdbm.a
cwb_admin.o: In function `check_password':
cwb_admin.o(.text+0x6f): undefined reference to `crypt'
cwb_admin.o(.text+0x1c7): undefined reference to `crypt'
cwb_admin.o: In function `admin_form':
cwb_admin.o(.text+0x53d): undefined reference to `crypt'
cwb_admin.o: In function `cwb_adminsave':
cwb_admin.o(.text+0x1ca3): undefined reference to `crypt'
cwb_write.o: In function `write_form':
cwb_write.o(.text+0x526): undefined reference to `crypt'
cwb_write.o(.text+0xf0f): more undefined references to `crypt'
follow
make: *** [CrazyWWWBoard.cgi] Error 1
---- Step 4. Compiling createDB
gcc -Wall -c
-o createDB.o createDB.c
gcc -Wall -o
createDB createDB.o cwb_db.o qDecoder.a libgdbm.a
---- Step 5. Installation...
cp: CrazyWWWBoard.cgi: ±×·± ÆÄÀÏÀ̳ª µð·ºÅ丮°¡ ¾øÀ½
---- Installation Complete... 19.
½ºÅÜ4À§¸¦ º¸¸é crypt ¾î¼±¸ Àú¼±¸ ÇÕ´Ï´Ù.
À̺κÐÀÇ ¿¡·¯¸¦ Àâ¾Æº¾½Ã´Ù. 20. ls Çϸé srcÀ̶õ
µð·ºÅ丮°¡ ³ª¿É´Ï´Ù. ±× ¾ÈÀ¸·Î µé¾î°©½Ã´Ù.
#cd src 21. ls Çϸé Makefile À̶õ
ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù. - ÀÚ ÀÌÁ¦ ¿©±â¸¦ ¼öÁ¤ÇսôÙ. ¿ì¼± vi ¸í·É¾î¸¦ ÀÌ¿ëÇؼ ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇϸé
¿¡µðÆà ÇÒ ¼ö ÀÖ½À´Ï´Ù.(´Ù ¾È´Ù±¸¿ä? ¾Ë¸é ¸»±¸)
#vi Makefile
########################################
##
## CrazyWWWBoard.cgi Makefile
##
## Designed by Seung-young, Kim
##
## [Hongik Shinan Network Security]
##
########################################
##
## Define
##
PRGNAME = CrazyWWWBoard
CGINAME = $(PRGNAME).cgi
CC = gcc -Wall #
For GNU C Compiler(gcc)
#CC = cc #
For the other C Compiler
LIB = qDecoder.a libgdbm.a
OBJ = $(OBJ1) $(OBJ2)
OBJ1 = cwb.o cwb_db.o cwb_admin.o
OBJ = $(OBJ1) $(OBJ2)
OBJ1 = cwb.o cwb_db.o cwb_admin.o
OBJ2 = cwb_list.o cwb_read.o cwb_write.o cwb_delete.o
##
## Main
##
all: $(CGINAME) createDB
reall: clean all
##
## CrazyWWWBoard.cgi
## $(CGINAME): $(OBJ)
$(CC) -o $(CGINAME)
$(OBJ) $(LIB)
##
## createDB
##
createDB: createDB.o cwb_db.o $(CC)
-o createDB createDB.o cwb_db.o $(LIB)
$(CC) -o createDB createDB.o cwb_db.o $(LIB)
## Compile Module
%.o: %.c $(CC)
-c -o $@ $<
## Clear Module
clean: rm -f
$(OBJ) $(CGINAME) createDB.o createDB
22. À§ÀÇ ³»¿ëÁß ÆĶõ»öÀ» ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÕ´Ï´Ù.
(¼öÁ¤ÀÌÀü)
$(CGINAME):&(OBJ)
$(CC) -o &(CGINAME) &(OBJ)
(¼öÁ¤ÀÌÈÄ)
$(CGINAME):&(OBJ)
$(CC) -lcrypt -o &(CGINAME) &(OBJ) -lcrypt 23.
ÀÚ ÀÌÁ¦ ¼öÁ¤À» ÇÏ¿´´Ù¸é ÀúÀåÇÏ°í ³ª¿Í¼ ´ÙÀ½ÀÇ ¸í·ÉÀ» ¼öÇàÇÕ´Ï´Ù.
#make
ÀÌ°É ÇÏ°í ls Çϸé CrazyWWWBoard.cgi ÀÌ »ý°åÀ½À» ¾Ë ¼ö ÀÖ½À´Ï´Ù. 24.
ÀÌ°É Çѵð·ºÅ丮 À§·Î Ä«ÇÇÇÕ´Ï´Ù.
#cp CrazyWWWBoard.cgi ../ 25. ÀÚ ÀÌÁ¦
ºÎ¶ó¿ìÀúÀÇ ÁÖ¼ÒÀå¿¡ ´ÙÀ½ÀÇ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÕ´Ï´Ù.
http://ÀÚ½ÅÀÇ È¨ÆäÀÌÁö/cgi-bin/bulletin/CrazyWWWBoard.cgi?db=test
26. ¾Æ¸¶ ´ÙÀ½°ú °°Àº ¿¡·¯°¡ ¹ß»ýÇÒ °ÍÀÔ´Ï´Ù. ¾Æ´Ï¸é »ý·«Çϼ¼¿ä
¸¸¾à ´ÙÀ½°ú °°ÀÌ ¿¡·¯¸ä¼¼Áö°¡ ³ª¿Â´Ù¸é ÀÌ·¸°Ô Çϼ¼¿ä
[¿¡·¯¸ä¼¼Áö] Error !!!
Access logging(logs/access.log) fail.
bulletin µð·ºÅ丮 ¾Æ·¡ logs µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
ÇöÀç¿©±â´Â logs µð·ºÅ丮ÀÔ´Ï´Ù.
#touch access.log
#chmod 666 access.log 27. ´Ù½ÃÇѹø ºê¶ó¿ìÀú·Î
È®ÀÎÇÕ´Ï´Ù. 28. ¾Æ¸¶µµ ÀÌ·± ¸ä¼¼Áö°¡ ³ª¿Ã°Ì´Ï´Ù(¾È³ª¿À¸é
»ý·«ÇϽÿÀ)
Error !!!
DataBase Access Error : File open error 29.
bulletin µð·ºÅ丮¿¡ º¸¸é createDB ¶ó ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù. ÀÌ°ÍÀ» ÀÌ¿ëÇؼ DB¸¦ ¸¸µì´Ï´Ù. ¹æ¹ýÀº
´ÙÀ½°ú °°½À´Ï´Ù.
#createDB test
DB(data/test.gdbm) created.
ÀÌ°É ½ÇÇàÇϸé data µð·ºÅ丮¿¡ test.gdbm À̶õ ÆÄÀÏÀÌ »ý±é´Ï´Ù. ÀÌ ÆÄÀÏÀÇ Æ۹̼ÇÀ» 666À¸·Î ¹Ù²ß´Ï´Ù.
#cd data
#chmod 666 test.gdbm 30. ÀÚ ÀÌÁ¦ ´Ù½Ã
ºê¶ó¿ìÀú·Î º¾½Ã´Ù. ¸ä¼¼Áö°¡ ³ª¿Ã°Ì´Ï´Ù.
Error !!!
Welcome to the CrazyWorld.
This is your first contact, so you must set some configurations.
Click Admin. 31. adminÀ¸·Î µé¾î°¡¼¼¿ä -
µé¾î°¡¸é ¿©·¯°¡Áö°¡ ³ª¿À´Âµ¥ ±×Áß¿¡¼ ÀÏ´Ü ºñ¹Ð¹øÈ£¿Í °ü¸®ÀÚ À̸§, À̸ÞÀϸ¸ ±âÀÔÇÏ°í ³ª¿É´Ï´Ù. ³ª¿À¸é ÀÏ´Ü
°Ô½ÃÆÇÀÌ ºê¶ó¿ìÀú¿¡ Á¤»óÀûÀ¸·Î º¸ÀÏ°Ì´Ï´Ù.
32. ³Ê¹« Èûµé´Ù..ÂÁ.. ÀÌÁ¦ Á¤»óÀûÀ¸·Î µÇ´ÂÁö ±ÛÀ» Çѹø ½áº¾½Ã´Ù. ¾Æ¹«±ÛÀ̳ª ±Û¾²±â ¹öÆ°À» ´©¸£°í ½áº¸¼¼¿ä
- Á¦´ë·Î ±ÛÀÌ ½áÁö¸é ¿Ïº®ÇÏ°Ô ¼³Ä¡°¡ µÈ°ÍÀÔ´Ï´Ù. 33.
±×·±µ¥ ¸¶Áö¸·À» ¿¡·¯°¡ ³ª´Â ºÐµµ ÀÖÀ»°Ì´Ï´Ù.
Error !!!
Value string is null on key 1.Domain. Null pointer can not be
stored.
34. ÀÌ°Ç ¸Õ°¡? Á¦±â¶ö Á¤¸» º¹ÀâÇÏ´Ù.......(Á»¸¸ ÂüÀ¸¼¼¿ä ¿©±â±îÁö ¿Ô´Âµ¥ Æ÷±âÇÏ½Ã¸é ³Ê¹« ¾Æ±õÀݾƿä
^^) 35. ÀÌ·± ¸ä¼¼Áö°¡ ³ª¿À´Â ºÐÀº ¼¹öÀÇ È¯°æÆÄÀÏ httpd.conf
¿¡ HostLookup À̶õ ºÎºÐÀÌ OFF·Î µÇ¾î ÀÖ´Â °Ì´Ï´Ù. - ÀÌ°Ç ¶Ç ¹¹¾ß ÇϽô ºÐ °ÆÁ¤¸¶¼¼¿ä ÀÌ°Ç
¸ô¶óµµ µË´Ï´Ù. ¾Æ¹«Æ° ±×·¸°Ô ¼³Á¤µÇ¾î ÀÖ¾î¼ ÀÌ·± ¸ä¼¼Áö°¡ ³ª¿À´Â °Ì´Ï´Ù. ¸¸¾à ´ç½ÅÀÌ ¼¹ö°ü¸®ÀÚ¶ó¸é °£´ÜÇÏ°Ô
httpd.conf ÆÄÀÏ¿¡¼ HostLookup OFF¸¦ ONÀ¸·Î ¼öÁ¤¸¸ÇÏ°í ¼¹ö¸¦ ¸®·Îµå ½ÃÅ°¸é µË´Ï´Ù.
36, ³ ¼¹ö°ü¸®ÀÚ°¡ ¾Æ´Ñµ¥? - ÇϽô ºÐÀº
´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù. 37. src µð·ºÅ丮·Î À̵¿ÇÕ´Ï´Ù.
#cd src 38. vi ¸í·É¾î·Î cwb_write.c ÆÄÀÏÀÇ
³»¿ëÁß¿¡ À» ´ÙÀ½°ú °°ÀÌ ¿¡µðÆÃÇÕ´Ï´Ù.
(¼öÁ¤Àü)
article.IP = env.remote_addr; (317 ¹ø°ÁÙ)
article.Domain = env.remote_Host; (318 ¹ø°ÁÙ)
(¼öÁ¤ÈÄ)
article.IP = env.remote_addr; (317 ¹ø°ÁÙ)
article.Domain = env.remote_addr; (318 ¹ø°ÁÙ)
39. ¼öÁ¤ÀÌ ³¡³µÀ¸¸é ÀúÀåÇÏ°í ³ª¿Í¼ src µð·ºÅ丮¹Ø¿¡¼ make¸¦
½ÇÇàÇÕ´Ï´Ù.
#make
CrazyWWWBoard.cgi °¡ ´Ù½Ã »ý¼ºµË´Ï´Ù. ÀÌ°Ç ÇÑ µð·ºÅ丮 À§·Î Ä«ÇÇÇÕ´Ï´Ù.
#cd CrazyWWWBoard.cgi ../
´þ¾î¾º¿ï±î¿ä? ¹°¾îº¸¸é y¸¦ ÀÔ·ÂÇÑ´Ù. 40. ÀÌÁ¦ ´Ù½Ã ºê¶ó¿ìÀú·Î
http://ÀÚ±âȨÆäÀÌÁö/cgi-bini/bulletin/CrazyWWWBoard.cgi?db=test
¸¦ º¸¸é °Ô½ÃÆÇÀÌ º¸ÀÌ°í ±Û¾²±â¸¦ Çϸé Á¤»óÀûÀ¸·Î µ¿ÀÛÀÌ µÉ°ÍÀÌ´Ù. - ÈÞ..ÀÌÁ¦ °Ü¿ì ³¡³µ±º¿ä.
41. À§ÀÇ ÁøÇà°úÁ¤ÀÌ Àß ¾ÈµÇ¸é ÀÚ½ÅÀÌ ÀÔ·ÂÇÑ ¸í·ÉÀ̳ª ¼Ò½º¼öÁ¤ÀÌ
Á¤È®ÇÑÁö ÀçÂ÷È®ÀÎÇÏ°í ¹®ÀÇÇϽñ⠹ٶø´Ï´Ù. - ±×´ë·Î µû¶óÇϸé 99%·Î ¼³Ä¡µË´Ï´Ù.
42. ±Û ÀдÀ¶ó°í ¼ö°í ¸¹¾Ò½À´Ï´Ù.
43. ±Û ÀÛ¼ºÇÏ´À¶ó°í ³ªµµ ¼ö°í ¸¹¾Ò½À´Ï´Ù - --;;;;;
|
|