Engine¶
Problematic¶
- How to auto continue?
- How to auto save?
- How to implement a proper debugger?
- How to get subjects related to a tested subject?
- How to work with different database types?
- How to sort our outputs?
Documentation¶
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the engine interfaces.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/special-thanks.html
- Contributors:
- https://pyfunceble.github.io/contributors.html
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/master/
- Project homepage:
- https://pyfunceble.github.io/
License:
Copyright 2017, 2018, 2019, 2020 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
AutoContinue()
¶
-
class
PyFunceble.engine.auto_continue.
AutoContinue
(filename, parent_process=False)[source]¶ Provides the auto-continue subsystem.
-
_AutoContinue__generate_complements
()¶ Generates the complements from the given list of tested.
-
_AutoContinue__get_or_generate_complements_json
()¶ Gets or generates the complements while working with as JSON formatted database.
-
_AutoContinue__get_or_generate_complements_mysql
()¶ Gets or generates the complements while working with as MySQL/MariaDB formatted database.
Provides the execution authorization.
-
AutoSave()
¶
Logger()
¶
-
class
PyFunceble.engine.logger.
Logger
(debug=False, on_screen=False, output_directory=None)[source]¶ Provides our logging logic.
-
_Logger__get_handler
(handler_type)¶ Provides a handler for of the given type.
-
_Logger__init_loggers
()¶ Initiates all loggers.
-
_Logger__set_output_directory
(output_directory)¶ Shares the given output directory.
Note
If the given output directory does not exists, we create it.
Parameters: output_directory (string) – The output directory.
Provides the operation authorization.
-
format_to_apply
= '[%(asctime)s::%(levelname)s::%(origin_path)s:%(origin_line)s@%(origin_func)s](PID%(process)s:%(processName)s): %(message)s'¶ The format to apply.
-
classmethod
get_origin_info
()[source]¶ Returns the information about where the logger was triggered.
Returns: A tuple, which is composed of the following. (trigger file path, trigger line, trigger function/method name)
Return type: tuple
-
root_logger_format
= '[%(asctime)s::%(levelname)s](PID%(process)s:%(processName)s): %(message)s'¶ The format to parse to the root logger (if used).
-
Mining()
¶
-
class
PyFunceble.engine.mining.
Mining
(filename, parent_process=False)[source]¶ Manages the minig subsystem.
Provides the operation authorization.
-
classmethod
get_history
(url, verify=None)[source]¶ Gets the history of the given url.
Parameters: url (str) – An URL to call. Returns: The list of links. Return type: list
-
list_of_mined
()[source]¶ Provides the list of mined domains so that they can be tested.
Returns: The list of mined domains. The returned format is the following:
[ (index_to_delete_after_test, mined), (index_to_delete_after_test, mined), (index_to_delete_after_test, mined) ]
Return type: list
-
mine
(subject, subject_type)[source]¶ Searches for domain or URL related to the original URL or domain. If some are found, we add them into the database.
Parameters:
Sort()
¶
-
class
PyFunceble.engine.sort.
Sort
[source]¶ Provides some sorting presets which we can parse to
PyFunceble.helpers.list.List.custom_format
.-
classmethod
_Sort__get_url_base
(element)¶ Provides the URL base if needed.
-
classmethod
hierarchical
(element)[source]¶ The idea behind this method is to sort a list of domain hierarchically.
Parameters: element (str) – The element we are currently reading. Returns: The formatted element. Return type: str Note
For a domain like
aaa.bbb.ccc.tdl
.A normal sorting is done in the following order:
aaa
bbb
ccc
tdl
This method allow the sorting to be done in the following order:
tdl
ccc
bbb
aaa
-
classmethod