Created
December 16, 2022 04:32
-
-
Save pycoders0000/ce7207a546bc28dcb0113f8f3732ab70 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
# -*- coding: utf-8 -*- | |
# @Date : 2022-07-25 09:10:55 | |
# @Author : pycoder.py | |
# @GitHub : (https://github.com/pycoders0000) | |
# @Twitter : (https://twitter.com/pycoder0000) | |
# @Instagram : (https://www.instagram.com/pycoder.py/) | |
# @Version : 1.0.0 | |
def defangaddress(address: str): | |
return address.replace(".", "[.]") | |
print(defangaddress("1.1.1.1.1")) | |
# Defanging an IP address simply means to replace the "." with "[.]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment