chgrdj commited on
Commit
daab994
·
verified ·
1 Parent(s): 208bdc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- 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")
 
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")