Status¶
Problematic¶
How can we efficiently and centraly manage the statuses generation and manipulation?
Documentation¶
The tool to check the availability or syntax of domains, IPv4 or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
This submodule will manage the status.
- 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 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.
-
class
PyFunceble.status.
ExtraRules
(subject, subject_type, http_status_code)[source]¶ Manage some extra rules.,
Parameters: - subject (str) – The subject we are working with.
- subject_type (str) –
The type of the subject we are working with. Should be one of the following.
domain
url
- http_status_code (str|int) – The extracted status code.
-
_ExtraRules__blogspot
()¶ Handle the blogspot SPECIAL case.
Returns: (new status, new source)
orNone
if there is any change to apply.Return type: tuple|None
-
_ExtraRules__handle_http_code
(previous_state)¶ Handle the HTTP Code status escalation.
Parameters: previous_state (str) – The previously catched status. Returns: (new status, new source)
orNone
if there is any change to apply.Return type: tuple|None
-
_ExtraRules__handle_ipv4_range
()¶ Handle the IP range status escalation.
Returns: (new status, new source)
orNone
if there is any change to apply.Return type: tuple|None
-
_ExtraRules__handle_potentially_inactive
(previous_state)¶ Handle the potentially inactive case.
Parameters: previous_state (str) – The previously catched status. Returns: (new status, new source)
orNone
if there is any change to apply.Return type: tuple|None
-
_ExtraRules__handle_potentially_up
()¶ Handle the potentially up case.
Returns: (new status, new source)
orNone
if there is any change to apply.Return type: tuple|None
-
classmethod
_ExtraRules__http_status_code_up
()¶ Set what we return for the HTTP Code status escalation.
Returns: (new status, new source)
Return type: tuple
-
classmethod
_ExtraRules__special_down
()¶ Set what we return for the SPECIAL status de-escalation.
Returns: (new status, new source)
Return type: tuple
-
classmethod
_ExtraRules__special_up
()¶ Set what we return for the SPECIAL status escalation.
Returns: (new status, new source)
Return type: tuple
-
_ExtraRules__wordpress_dot_com
()¶ Handle the wordpress.com SPECIAL case.
Returns: (new status, new source)
orNone
if there is any change to apply.Return type: tuple|None
-
class
PyFunceble.status.
Status
(subject, subject_type='domain', filename=None, whois_db=None, inactive_db=None)[source]¶ Handle the research of the domain status.
Parameters: - subject (str) – The subject we are working with.
- subject_type (str) –
The type of the subject. Should be one of the following.
domain
file_domain
- whois_db (
PyFunceble.whois_db.WhoisDB()
) – An instance of the whois database. - filename (str) – The name of the file we are working with.
-
handle
(status, ip_validation_status)[source]¶ Handle the lack of WHOIS and expiration date. :smile_cat:
Parameters: - matched_status (str) – The status that we have to handle.
- ip_validation_status (str) – The IP syntax validation.
Returns: The status of the domain after generating the files desired by the user.
Return type: str
-
class
PyFunceble.status.
SyntaxStatus
(subject, subject_type='domain', filename=None)[source]¶ Generate everything around the catched status when testing for Syntax.
Parameters: - subject (str) – The subject we are working with.
- subject_type (str) – The type of the subject.
- filename (str) – The name of the file we are working with.
-
class
PyFunceble.status.
URLStatus
(subject, subject_type='url', filename=None, inactive_db=None)[source]¶ Generate everything around the catched status when testing for URL.
Parameters: - subject (str) – The subject we are working with.
- subject_type (str) – The type of the subject.
- filename (str) – The name of the file we are working with.