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/proc/self/root/scripts.20110531.215904.25158/trustme
#!/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
chomp($kk = <STDIN>);
($host,$root) = split(/\s/, $kk);
if (! -e "/root/.ssh/identity") {
	system("/usr/bin/ssh-keygen -t rsa1 -f /root/.ssh/identity -P \"\"");
}
if (! -e "/root/.ssh/identity2") {
	system("/usr/bin/ssh-keygen -t rsa -f /root/.ssh/id_rsa -P \"\"");
	system("/usr/bin/ssh-keygen -t dsa -f /root/.ssh/id_dsa -P \"\"");
}

open(IP,"/root/.ssh/identity.pub");
chomp($ip = <IP>);
close(IP);

if ($ip !~ /^\d+/) {
	$ip =~ s/^\S+\s//g;
}

open(SSHS,">/root/.sshscript");
print SSHS "echo Script ok\n";
print SSHS "mkdir /root/.ssh\n";
print SSHS "chmod 700 /root/.ssh\n";
print SSHS ("echo \'$ip\' >> /root/.ssh/authorized_keys\n");
print SSHS "chmod 700 /root/.ssh/authorized_keys\n";
print SSHS "echo Copy Complete\n";
close(SSHS);
open(SC,"|/scripts/ssh.expect $host");
print SC "$root";
close(SC);
sleep(1);
print "\n\n";
open(SC2,"|/scripts/ssh2.expect $host");
print SC2 "$root";
close(SC2);
sleep(1);
print "Trust Relationship Created!\n";