Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- srand(123) # Seed Random Generator for Reproducibility
- loop_connection = 1_000_000 + rand(1_000_000)
- real_end = loop_connection + 10 + rand(500_000) # loop size is from 10 to 500k
- def rand_128bits_in_hex
- # Return string is between hex 1000_0000 and ffff_ffff
- ("10000000".hex + rand("ffffffff".hex - "10000000".hex)).to_s(16)
- end
- (loop_connection).times{puts rand_128bits_in_hex}
- loop do
- srand(124) # Re-Seed Random Generator to make a loop
- (real_end - loop_connection).times{puts rand_128bits_in_hex}
- end
Add Comment
Please, Sign In to add comment