Created
July 15, 2021 18:42
-
-
Save meicookies/e30da46780a643b4c6606c2156f915d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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