waymore 8.0__tar.gz → 8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: waymore
3
- Version: 8.0
3
+ Version: 8.2
4
4
  Summary: Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan, VirusTotal & Intelligence X!
5
5
  Home-page: https://github.com/xnl-h4ck3r/waymore
6
6
  Author: xnl-h4ck3r
@@ -21,7 +21,7 @@ Dynamic: license-file
21
21
 
22
22
  <center><img src="https://github.com/xnl-h4ck3r/waymore/blob/main/waymore/images/title.png"></center>
23
23
 
24
- ## About - v8.0
24
+ ## About - v8.2
25
25
 
26
26
  The idea behind **waymore** is to find even more links from the Wayback Machine (plus other sources) than other existing tools.
27
27
 
@@ -1,6 +1,6 @@
1
1
  <center><img src="https://github.com/xnl-h4ck3r/waymore/blob/main/waymore/images/title.png"></center>
2
2
 
3
- ## About - v8.0
3
+ ## About - v8.2
4
4
 
5
5
  The idea behind **waymore** is to find even more links from the Wayback Machine (plus other sources) than other existing tools.
6
6
 
waymore-8.2/setup.py ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env python
2
+ import os
3
+ import re
4
+
5
+ from setuptools import find_packages, setup
6
+
7
+ # Read version from __init__.py without importing
8
+
9
+
10
+ def get_version():
11
+ init_path = os.path.join(os.path.dirname(__file__), "waymore", "__init__.py")
12
+ with open(init_path, encoding="utf-8") as f:
13
+ content = f.read()
14
+ match = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', content)
15
+ if match:
16
+ return match.group(1)
17
+ raise RuntimeError("Unable to find version string.")
18
+
19
+
20
+ setup(
21
+ name="waymore",
22
+ packages=find_packages(),
23
+ version=get_version(),
24
+ description="Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan & VirusTotal!",
25
+ long_description=open("README.md", encoding="utf-8").read(),
26
+ long_description_content_type="text/markdown",
27
+ author="@xnl-h4ck3r",
28
+ url="https://github.com/xnl-h4ck3r/waymore",
29
+ install_requires=[
30
+ "requests",
31
+ "pyyaml",
32
+ "termcolor",
33
+ "psutil",
34
+ "urlparse3",
35
+ "tldextract",
36
+ ],
37
+ entry_points={
38
+ "console_scripts": [
39
+ "waymore = waymore.waymore:main",
40
+ ],
41
+ },
42
+ )
@@ -0,0 +1 @@
1
+ __version__ = "8.2"
@@ -1306,34 +1306,58 @@ def getConfig():
1306
1306
  useDefaults = False
1307
1307
  try:
1308
1308
  # Get the path of the config file. If -c / --config argument is not passed, then it defaults to config.yml in the same directory as the run file
1309
- waymorePath = (
1310
- Path(os.path.join(os.getenv("APPDATA", ""), "waymore"))
1311
- if os.name == "nt"
1312
- else (
1313
- Path(os.path.join(os.path.expanduser("~"), ".config", "waymore"))
1314
- if os.name == "posix"
1315
- else (
1316
- Path(
1317
- os.path.join(
1318
- os.path.expanduser("~"),
1319
- "Library",
1320
- "Application Support",
1321
- "waymore",
1322
- )
1323
- )
1324
- if os.name == "darwin"
1325
- else None
1326
- )
1327
- )
1328
- )
1329
- waymorePath.absolute
1309
+ if os.name == "nt":
1310
+ waymorePath = Path(os.path.join(os.getenv("APPDATA", ""), "waymore"))
1311
+ elif sys.platform == "darwin":
1312
+ waymorePath = Path(os.path.expanduser("~/Library/Application Support/waymore"))
1313
+ else:
1314
+ waymorePath = Path(os.path.expanduser("~/.config/waymore"))
1315
+
1330
1316
  if args.config is None:
1331
- if waymorePath == "":
1332
- configPath = "config.yml"
1333
- else:
1334
- configPath = Path(waymorePath / "config.yml")
1317
+ configPath = waymorePath / "config.yml"
1335
1318
  else:
1336
1319
  configPath = Path(args.config)
1320
+
1321
+ # If the config file doesn't exist, create the default one
1322
+ if not os.path.isfile(configPath):
1323
+ try:
1324
+ # Make sure the directory exists
1325
+ if configPath.parent != Path("."):
1326
+ os.makedirs(configPath.parent, exist_ok=True)
1327
+ # Create the default config content using the DEFAULT_* constants
1328
+ defaultConfig = f"""FILTER_CODE: {DEFAULT_FILTER_CODE}
1329
+ FILTER_MIME: {DEFAULT_FILTER_MIME}
1330
+ FILTER_URL: {DEFAULT_FILTER_URL}
1331
+ FILTER_KEYWORDS: {DEFAULT_FILTER_KEYWORDS}
1332
+ URLSCAN_API_KEY:
1333
+ VIRUSTOTAL_API_KEY:
1334
+ CONTINUE_RESPONSES_IF_PIPED: True
1335
+ WEBHOOK_DISCORD: YOUR_WEBHOOK
1336
+ TELEGRAM_BOT_TOKEN: YOUR_TOKEN
1337
+ TELEGRAM_CHAT_ID: YOUR_CHAT_ID
1338
+ DEFAULT_OUTPUT_DIR:
1339
+ INTELX_API_KEY:
1340
+ SOURCE_IP:
1341
+ """
1342
+ with open(configPath, "w", encoding="utf-8") as f:
1343
+ f.write(defaultConfig)
1344
+ writerr(
1345
+ colored(
1346
+ 'Config file not found - created default config at "'
1347
+ + str(configPath)
1348
+ + '"',
1349
+ "yellow",
1350
+ )
1351
+ )
1352
+ except Exception as e:
1353
+ writerr(
1354
+ colored(
1355
+ "Config file not found, but failed to create default config file: "
1356
+ + str(e),
1357
+ "red",
1358
+ )
1359
+ )
1360
+
1337
1361
  config = yaml.safe_load(open(configPath))
1338
1362
  try:
1339
1363
  FILTER_URL = config.get("FILTER_URL")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: waymore
3
- Version: 8.0
3
+ Version: 8.2
4
4
  Summary: Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan, VirusTotal & Intelligence X!
5
5
  Home-page: https://github.com/xnl-h4ck3r/waymore
6
6
  Author: xnl-h4ck3r
@@ -21,7 +21,7 @@ Dynamic: license-file
21
21
 
22
22
  <center><img src="https://github.com/xnl-h4ck3r/waymore/blob/main/waymore/images/title.png"></center>
23
23
 
24
- ## About - v8.0
24
+ ## About - v8.2
25
25
 
26
26
  The idea behind **waymore** is to find even more links from the Wayback Machine (plus other sources) than other existing tools.
27
27
 
waymore-8.0/setup.py DELETED
@@ -1,80 +0,0 @@
1
- #!/usr/bin/env python
2
- import os
3
- import re
4
- import shutil
5
-
6
- from setuptools import find_packages, setup
7
-
8
- # Read version from __init__.py without importing
9
-
10
-
11
- def get_version():
12
- init_path = os.path.join(os.path.dirname(__file__), "waymore", "__init__.py")
13
- with open(init_path, encoding="utf-8") as f:
14
- content = f.read()
15
- match = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', content)
16
- if match:
17
- return match.group(1)
18
- raise RuntimeError("Unable to find version string.")
19
-
20
-
21
- target_directory = (
22
- os.path.join(os.getenv("APPDATA", ""), "waymore")
23
- if os.name == "nt"
24
- else (
25
- os.path.join(os.path.expanduser("~"), ".config", "waymore")
26
- if os.name == "posix"
27
- else (
28
- os.path.join(os.path.expanduser("~"), "Library", "Application Support", "waymore")
29
- if os.name == "darwin"
30
- else None
31
- )
32
- )
33
- )
34
-
35
- # Copy the config.yml file to the target directory if it exists
36
- configNew = False
37
- if target_directory and os.path.isfile("config.yml"):
38
- os.makedirs(target_directory, exist_ok=True)
39
- # If file already exists, create a new one
40
- if os.path.isfile(target_directory + "/config.yml"):
41
- configNew = True
42
- os.rename(target_directory + "/config.yml", target_directory + "/config.yml.OLD")
43
- shutil.copy("config.yml", target_directory)
44
- os.rename(target_directory + "/config.yml", target_directory + "/config.yml.NEW")
45
- os.rename(target_directory + "/config.yml.OLD", target_directory + "/config.yml")
46
- else:
47
- shutil.copy("config.yml", target_directory)
48
-
49
- setup(
50
- name="waymore",
51
- packages=find_packages(),
52
- version=get_version(),
53
- description="Find way more from the Wayback Machine, Common Crawl, Alien Vault OTX, URLScan & VirusTotal!",
54
- long_description=open("README.md", encoding="utf-8").read(),
55
- long_description_content_type="text/markdown",
56
- author="@xnl-h4ck3r",
57
- url="https://github.com/xnl-h4ck3r/waymore",
58
- install_requires=[
59
- "requests",
60
- "pyyaml",
61
- "termcolor",
62
- "psutil",
63
- "urlparse3",
64
- "tldextract",
65
- ],
66
- entry_points={
67
- "console_scripts": [
68
- "waymore = waymore.waymore:main",
69
- ],
70
- },
71
- )
72
-
73
- if configNew:
74
- print(
75
- "\n\033[33mIMPORTANT: The file "
76
- + target_directory
77
- + "/config.yml already exists.\nCreating config.yml.NEW but leaving existing config.\nIf you need the new file, then remove the current one and rename config.yml.NEW to config.yml\n\033[0m"
78
- )
79
- else:
80
- print("\n\033[92mThe file " + target_directory + "/config.yml has been created.\n\033[0m")
@@ -1 +0,0 @@
1
- __version__ = "8.0"
File without changes
File without changes
File without changes
File without changes
File without changes