Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/scripts/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/scripts/import.pl

my $file = shift;  #  Einlesen des ZIP-Files
my $url  = shift;

$file =~ s/\/$//;
$file =~ s/^(.*)\/(.*)$/$2/;
print "FF: $file\n";

my $backupnr = sprintf("%1u",100000 + int rand(899990));
my $site = $file;
my $site_old = $site . "_" . $backupnr;
my $site1 = $site;
my $text;
my $dbuser = ""; my $dbpasswd = "", my $dbfile = "";
my $dbhost = ""; my $dbconnect = "";

if ($file !~ /^(.*)\.zip$/) {  #  Einpacken
   open(FFILE,"<htdocs/$site/sites/default/settings.php");
   my $text = join("",<FFILE>);
   close(FFILE);
   if ($text =~ /\n\$db_url *\= *\'(.*?)\/\/(.*?)\:(.*?)\@(.*?)\/(.*?)\'/) {
      $dbconnect = $1;
      $dbuser    = $2;
      $dbpasswd  = $3;
      $dbhost    = $4;
      $dbfile    = $5;
      $site1     = $dbfile;
   }
   if (-d "cgi-bin/$site") {
      system("mv cgi-bin/$site cgi-bin/$site_old");
      system("mkdir cgi-bin/$site");
      system("cp -r cgi-bin/$site_old/* cgi-bin/$site");
   }
   system("rm -R .svn"); 
   system("rm -R */.svn"); 
   system("rm -R */*/.svn"); 
   system("rm -R */*/*/.svn"); 
   system("rm -R */*/*/*/.svn"); 
   system("rm -R */*/*/*/*/.svn");
   system("rm $site.zip"); 
   system("rm htdocs/$site/$site1.sql"); 
   system("mysqldump $site1 > htdocs/$site/$site1.sql");
   system("zip -r $file htdocs/$site/*");
   if (-d "cgi-bin/$site") {
      system("zip -r $file cgi-bin/$site/*");
      system("rm -r cgi-bin/$site");
      system("mv cgi-bin/$site_old cgi-bin/$site");
   }
   system("rm htdocs/$site/$site1.sql");
   exit;
}

# Auspacken:

my $site = $1;  #  Sitename
$site_old =~ s/\.zip//;

# Alte Versionen beseitigen

system("mv htdocs/$site  htdocs/$site_old");
#system("mv cgi-bin/$site cgi-bin/$site_old");
system("mv /var/lib/mysql/$site /var/lib/mysql/$site_old");

#  Entpacken der Drupal-Dateien inkl. SQL-Skript

system("unzip $file");

#  Aendern der settings-php:

open(FFILE,"<htdocs/$site/sites/default/settings.php");
my $text = join("",<FFILE>);
close(FFILE);
my $url_old = "";
if ($text =~ /\n\$base_url += +\'http\:\/\/(.*?)\//) {
   $url_old = $1;
} else {
   print "Warnung: URL nicht gefunden\n";
}
print "URL: $url_old\n";
$text =~ s/$url_old/$url/gs;
my $password = "";
if ($text =~ /\n\$db_url += (.*?)\:([a-zA-Z0-9]+)\@/) {
   $password = $2;
} else {
   print "Warnung: Kein Passwort gefunden\n";
}
open(FFILE,">htdocs/$site/sites/default/settings.php");
print FFILE $text;
close(FFILE);

#  Aendern der SQL-Dump-Datei

opendir(DDIR,"htdocs/$site");
while (0 == 0) {
   $site1 = readdir(DDIR);
   last if ($site1 =~ s/^(.*)\.sql$/$1/);
}

open(FFILE,"<htdocs/$site/$site1.sql");
my $text = join("",<FFILE>);
close(FFILE);
$text =~ s/$url_old/$url/gs;
open(FFILE,">htdocs/$site/$site1.sql");
print FFILE $text;
close(FFILE);

#  Einrichten der Datenbank

open(FFILE,">htdocs/$site/tmp.sql");
print FFILE "create database $site1\n";
close(FFILE);
system("mysql mysql < htdocs/$site/tmp.sql");


#  Importieren der Datenbank

system("mysql $site1 < htdocs/$site/$site1.sql");
system("chmod g+w /var/lib/mysql/$site1");
system("chmod g+w /var/lib/mysql/$site1/*");

#  Rechte einstellen fuer Datenbank

open(FFILE,">htdocs/$site/tmp.sql");
print FFILE "grant all privileges on *.* to iuitest\@localhost identified by \'$password\';\n";
close(FFILE);
system("mysql mysql < htdocs/$site/tmp.sql");
# exit;


#  Neustart

system("rcapache2 stop");
system("rcmysql stop");
sleep 2;
system("cd htdocs/$site; php update.php");
sleep 2;
system("rcmysql start");
system("rcapache2 start");


#  Cleanup

system("rm htdocs/$site/$site1.sql");
system("rm htdocs/$site/tmp.sql");



bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net