Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Correct schema problem when adding URL with -u option (issues #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
t4d committed Sep 2, 2018
1 parent 97803ce commit b1901a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stalkphish/tools/addurl.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
def AddUniqueURL(URLadd,LOG,SQL,TABLEname,PROXY,UAFILE):
UAG = UAgent()
# add schema
if not URLadd.startswith("http(|s)://") :
URLadd="http://{}".format(URLadd)
else:
if URLadd.startswith("http://") or URLadd.startswith("https://"):
pass
else:
URLadd="http://{}".format(URLadd)

# remove URL containing UID-style strings
siteURL = re.split("(?:[0-9a-fA-F]:?){32}", URLadd.rstrip())[0]
## Test if entry still exist in DB
Expand Down

0 comments on commit b1901a1

Please sign in to comment.