Skip to content

Incredibly fast crawler designed for OSINT.

UrlType no more

oXiseff22d4c8ff3
diff --git a/core/utils.py b/core/utils.py
index 1f2d4fb..cb32ff2 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -144,17 +144,6 @@ def top_level(url, fix_protocol=True):
return toplevel
-def UrlType(v):
- """ Check if string is a URL """
- if re.match(r"(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)", v):
- # If all the checks pass, just return the string as is
- return v
- elif re.match(r"(http(s)?:\/\/)?(\blocalhost\b)", v):
- return v
- else:
- raise argparse.ArgumentTypeError("Must be a valid url.")
-
-
def ProxyType(v):
""" Match IP:PORT or DOMAIN:PORT in a losse manner """
if re.match(r"(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d{1,5})", v):
diff --git a/photon.py b/photon.py
index 147cb04..08d3c94 100644
--- a/photon.py
+++ b/photon.py
@@ -56,7 +56,7 @@ warnings.filterwarnings('ignore')
# Processing command line arguments
parser = argparse.ArgumentParser()
# Options
-parser.add_argument('-u', '--url', help='root url', dest='root', type=UrlType)
+parser.add_argument('-u', '--url', help='root url', dest='root')
parser.add_argument('-c', '--cookie', help='cookie', dest='cook')
parser.add_argument('-r', '--regex', help='regex pattern', dest='regex')
parser.add_argument('-e', '--export', help='export format', dest='export', choices=['csv', 'json'])
@@ -128,7 +128,7 @@ if args.proxies:
proxies = {"http": args.proxies,
"https": args.proxies}
if not is_good_proxy(proxies):
- print("%s Proxy doesn't seem to work" % bad)
+ print("%s Proxy doesn't seem to work or timedout" % bad)
exit()
crawl_level = args.level or 2 # Crawling level