Skip to content

Incredibly fast crawler designed for OSINT.

Change all core.config constants to be UPPER_CASE

ConnorSkees26e8b4c12c12
diff --git a/core/config.py b/core/config.py
index 688836f..6ef58f4 100644
--- a/core/config.py
+++ b/core/config.py
@@ -1,15 +1,15 @@
"""Configuration options for Photon."""
-verbose = False
+VERBOSE = False
-intels = [
+INTELS = [
'facebook.com',
'github.com',
'instagram.com',
'youtube.com',
]
-bad_types = [
+BAD_TYPES = [
'bmp',
'css',
'csv',
diff --git a/core/utils.py b/core/utils.py
index 74ec589..fc8875c 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -4,7 +4,7 @@ import re
import tld
from core.colors import info
-from core.config import verbose, bad_types
+from core.config import verbose, BAD_TYPES
try:
from urllib.parse import urlparse
@@ -38,7 +38,7 @@ def is_link(url, processed, files):
bool If `url` should be crawled
"""
if url not in processed:
- is_file = url.endswith(bad_types)
+ is_file = url.endswith(BAD_TYPES)
if is_file:
files.add(url)
return is_file
diff --git a/photon.py b/photon.py
index 2df2053..ca77e8a 100644
--- a/photon.py
+++ b/photon.py
@@ -15,7 +15,7 @@ import requests
from core.colors import bad, good, info, run, green, red, white, end
import core.config
-from core.config import intels
+from core.config import INTELS
from core.flash import flash
from core.mirror import mirror
from core.prompt import prompt
@@ -308,7 +308,7 @@ if not only_urls:
intel.add(x)
for url in external:
try:
- if top_level(url, fix_protocol=True) in intels:
+ if top_level(url, fix_protocol=True) in INTELS:
intel.add(url)
except:
pass