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 domains, IPv4, IPv6 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:
MIT License
Copyright (c) 2017, 2018, 2019, 2020 Nissar Chababy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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)[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:
MySQL()
¶
-
class
PyFunceble.engine.mysql.
MySQL
[source]¶ Provides our way to work with our mysql/mariadb database.
Provides the authorization to operate.
-
create_tables_and_apply_patches
()[source]¶ Creates the tables of the database and apply the patches.
-
errors
¶ alias of
pymysql.err.IntegrityError
Sort()
¶
-
class
PyFunceble.engine.sort.
Sort
[source]¶ Provides some sorting presets which we can parse to
PyFunceble.helpers.list.List.custom_format
.-
classmethod
hierarchical
(element)[source]¶ The idea behind this method is to sort a list of domain hierarchicaly.
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