sfm-crypto-future 3.0.0__py3-none-any.whl

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.
Files changed (236) hide show
  1. dirsearch/__init__.py +24 -0
  2. dirsearch/__main__.py +5 -0
  3. dirsearch/dirsearch.py +91 -0
  4. dirsearch/lib/__init__.py +0 -0
  5. dirsearch/lib/connection/__init__.py +0 -0
  6. dirsearch/lib/connection/ip_overrides.py +50 -0
  7. dirsearch/lib/connection/native.py +548 -0
  8. dirsearch/lib/connection/proxy.py +91 -0
  9. dirsearch/lib/connection/rate_limiter.py +57 -0
  10. dirsearch/lib/connection/request_target.py +64 -0
  11. dirsearch/lib/connection/requester.py +1019 -0
  12. dirsearch/lib/connection/response.py +458 -0
  13. dirsearch/lib/controller/__init__.py +0 -0
  14. dirsearch/lib/controller/controller.py +1240 -0
  15. dirsearch/lib/controller/event_loop.py +13 -0
  16. dirsearch/lib/controller/run_resources.py +113 -0
  17. dirsearch/lib/controller/session.py +489 -0
  18. dirsearch/lib/controller/session_options.py +52 -0
  19. dirsearch/lib/controller/session_snapshot.py +67 -0
  20. dirsearch/lib/core/__init__.py +0 -0
  21. dirsearch/lib/core/api.py +374 -0
  22. dirsearch/lib/core/decorators.py +33 -0
  23. dirsearch/lib/core/dictionary.py +369 -0
  24. dirsearch/lib/core/discovery_config.py +58 -0
  25. dirsearch/lib/core/exceptions.py +57 -0
  26. dirsearch/lib/core/execution_config.py +67 -0
  27. dirsearch/lib/core/filter_config.py +144 -0
  28. dirsearch/lib/core/filter_state.py +29 -0
  29. dirsearch/lib/core/filters.py +153 -0
  30. dirsearch/lib/core/fuzzer.py +956 -0
  31. dirsearch/lib/core/log_config.py +27 -0
  32. dirsearch/lib/core/logger.py +124 -0
  33. dirsearch/lib/core/native_builder.py +205 -0
  34. dirsearch/lib/core/native_runtime.py +80 -0
  35. dirsearch/lib/core/option_defaults.py +141 -0
  36. dirsearch/lib/core/options.py +835 -0
  37. dirsearch/lib/core/report_config.py +39 -0
  38. dirsearch/lib/core/request_backend.py +75 -0
  39. dirsearch/lib/core/request_config.py +71 -0
  40. dirsearch/lib/core/result_config.py +36 -0
  41. dirsearch/lib/core/run_config.py +73 -0
  42. dirsearch/lib/core/run_metadata.py +38 -0
  43. dirsearch/lib/core/scan_run_state.py +101 -0
  44. dirsearch/lib/core/scanner.py +412 -0
  45. dirsearch/lib/core/settings.py +223 -0
  46. dirsearch/lib/core/structures.py +83 -0
  47. dirsearch/lib/core/target_config.py +31 -0
  48. dirsearch/lib/core/target_progress.py +27 -0
  49. dirsearch/lib/core/task_checkpoint.py +54 -0
  50. dirsearch/lib/core/task_spec.py +21 -0
  51. dirsearch/lib/core/terminal_config.py +43 -0
  52. dirsearch/lib/core/wordlist_backend.py +289 -0
  53. dirsearch/lib/core/wordlist_config.py +56 -0
  54. dirsearch/lib/core/wordlist_template.py +232 -0
  55. dirsearch/lib/parse/__init__.py +0 -0
  56. dirsearch/lib/parse/cmdline.py +971 -0
  57. dirsearch/lib/parse/config.py +112 -0
  58. dirsearch/lib/parse/headers.py +60 -0
  59. dirsearch/lib/parse/nmap.py +24 -0
  60. dirsearch/lib/parse/rawrequest.py +117 -0
  61. dirsearch/lib/parse/url.py +102 -0
  62. dirsearch/lib/report/__init__.py +0 -0
  63. dirsearch/lib/report/csv_report.py +68 -0
  64. dirsearch/lib/report/directory_response_store.py +90 -0
  65. dirsearch/lib/report/factory.py +618 -0
  66. dirsearch/lib/report/html_report.py +77 -0
  67. dirsearch/lib/report/json_report.py +59 -0
  68. dirsearch/lib/report/jsonl_response_store.py +146 -0
  69. dirsearch/lib/report/manager.py +171 -0
  70. dirsearch/lib/report/markdown_report.py +45 -0
  71. dirsearch/lib/report/mysql_report.py +57 -0
  72. dirsearch/lib/report/plain_text_report.py +46 -0
  73. dirsearch/lib/report/postgresql_report.py +41 -0
  74. dirsearch/lib/report/response_store.py +188 -0
  75. dirsearch/lib/report/simple_report.py +33 -0
  76. dirsearch/lib/report/sqlite_report.py +72 -0
  77. dirsearch/lib/report/xml_report.py +76 -0
  78. dirsearch/lib/utils/__init__.py +0 -0
  79. dirsearch/lib/utils/cli.py +52 -0
  80. dirsearch/lib/utils/command.py +127 -0
  81. dirsearch/lib/utils/common.py +169 -0
  82. dirsearch/lib/utils/crawl.py +230 -0
  83. dirsearch/lib/utils/diff.py +218 -0
  84. dirsearch/lib/utils/file.py +364 -0
  85. dirsearch/lib/utils/mimetype.py +67 -0
  86. dirsearch/lib/utils/random.py +203 -0
  87. dirsearch/lib/utils/safe_xml.py +63 -0
  88. dirsearch/lib/utils/schemedet.py +41 -0
  89. dirsearch/lib/view/__init__.py +0 -0
  90. dirsearch/lib/view/colors.py +66 -0
  91. dirsearch/lib/view/terminal.py +301 -0
  92. dirsearch/setup.py +116 -0
  93. dirsearch/testing.py +41 -0
  94. dirsearch/tests/__init__.py +0 -0
  95. dirsearch/tests/check_packaged_install.py +244 -0
  96. dirsearch/tests/connection/__init__.py +0 -0
  97. dirsearch/tests/connection/proxy_server.py +718 -0
  98. dirsearch/tests/connection/test_async_proxy_environment_cli.py +103 -0
  99. dirsearch/tests/connection/test_dns.py +272 -0
  100. dirsearch/tests/connection/test_logging_ownership.py +72 -0
  101. dirsearch/tests/connection/test_macos_proxy.py +276 -0
  102. dirsearch/tests/connection/test_native_backend.py +1090 -0
  103. dirsearch/tests/connection/test_native_engine.py +1467 -0
  104. dirsearch/tests/connection/test_native_response.py +252 -0
  105. dirsearch/tests/connection/test_proxy.py +106 -0
  106. dirsearch/tests/connection/test_proxy_integration.py +917 -0
  107. dirsearch/tests/connection/test_rate_limiter.py +148 -0
  108. dirsearch/tests/connection/test_request_config.py +240 -0
  109. dirsearch/tests/connection/test_request_target_ownership.py +222 -0
  110. dirsearch/tests/connection/test_requester.py +3377 -0
  111. dirsearch/tests/connection/test_requester_rate.py +165 -0
  112. dirsearch/tests/connection/test_response.py +360 -0
  113. dirsearch/tests/controller/__init__.py +0 -0
  114. dirsearch/tests/controller/test_async_controller.py +251 -0
  115. dirsearch/tests/controller/test_backend_e2e_contract.py +226 -0
  116. dirsearch/tests/controller/test_calibration_e2e_contract.py +140 -0
  117. dirsearch/tests/controller/test_cli_interrupt_contract.py +104 -0
  118. dirsearch/tests/controller/test_controller_lifecycle.py +233 -0
  119. dirsearch/tests/controller/test_discovery_config.py +129 -0
  120. dirsearch/tests/controller/test_engine_selection.py +85 -0
  121. dirsearch/tests/controller/test_execution_config.py +272 -0
  122. dirsearch/tests/controller/test_filter_config.py +88 -0
  123. dirsearch/tests/controller/test_invocation_options.py +146 -0
  124. dirsearch/tests/controller/test_logging_ownership.py +162 -0
  125. dirsearch/tests/controller/test_native_controller.py +279 -0
  126. dirsearch/tests/controller/test_pause_state.py +229 -0
  127. dirsearch/tests/controller/test_process_isolation.py +212 -0
  128. dirsearch/tests/controller/test_progress_ownership.py +82 -0
  129. dirsearch/tests/controller/test_redirect_recursion.py +305 -0
  130. dirsearch/tests/controller/test_replay_lifecycle.py +184 -0
  131. dirsearch/tests/controller/test_report_config.py +142 -0
  132. dirsearch/tests/controller/test_request_config.py +58 -0
  133. dirsearch/tests/controller/test_result_config.py +270 -0
  134. dirsearch/tests/controller/test_root_crawl.py +174 -0
  135. dirsearch/tests/controller/test_run_config.py +214 -0
  136. dirsearch/tests/controller/test_run_resources.py +196 -0
  137. dirsearch/tests/controller/test_scan_run_state.py +272 -0
  138. dirsearch/tests/controller/test_session_cleanup.py +216 -0
  139. dirsearch/tests/controller/test_session_options.py +86 -0
  140. dirsearch/tests/controller/test_session_resume_queue.py +152 -0
  141. dirsearch/tests/controller/test_session_snapshot.py +505 -0
  142. dirsearch/tests/controller/test_session_store.py +526 -0
  143. dirsearch/tests/controller/test_target_config.py +215 -0
  144. dirsearch/tests/controller/test_target_credentials.py +261 -0
  145. dirsearch/tests/controller/test_target_dns.py +141 -0
  146. dirsearch/tests/controller/test_target_url.py +335 -0
  147. dirsearch/tests/controller/test_terminal_ownership.py +193 -0
  148. dirsearch/tests/controller/test_threaded_controller.py +183 -0
  149. dirsearch/tests/controller/test_wordlist_config.py +106 -0
  150. dirsearch/tests/core/__init__.py +0 -0
  151. dirsearch/tests/core/test_advanced_filters.py +239 -0
  152. dirsearch/tests/core/test_async_fuzzer.py +172 -0
  153. dirsearch/tests/core/test_backup_discovery.py +131 -0
  154. dirsearch/tests/core/test_calibration_words.py +150 -0
  155. dirsearch/tests/core/test_cli_output_streams.py +138 -0
  156. dirsearch/tests/core/test_cli_run_metadata.py +44 -0
  157. dirsearch/tests/core/test_constant_tables.py +47 -0
  158. dirsearch/tests/core/test_dictionary_concurrency.py +342 -0
  159. dirsearch/tests/core/test_dictionary_templates.py +137 -0
  160. dirsearch/tests/core/test_discovery_config.py +145 -0
  161. dirsearch/tests/core/test_dynamic_dictionary.py +377 -0
  162. dirsearch/tests/core/test_execution_config.py +195 -0
  163. dirsearch/tests/core/test_filter_config.py +146 -0
  164. dirsearch/tests/core/test_fuzzer_filter_stacks.py +386 -0
  165. dirsearch/tests/core/test_fuzzer_lifecycle.py +222 -0
  166. dirsearch/tests/core/test_importable_api.py +362 -0
  167. dirsearch/tests/core/test_logger.py +114 -0
  168. dirsearch/tests/core/test_native_builder.py +73 -0
  169. dirsearch/tests/core/test_native_fuzzer.py +629 -0
  170. dirsearch/tests/core/test_native_runtime.py +53 -0
  171. dirsearch/tests/core/test_numeric_option_validation.py +139 -0
  172. dirsearch/tests/core/test_options.py +544 -0
  173. dirsearch/tests/core/test_options_config_merge.py +72 -0
  174. dirsearch/tests/core/test_regex_option_validation.py +101 -0
  175. dirsearch/tests/core/test_report_config.py +53 -0
  176. dirsearch/tests/core/test_request_backend.py +267 -0
  177. dirsearch/tests/core/test_request_config.py +114 -0
  178. dirsearch/tests/core/test_result_config.py +37 -0
  179. dirsearch/tests/core/test_run_config.py +148 -0
  180. dirsearch/tests/core/test_run_logger.py +117 -0
  181. dirsearch/tests/core/test_run_metadata.py +40 -0
  182. dirsearch/tests/core/test_scan_run_state.py +233 -0
  183. dirsearch/tests/core/test_scanner.py +291 -0
  184. dirsearch/tests/core/test_target_config.py +56 -0
  185. dirsearch/tests/core/test_target_progress.py +29 -0
  186. dirsearch/tests/core/test_task_checkpoint.py +48 -0
  187. dirsearch/tests/core/test_task_spec.py +24 -0
  188. dirsearch/tests/core/test_terminal_config.py +31 -0
  189. dirsearch/tests/core/test_wordlist_backend.py +256 -0
  190. dirsearch/tests/core/test_wordlist_config.py +172 -0
  191. dirsearch/tests/parse/__init__.py +0 -0
  192. dirsearch/tests/parse/test_cmdline.py +99 -0
  193. dirsearch/tests/parse/test_config.py +58 -0
  194. dirsearch/tests/parse/test_headers.py +37 -0
  195. dirsearch/tests/parse/test_nmap.py +22 -0
  196. dirsearch/tests/parse/test_rawrequest.py +79 -0
  197. dirsearch/tests/parse/test_url.py +111 -0
  198. dirsearch/tests/report/__init__.py +0 -0
  199. dirsearch/tests/report/test_atomic_file_reports.py +129 -0
  200. dirsearch/tests/report/test_file_report_portability.py +130 -0
  201. dirsearch/tests/report/test_html_report_template.py +222 -0
  202. dirsearch/tests/report/test_mysql_report.py +80 -0
  203. dirsearch/tests/report/test_report_command_redaction.py +109 -0
  204. dirsearch/tests/report/test_report_locking.py +129 -0
  205. dirsearch/tests/report/test_report_manager.py +368 -0
  206. dirsearch/tests/report/test_response_store.py +896 -0
  207. dirsearch/tests/report/test_run_metadata.py +113 -0
  208. dirsearch/tests/report/test_sql_report.py +290 -0
  209. dirsearch/tests/report/test_streaming_file_reports.py +95 -0
  210. dirsearch/tests/report/test_structured_file_reports.py +735 -0
  211. dirsearch/tests/test_docker_workflow.py +35 -0
  212. dirsearch/tests/test_native_install_packaging.py +230 -0
  213. dirsearch/tests/test_optional_db_dependencies.py +107 -0
  214. dirsearch/tests/test_release_scripts.py +65 -0
  215. dirsearch/tests/test_report_exception_handling.py +103 -0
  216. dirsearch/tests/test_test_discovery.py +48 -0
  217. dirsearch/tests/utils/__init__.py +0 -0
  218. dirsearch/tests/utils/test_cli_interrupts.py +94 -0
  219. dirsearch/tests/utils/test_command.py +152 -0
  220. dirsearch/tests/utils/test_common.py +54 -0
  221. dirsearch/tests/utils/test_crawl.py +295 -0
  222. dirsearch/tests/utils/test_diff.py +139 -0
  223. dirsearch/tests/utils/test_file.py +294 -0
  224. dirsearch/tests/utils/test_mimetype.py +56 -0
  225. dirsearch/tests/utils/test_random.py +88 -0
  226. dirsearch/tests/utils/test_safe_xml.py +72 -0
  227. dirsearch/tests/utils/test_schemedet.py +79 -0
  228. dirsearch/tests/utils/test_terminal.py +67 -0
  229. dirsearch/tests/utils/test_terminal_ownership.py +211 -0
  230. sfm/__init__.py +6 -0
  231. sfm/core.py +60 -0
  232. sfm/wallet.py +31 -0
  233. sfm_crypto_future-3.0.0.dist-info/METADATA +9 -0
  234. sfm_crypto_future-3.0.0.dist-info/RECORD +236 -0
  235. sfm_crypto_future-3.0.0.dist-info/WHEEL +5 -0
  236. sfm_crypto_future-3.0.0.dist-info/top_level.txt +2 -0
dirsearch/__init__.py ADDED
@@ -0,0 +1,24 @@
1
+ import sys
2
+ import os
3
+
4
+ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
5
+
6
+ from .lib.core.api import ( # noqa: E402
7
+ DirsearchFuzzer,
8
+ FuzzerConfig,
9
+ FuzzerResult,
10
+ Wordlist,
11
+ WordlistLimitError,
12
+ WordlistState,
13
+ WordlistTemplate,
14
+ )
15
+
16
+ __all__ = [
17
+ "DirsearchFuzzer",
18
+ "FuzzerConfig",
19
+ "FuzzerResult",
20
+ "Wordlist",
21
+ "WordlistLimitError",
22
+ "WordlistState",
23
+ "WordlistTemplate",
24
+ ]
dirsearch/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ from .dirsearch import main
2
+
3
+
4
+ if __name__ == "__main__":
5
+ main()
dirsearch/dirsearch.py ADDED
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env python3
2
+ #
3
+ # -*- coding: utf-8 -*-
4
+ # This program is free software; you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation; either version 2 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program; if not, write to the Free Software
16
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
+ # MA 02110-1301, USA.
18
+ #
19
+ # Author: Mauro Soria
20
+
21
+ import sys
22
+
23
+ from lib.core.api import (
24
+ DirsearchFuzzer,
25
+ FuzzerConfig,
26
+ FuzzerResult,
27
+ Wordlist,
28
+ WordlistState,
29
+ WordlistTemplate,
30
+ )
31
+ from lib.core.option_defaults import default_options
32
+ from lib.core.exceptions import WordlistLimitError
33
+ from lib.core.options import parse_options
34
+ from lib.core.run_metadata import RunMetadata
35
+ from lib.utils.cli import cli_interrupts, fail
36
+
37
+ __all__ = [
38
+ "main",
39
+ "DirsearchFuzzer",
40
+ "FuzzerConfig",
41
+ "FuzzerResult",
42
+ "Wordlist",
43
+ "WordlistState",
44
+ "WordlistTemplate",
45
+ ]
46
+
47
+ if sys.version_info < (3, 11):
48
+ sys.stderr.write("Sorry, dirsearch requires Python 3.11 or higher\n")
49
+ sys.exit(1)
50
+
51
+
52
+ def main():
53
+ metadata = RunMetadata.capture()
54
+ options = default_options()
55
+ options.update(parse_options())
56
+
57
+ if options["wordlist_status"]:
58
+ from lib.core.dictionary import Dictionary
59
+ from lib.core.wordlist_config import WordlistConfig
60
+
61
+ try:
62
+ dictionary = Dictionary(
63
+ WordlistConfig.from_options(options), files=options["wordlists"]
64
+ )
65
+ except WordlistLimitError as error:
66
+ fail(error)
67
+
68
+ print("Wordlist status")
69
+ print(f"Files: {len(options['wordlists'])}")
70
+ for wordlist in options["wordlists"]:
71
+ print(f"- {wordlist}")
72
+ print(f"Generated entries: {len(dictionary)}")
73
+ print(f"Generation limit: {options['wordlist_max_size']}")
74
+ sys.exit(0)
75
+
76
+ if options["session_file"]:
77
+ print("Loading a session file will override current options.")
78
+ if input("[c]ontinue / [q]uit: ") != "c":
79
+ exit(1)
80
+
81
+ from lib.controller.controller import Controller
82
+
83
+ controller = Controller(options, metadata=metadata)
84
+ controller.run(interrupts=cli_interrupts(controller.handle_pause))
85
+
86
+
87
+ if __name__ == "__main__":
88
+ try:
89
+ main()
90
+ except KeyboardInterrupt:
91
+ pass
File without changes
File without changes
@@ -0,0 +1,50 @@
1
+ # -*- coding: utf-8 -*-
2
+ # This program is free software; you can redistribute it and/or modify
3
+ # it under the terms of the GNU General Public License as published by
4
+ # the Free Software Foundation; either version 2 of the License, or
5
+ # (at your option) any later version.
6
+ #
7
+ # This program is distributed in the hope that it will be useful,
8
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ # GNU General Public License for more details.
11
+ #
12
+ # You should have received a copy of the GNU General Public License
13
+ # along with this program; if not, write to the Free Software
14
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
15
+ # MA 02110-1301, USA.
16
+ #
17
+ # Author: Mauro Soria
18
+
19
+ from __future__ import annotations
20
+
21
+
22
+ class IPOverrides:
23
+ """Requester-owned connection IPs configured by the --ip option.
24
+
25
+ This mapping does not resolve DNS or collect a hostname's A/AAAA records.
26
+ Without an override, the HTTP transport resolves the hostname normally.
27
+ The controller configures overrides before workers start, and workers only
28
+ read the mapping, so the connection hot path needs no synchronization.
29
+ """
30
+
31
+ def __init__(self) -> None:
32
+ self._overrides: dict[tuple[str, int], str] = {}
33
+
34
+ @staticmethod
35
+ def _key(host: str, port: int) -> tuple[str, int]:
36
+ return host.rstrip(".").casefold(), port
37
+
38
+ def set_override(self, host: str, port: int, ip_address: str) -> None:
39
+ self._overrides[self._key(host, port)] = ip_address
40
+
41
+ def get_override(self, host: str, port: int) -> str | None:
42
+ """Return one forced connection IP, or None for normal DNS lookup."""
43
+ return self._overrides.get(self._key(host, port))
44
+
45
+ def connection_overrides(self) -> list[tuple[str, int, str]]:
46
+ """Return a stable snapshot suitable for configuring a transport."""
47
+ return sorted(
48
+ (host, port, ip_address)
49
+ for (host, port), ip_address in self._overrides.items()
50
+ )