ºÎŹµå¸³´Ï´Ù....
¸®´ª½º¼¹ö¸¦ À¥¼¹ö·Î »ç¿ëÇÏ´Ù°¡ ¾ó¸¶Àü¿¡ Áö¿ì°í win2000 server ·Î ¼³Ä¡Çß½À´Ï´Ù..
IIS¸¦ ±¸¼ºÇÏ°í ¸®´ª½º¿¡ ÀÖ´ø À¥ÆäÀÌÁö¸¦ °æ·Î¿¡ ¸ÂÃç win2000¿¡ Ä«ÇÇÇÏ¿© ȨÆäÀÌÁö´Â Á¤»óÀûÀ¸·Î ¶å´Ï´Ù...
±×µ§ ȨÆäÀÌÁö Áß°£Âë¿¡ loginid ¿Í passwd ¸¦ ÀÔ·ÂÇϴºκÐÀÌ Àִµ¥ id¿Í passwd¸¦ üũÇÏ´Â ºÎºÐÀÌ logincheck.c ·Î ÀÛ¼ºµÇ¾î ¸®´ª½º¿¡¼ cgi ·Î ÄÄÆÄÀÏ µÇ¾îÀÖ´Â°Í °°Àºµ¥(Á¦»ý°¢ÀÓ) logincheck.c ³»¿ë
#include #include "util.h" main() { FILE *fp; char str, old_str; char buf[1000]; int err = 1; long i = 1; int count; entry entries[2000]; printf("Content-type: text/html\r\n\r\n"); post_method(entries, &count); strcpy(buf, "¿¡·¯ "); if (!(fp = fopen("/home/httpd/icons/korean/samson.html","r"))) { printf("\n\nERROR !!!"); } else { if (!strcmp(entries[0].val, "") || strcmp(entries[0].val,"samson") != 0){ strcat(buf, "Login ID °¡ À߸øµÇ¾ú½À´Ï´Ù.
\n"); err = 0; } if (!strcmp(entries[1].val, "") || strcmp(entries[1].val,"perlite") != 0){ strcat(buf, "ºñ¹Ð¹øÈ£°¡ À߸øµÇ¾ú½À´Ï´Ù..
\n"); err = 0; } if ( err ) { old_str = (char)fgetc(fp) ; for(str = (char)fgetc(fp); old_str != '~' || str != '~'; ) { printf("%c",old_str) ; old_str = str; str = fgetc(fp); } } else { printf("\n\n%s",buf); } fclose(fp); } }
À̺¯È¯µÈ logincheck.cgi °¡ win2000¿¡¼ ½ÇÇàµÇÁö ¾Ê½À´Ï´Ù... activeperl µµ ¼³Ä¡ÇÏ¿´°í °æ·Îµµ ¸Â´Â°Í °°Àºµ¥ loginid,passwd ¸¦ ÀÔ·ÂÇϸé ÀÌÆäÀÌÁö¸¦ ¿¼ö¾ø´Ù´Â ȸéÀÌ ¶å´Ï´Ù Á¦°¡ À¥ÇÁ·Î±×·¡¸Ó°¡ ¾Æ´Ï¶ó¼ ¼³¸íÀÌ ºÎÁ·Çß´õ¶óµµ ÀÌÇعٶø´Ï´Ù..
|