Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,14 +16,14 @@ def defang_url(url: str) -> str:
|
|
| 16 |
This function replaces the protocol and dots.
|
| 17 |
For example:
|
| 18 |
https://example.com --> hxxps://example[.]com
|
| 19 |
-
"""
|
| 20 |
-
# Replace the protocol
|
| 21 |
-
if url.startswith("https://"):
|
| 22 |
-
|
| 23 |
-
elif url.startswith("http://"):
|
| 24 |
-
|
| 25 |
|
| 26 |
-
# Replace periods in the rest of the URL
|
| 27 |
return url.replace(".", "[.]")
|
| 28 |
|
| 29 |
st.title("URL Typosquatting Detection with URLGuardian")
|
|
|
|
| 16 |
This function replaces the protocol and dots.
|
| 17 |
For example:
|
| 18 |
https://example.com --> hxxps://example[.]com
|
| 19 |
+
# """
|
| 20 |
+
# # Replace the protocol
|
| 21 |
+
# if url.startswith("https://"):
|
| 22 |
+
# url = url.replace("https://", "hxxps://")
|
| 23 |
+
# elif url.startswith("http://"):
|
| 24 |
+
# url = url.replace("http://", "hxxp://")
|
| 25 |
|
| 26 |
+
# # Replace periods in the rest of the URL
|
| 27 |
return url.replace(".", "[.]")
|
| 28 |
|
| 29 |
st.title("URL Typosquatting Detection with URLGuardian")
|