Advertisement
Guest User

Untitled

a guest
Feb 20th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.84 KB | None | 0 0
  1. #gather ip for all servers
  2.  
  3. s=""
  4. Thread.start{data=IO.popen("tcpick -i wlan0 -yx 'port 6112'")
  5. while line=data.gets
  6.     for x in line.split
  7.         if x.length==4
  8.             s<<x
  9.         end
  10.     end
  11. end}
  12.  
  13.  
  14. #create a list
  15. ip_list=""
  16. Thread.start{while
  17.    
  18.     for x in s.scan(/400000.............../)
  19.         ip_list<<x[13..14].to_i(16).to_s+"."+x[15..16].to_i(16).to_s+"."+x[17..18].to_i(16).to_s+"."+x[19..20].to_i(16).to_s+" "+x[9..12].to_i(16).to_s+"\n"
  20.     end
  21.     #puts ip_list.to_a.uniq
  22.         #puts "\n"
  23.         sleep 1
  24. end}
  25.  
  26.  
  27.  
  28. #now connect, hello world
  29. #10,000*10*List.to_a.length this loop should run for A LONG TIME
  30. sleep 5
  31. for i in 1..10000
  32.  
  33. for x in 1..10
  34.  
  35.     for i in ip_list.to_a.uniq
  36.     puts i
  37.         if i==nil
  38.         puts "i = nil"
  39.    
  40.             else
  41.        
  42.             Thread.start{
  43.             system("proxychains ruby client_wc3.rb #{i.chomp} #{ARGV}")
  44.             }
  45.        
  46.         end
  47.    
  48.     end
  49.  
  50. end
  51. sleep 60
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement