Skip to content

Instantly share code, notes, and snippets.

@Tony3-sec
Created October 17, 2015 05:00
Show Gist options
  • Save Tony3-sec/582b1299b43c91dc820e to your computer and use it in GitHub Desktop.
Save Tony3-sec/582b1299b43c91dc820e to your computer and use it in GitHub Desktop.
#!/usr/bin/python
## Escape dots in domain name or IP address
## You can put multiple domains/IPs split by space
domainIP = raw_input('Enter domain or IP: ')
domainIPList = domainIP.split(' ')
for i in domainIPList:
i = i[::-1].replace('.', '].[', 1)
print(i[::-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment