Skip to content

Instantly share code, notes, and snippets.

@meicookies
Created July 15, 2021 18:42
Show Gist options
  • Select an option

  • Save meicookies/e30da46780a643b4c6606c2156f915d9 to your computer and use it in GitHub Desktop.

Select an option

Save meicookies/e30da46780a643b4c6606c2156f915d9 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'net/http'
require 'socket'
require 'json'
def p(str)
str.gsub(/$/, '').each_line {|x| puts x}
end
def revip(host)
ip = IPSocket.getaddress(host)
api = "https://akira-api.herokuapp.com/api/reverseip?q=#{ip}"
JSON.parse(Net::HTTP.get(URI(api)))["result"].each {|hash|
hash.each_value {|x| p(x)}
}
end
if ARGV[0].nil?
puts "\e[93m[*] REVERSE IP UNLIMITED \u{1f60e}\e[0m"
puts "\e[94mUsage: ./rev.rb [situsnya]\e[0m"
else
str = ARGV[0].to_s
if str.match(/http/)
revip(URI.parse("#{ARGV[0]}").host)
else
revip(ARGV[0].to_s)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment