Skip to content

Commit 6f4e3ba

Browse files
authored
Add files via upload
1 parent 33f42dc commit 6f4e3ba

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: Defanging the IP.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/python
2+
3+
def main():
4+
IP = input("Enter an IP address : ")
5+
newIP = ""
6+
7+
for c in IP:
8+
if c == ".":
9+
newIP += "[.]"
10+
else:
11+
newIP += c
12+
print(newIP)
13+
14+
if __name__ == "__main__":
15+
main()

0 commit comments

Comments
 (0)