ips.rb 211 B

12345678910111213
  1. #!/usr/bin/env ruby
  2. #
  3. #
  4. require 'redis'
  5. redis = Redis.new(host: "127.0.0.1", port: 8002)
  6. 1.upto(100000) do
  7. ip = "%d.%d.%d.%d" % [rand(253)+1, rand(254), rand(254), rand(254)]
  8. redis.set "bl:#{ip}", 1
  9. end