Skip to content

Incredibly fast crawler designed for OSINT.

Update imports

ConnorSkees9aff745d0220
diff --git a/core/flash.py b/core/flash.py
index aa801b2..967dac6 100644
--- a/core/flash.py
+++ b/core/flash.py
@@ -1,7 +1,7 @@
from __future__ import print_function
-
import sys
import threading
+
from core.colors import info
try:
@@ -9,6 +9,7 @@ try:
except ImportError:
pass
+
def threader(function, *urls):
"""Start multiple threads for a function."""
threads = []
diff --git a/core/mirror.py b/core/mirror.py
index f5770ac..e4973dc 100644
--- a/core/mirror.py
+++ b/core/mirror.py
@@ -1,5 +1,5 @@
import os
-import re
+
def mirror(url, response):
if response != 'dummy':
diff --git a/core/requester.py b/core/requester.py
index e2e178b..fb4c8d3 100644
--- a/core/requester.py
+++ b/core/requester.py
@@ -1,9 +1,10 @@
-import time
import random
+import time
+
import requests
-from requests import get, post
from requests.exceptions import TooManyRedirects
+
session = requests.Session()
session.max_redirects = 3
diff --git a/core/updater.py b/core/updater.py
index fa7882b..5930b3e 100644
--- a/core/updater.py
+++ b/core/updater.py
@@ -1,7 +1,9 @@
-import re
import os
-from core.requester import requester
+import re
+
from core.colors import run, que, good, green, end, info
+from core.requester import requester
+
def updater():
"""Update the current installation.
diff --git a/core/utils.py b/core/utils.py
index cc6580b..74ec589 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -1,8 +1,10 @@
+import math
import re
+
import tld
-import math
-from core.config import verbose, bad_types
+
from core.colors import info
+from core.config import verbose, bad_types
try:
from urllib.parse import urlparse
diff --git a/core/zap.py b/core/zap.py
index 3694011..6440f97 100644
--- a/core/zap.py
+++ b/core/zap.py
@@ -1,9 +1,11 @@
import re
import requests
+
from core.utils import verb, xml_parser
from core.colors import run, good
from plugins.wayback import time_machine
+
def zap(input_url, archive, domain, host, internal, robots):
"""Extract links from robots.txt and sitemap.xml."""
if archive:
diff --git a/photon.py b/photon.py
index ebbc550..2df2053 100644
--- a/photon.py
+++ b/photon.py
@@ -13,16 +13,16 @@ import warnings
import requests
+from core.colors import bad, good, info, run, green, red, white, end
import core.config
-from core.updater import updater
+from core.config import intels
from core.flash import flash
from core.mirror import mirror
from core.prompt import prompt
from core.requester import requester
-from core.config import intels
-from core.zap import zap
+from core.updater import updater
from core.utils import top_level, extract_headers, verb, is_link, entropy, regxy, remove_regex, timer, writer
-from core.colors import bad, good, info, run, green, red, white, end
+from core.zap import zap
try:
from urllib.parse import urlparse # For Python 3