Created
December 28, 2016 03:34
-
-
Save aburgd/7900b9c12a6b2f47d0072b2d4fbc6639 to your computer and use it in GitHub Desktop.
This file contains 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
import requests | |
url = "https://wtfismyip.com/json" | |
headers = {"user-agent": "FuckProtocol/0.1.0"} | |
def make_the_call(): | |
response = requests.get(url=url, headers=headers) | |
resp_data = response.json() | |
return resp_data | |
data = make_the_call() | |
hostname = data['YourFuckingHostname'] | |
ip_addr = data['YourFuckingIPAddress'] | |
print("Your Fucking Hostname: ", hostname) | |
print("Your Fucking IP Address: ", ip_addr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment