You are not logged in.
Pages: 1
Hi,
Sorry, I dont speak english very well. I want to create some program to check telnet connection. I base on old perl scripts "Telnet_Crack":
# CONNECTION.
sub connect {
print "\n\nATTEMPTING CONNECTION TO $HOST.";
$telnet = new Net::Telnet (Timeout => 5, Errmode => "return");
$telnet-> open("$HOST");
print "\n\nOK ... CONNECTED!!!\n\n";
};
# DO_IT.
sub do_it{
print "\nTRYING : USERNAME = $USER PASSWORD = $PASS";
&success if $telnet -> login($USER,$PASS);
$telnet -> close;
};
# SUCCESS.
sub success {
open (LOGFILE, ">>TELNET_CRACK") or die "\a\nERROR UNABLE TO OPEN TELNET_CRACK.\n $!";
print "\a\a\a";
print "\nUSERNAME: $USER has PASSWORD: $PASS on $HOST.\n\n\n\n\n";
print LOGFILE "\nUSERNAME: $USER has PASSWORD: $PASS on $HOST.\n\n";
close LOGFILE;
&quit;
};
But Telnet_Crack not working. Everything is ok in log:
Nov 9 14:07:07 jlug login[9086]: pam_unix(login:session): session opened for user us3r by (uid=0)
Nov 9 14:07:12 jlug xinetd[9004]: EXIT: telnet pid=9085 duration=6(sec)
Nov 9 14:07:12 jlug login[9086]: pam_unix(login:session): session closed for user us3r
But telnet_crack not execute success function. Maybe something is wrong with PAM? In gentoo Telnet_Crack work fine.. Of course, it's pretty good for users (dictionary attack doesnt work).
Maybe smb known, how i can check result from telnet login?
Offline
use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>10);
$telnet->open('10.2.60.156');
$telnet->login('user', 'pass') and &ok;
$telnet->close;
sub ok {
print "Success\n";
return 0;
}
I get timed-out waiting for password prompt at test3.pl line 5. Anybody known what I must do?
Offline
Pages: 1