Posted By

KaMiK4ZeH on 05/20/18


Tagged

finder nickname minecraft


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Hgonzalez1988


Minecraft Nickname Finder


 / Published in: Perl
 

$ perl script.pl [nickname1] [nickname2] [nickname3] […]

  1. #!/usr/bin/perl
  2. # Minecraft Nickname Finder by KaMiK4ZeH
  3.  
  4. use LWP::UserAgent;
  5. use Term::ANSIColor;
  6. use Win32::Console::ANSI;
  7.  
  8. if (!$ARGV[0]) {
  9.  
  10. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  11. | Minecraft Nickname Finder 1.0 |
  12. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  13.  
  14. [?] Syntax:
  15. perl [file.pl] [nickname1] [nickname2] [nickname3] [...]
  16. ex: perl minecraft.pl notch admin kamik4zeh dsadsad diablo3 iamapen
  17. );
  18.  
  19. exit 1;
  20.  
  21. }
  22.  
  23. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  24. | Minecraft Nickname Finder 1.0 |
  25. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  26.  
  27. );
  28.  
  29. $target = $ARGV[0];
  30.  
  31. print(" [?] Searching...\n");
  32.  
  33. foreach $finder(@ARGV) {
  34. $searcher = LWP::UserAgent->new() or die;
  35. $source = $searcher->get("https://api.mojang.com/users/profiles/minecraft/".$finder);
  36. if ($source->content =~ /name/) {
  37. print color("red"),(" [!] Unavailable: $finder \n");
  38.  
  39. } elsif ($source->content=~ /TooManyRequestsException/) {
  40. print color("yellow"),(" [!] Too many requests. Waiting 30 seconds... \n");
  41. sleep(30);
  42. } else {
  43. print color("green"),(" [+] Available: $finder \n");
  44. open(LOG, ">>", "log.txt");
  45. print LOG "$finder\n";
  46. close LOG;
  47. }
  48.  
  49. }
  50.  
  51. exit 1;
  52. #End of file

Report this snippet  

You need to login to post a comment.