Guest User

Untitled

a guest
May 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.48 KB | None | 0 0
  1. #!/usr/bin/perl
  2. sub main {
  3. open ($OUT, ">.ip.txt") or die "cannot open file";
  4.  
  5.  
  6. print "This script will try to create a random ip list of 450,000 hosts\n";
  7.  
  8.  
  9. for($i=0;$i<=10000;$i++){
  10. $oct1 = int rand(254);
  11. $oct2 = int rand(254);
  12. $oct3 = int rand(254);
  13. $oct4 = int rand(254);
  14. $ip = join('.', $oct1, $oct2, $oct3, $oct4);
  15.  
  16. &trace_progress($ip);
  17.  
  18.   }
  19.  
  20. }
  21.  
  22. sub trace_progress {
  23.  my $word_progress=shift;
  24.  
  25.  
  26.  
  27.  print $OUT "$word_progress\n";
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. &main()
Add Comment
Please, Sign In to add comment