¾È³çÇϼ¼¿ä ¿äÁò ¸ÅÀÏ ¸î½Ã°£¾¿ ÀÌ°÷¿¡ µé·¯¼ ÀÚ·á¹Þ°í ½ÇÇàÇغ¸°í °øºÎÇÏ°í ÀÖ½À´Ï´Ù.¸¹Àº µµ¿òÀÌ µÇ°í ÀÖ½À´Ï´Ù. °¨»çÇÕ´Ï´Ù.
³Ê¹«³Ê¹« ¼ºÁú³ª°Ô ÇÏ´Â ³»¿ëÀ» Áú¹®µå¸®°í ½Í½À´Ï´Ù.
¾ó¸¶Àü ÀÌ°÷¿¡¼ ½ÃÇèÁö ¼Ò½º¸¦ ´Ù¿î¹Þ¾Æ¼ ½ÇÇàÇغ¸¾Ò½À´Ï´Ù.
Àú´Â »ç½Ç ÃʵîÇб³±³»çÀε¥ ³Ê¹«³Ê¹« ¸¶À½¿¡ µé¾ú½À´Ï´Ù. ³»¿ëÀ» Çѱ۷Π¹Ù²ãµµ µÇ´õ±º¿ä ±×·±µ¥ ÇÏ´Ùº¸´Ï ¿å½ÉÀÌ »ý°Ü¼ ¾ÆÀ̵éÀÌ ¹®Á¦¸¦ Çϳª¾¿ ¸ÂÃ߸é Ä«¿îÅÍ°¡ ¿Ã¶ó°¡¼ ¸î¹®Á¦Áß ¸î¹®Á¦¸¦ ¸ÂÃè´Ù°í Ãâ·ÂÀ» ÇÏ°í ½Í´õ¶ó±¸¿ä
±×·±µ¥ Àß ¾ÈµË´Ï´Ù. (»ç½Ç µÉ¸®°¡ ¾øÁÒ ¿ÕÃʺ¸´Ï±î)
Çѹø ¼Ò½º¸¦ º¸½Ã°í ¾Ë·ÁÁÖ¼¼¿ä ¿å½ÉÀ» ³»ÀÚ¸é ±× ±â·ÏÀÌ ´Ù¸¥ µ¥ÀÌÅÍ¿¡ º¸Á¸ÀÌ µÈ´Ù¸é ´õÇÒ ³ªÀ§°¡ ¾ø°Ú½À´Ï´Ù. ±ÍÂúÀº½Ã°ÚÁö¸¸ ²À ºÎŹµå¸³´Ï´Ù.
#!/usr/bin/perl
##################################################
# #
#ÇÁ·Î±×·¥ : ½Åȣö #
#Homepage : any.to/cybershin #
#ÀÛ¼ºÀÏÀÚ : 2000/1/8 #
# #
##################################################
# - Initialize Value --------------------
$password = "1111"; #¾ÏÈ£ÁöÁ¤#
open(FILE,"./total.txt");
$NO =
; close(FILE); # - GET or POST ------------------------- $c = 0; $Method = $ENV{ REQUEST_METHOD }; if ($Method eq "GET") { $buffer = $ENV{ QUERY_STRING }; @NameValuePairs = split(/&/,$buffer); foreach $NameValue(@NameValuePairs) { ($Name, $Value) = split(/=/,$NameValue); $Op[$c] = $Name; $Val[$c] = $Value; $c ; } } if ($Method eq "POST") { @list=(); read(STDIN, $QueryString, $ENV{ CONTENT_LENGTH }); @NameValuePairs = split (/&/, $QueryString); foreach $NameValue (@NameValuePairs) { ($Name, $Value) = split (/=/,$NameValue); $Value =~tr/ / /; $Value =~ s/%([dA-Fa-f][dA-Fa-f])/pack("C",hex($1))/eg; $list[$c] = $Value; $c =1; } $temp = pack("a20a180",$list[0],$list[1]); $NO ; open(FILE,">total.txt"); print FILE $NO; close(FILE); open(FILE,">word$NO.dat"); print FILE $temp; close(FILE); } if ($Op[0] eq "act" && $Val[0] eq "add") { &HTMLheader; print << "ENDofPRINT"; ENDofPRINT &HTMLfooter; exit(); } if ($Op[0] eq "pwd") { &HTMLheader; if ($password eq $Val[0]) { open(FILE,"./total.txt"); $NO = ; close(FILE); $NO ; print << "ENDofPRINT"; $NO ¹ø° ¹®Á¦ ÃâÁ¦. bordercolordark="white" bordercolorlight="white">
ENDofPRINT } else { print<<"ENDofPRINT";!!!incorrect password!!!
ENDofPRINT } &HTMLfooter; exit(); } if ($Op[0] eq "act" && $Val[0] eq "go") { $Qno = $Val[1]; @c = (); @bogi = (); $QueNumber = int(rand($NO)) 1; $Ans = int(rand(4)) 1; $File = "word$QueNumber.dat"; open(FILE,$File); read(FILE,$temp,200); close(FILE); ($dap, $munjae) = unpack("a20a180",$temp); $a=1; while($a<5) { $b = $a - $Ans $QueNumber; if ($b<1) {$b =$NO;} if ($b>$NO) {$b-=$NO;} $c[$a] = $b; open(FILE,"./word$b.dat"); read(FILE,$bogi[$a],20); close(FILE); $a ; } &HTMLheader; print << "ENDofPRINT";$Qno. ´ÙÀ½¹®Á¦ÀÇ Á¤´äÀ» º¸±â¿¡¼ °í¸£¼¼¿ä.
$munjae
ENDofPRINT &HTMLfooter; exit(); } if ($Op[0] eq "dap") { $Qno = $Val[1]; $Ans = $Val[2]; $dap = $Val[3]; $comment = "´ç½ÅÀº Ȥ½Ã µ¹¸Ó¸®? Ʋ·È½À´Ï´Ù"; if ($Val[0] eq $Ans) { $comment = "¶È¶ÈÇϱº¿ä ¸Â¾Ò½À´Ï´Ù" } &HTMLheader; $no = $Qno 1; print << "ENDofPRINT";$comment. $Qno¹ø Á¤´äÀº $Ans¹øÀÔ´Ï´Ù.
type="button" value="³ª°¡±â" onClick="window.close()">
ENDofPRINT &HTMLfooter; exit(); } # ------------------------------------------------------------------ Main Start &HTMLheader; print << "ENDofPRINT";
ENDofPRINT &HTMLfooter; # ------------------------------------------------------------------ End of Main sub HTMLheader { print "Content-type: text/html "; print <<"END";½ÃÈïÀºÇàÃʵîÇб³ ÄûÁî¹Ú»ç
END } sub HTMLfooter { print "½ÃÈïÀºÇàÃʵîÇб³ ¹®Á¦ÀºÇà
"; }