MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //proc/self/root/scripts.20110531.215904.25158/bupcp
#!/usr/bin/perl
# cpanel4 - scripts        Copyright(c) 1997-2002 cPanel, Inc..
#                                 All rights Reserved.
# copyright@cpanel.net      http://cpanel.net
# This code is subject to the cpanel license. Unauthorized copying is prohibited
use Socket;
system("touch /etc/cpanelbeta");


$user = $ARGV[0];
$pass = $ARGV[1];
$ucp = 0;
@CT=split(/\n/,`crontab -l`);
@CT=grep(!/^#/, @CT);
@CT=grep(!/layer2.cpanel.net/, @CT);
@CT=grep(!/layer2b.cpanel.net/, @CT);
foreach $line (@CT) {
	if ($line =~ /\/scripts\/upcp/) {
		$ucp = 1;
		last;
	}
}


if (($user eq "" || $pass eq "") && ! -t STDIN) {
	die "No user/pass given and I have no way to ask for it";
}
if (!$ucp || $user eq "" || $pass eq "") {
	print "Enter username: ";
	chomp($user = <STDIN>);
	print "Enter pass: ";
	chomp($pass = <STDIN>);
	@CT=grep(!/\/scripts\/upcp/, @CT);
	push(@CT,int(rand(60)) . " " . int(rand(6)) . " * * * /scripts/upcp $user $pass");
	open(CR,">/scripts/.crontab");
	foreach $line (@CT) {
		print CR "$line\n";
	}	
	close(CR);
	system("crontab /scripts/.crontab");
	unlink("/scripts/.crontab");
}

system("/scripts/sysup");
system("/scripts/rpmup");


        $proto = getprotobyname('tcp');
       	socket(SH, AF_INET, SOCK_STREAM, $proto);
       	$iaddr = gethostbyname("layer2b.cpanel.net");
       	$port = getservbyname('http', 'tcp');
        $sin = sockaddr_in($port, $iaddr);
       	connect(SH, $sin);
send SH, "GET /installer/$user/$pass HTTP/1.0\r\n\r\n", 0;

open(SC,"|/bin/sh");
$io = 0;
while(<SH>) {
	s/\n//g;
	s/\r//g;
	if ($io == 1) {
		print SC "$_\n";
	}
	if ($_ eq "") {
		$io = 1;
	}
}
close(SH);
close(SC);

if (-x "/scripts/postupcp") {
	system("/scripts/postupcp");
}