Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5 file = File.open(in_file, "r")
- 6 cont = file.read
- 7
- 8 ips = cont.scan(/\d+\.\d+\.\d+\.\d+/)
- 9 ips.map {|entry| 'https://'+entry.to_s }
- 10
- 11 out_file = File.new(out_file, "w")
- 12 out_file.write(ips.uniq.join("\n"))
- outpute file :
- 1.2.3.4
- 2.3.4.5
- need -
- https://1.2.3.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement