Skip to content

Instantly share code, notes, and snippets.

@iNawaR1
Last active February 5, 2022 16:42
Show Gist options
  • Save iNawaR1/fc781172ba718092d76ed7f1ba9c5898 to your computer and use it in GitHub Desktop.
Save iNawaR1/fc781172ba718092d76ed7f1ba9c5898 to your computer and use it in GitHub Desktop.
enter a url and you will get the website IP
from colorama import *
import socket
target = input(Fore.RED+"Put the target's URL: ")
Fore.YELLOW
Fore.RED
def get_ip (target):
iN = target.split(".com")[0]
iN2 = iN.replace("http://", "")
iN3 = iN2.replace("https://", "")
iNlast = iN3.replace("www.", "")
ip = socket.gethostbyname(iNlast+".com")
print(Fore.YELLOW+"========================================================")
print(Fore.YELLOW+f"Target's IP is: {ip}")
exit()
get_ip(target)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment