Status

Problematic

How can we gather, manage and provide a status for a given subject ?

Documentation

The tool to check the availability or syntax of domain, IP or URL.

██████╗ ██╗   ██╗███████╗██╗   ██╗███╗   ██╗ ██████╗███████╗██████╗ ██╗     ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║   ██║████╗  ██║██╔════╝██╔════╝██╔══██╗██║     ██╔════╝
██████╔╝ ╚████╔╝ █████╗  ██║   ██║██╔██╗ ██║██║     █████╗  ██████╔╝██║     █████╗
██╔═══╝   ╚██╔╝  ██╔══╝  ██║   ██║██║╚██╗██║██║     ██╔══╝  ██╔══██╗██║     ██╔══╝
██║        ██║   ██║     ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝        ╚═╝   ╚═╝      ╚═════╝ ╚═╝  ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝

Provides the status 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.

GathererBase()

class PyFunceble.status.gatherer_base.GathererBase(subject, filename=None, whois_db=None, inactive_db=None)[source]

Provides the gatherer base.

Parameters:
  • subject (str) – The subject to gather data for.
  • filename (str) – The filename which the subject is associated with.
  • whois_db – An instance of the whois db interface.
  • inactive_db – An instance of the inactive db interface.
gather_http_status_code()[source]

Univertialy gather the status code.

get()[source]

Provides the status.

Status()

class PyFunceble.status.status.Status(subject)[source]

The status object.

Provides the result of one of the status gatherer.

Parameters:

subject (str) – The subject which we describe.

Variables:
  • _status_source (str) – The status source before the application of our extra rules (if activated).
  • _status (str) – The status before the application of our extra rules (if activated).
  • dns_lookup (list) – The result of the DNS Lookup logic.
  • domain_syntax_validation (bool) – The domain syntax validation status.
  • expiration_date (str) – The expiration date of the subject.
  • http_status_code (str) – The HTTP status code of the subject.
  • ipv4_range_syntax_validation (bool) – The IPv4 range validation status.
  • ipv4_syntax_validation (bool) – The IPv4 syntax validation status.
  • ipv6_range_syntax_validation (bool) – The IPv6 range validation status.
  • ipv6_syntax_validation (bool) – The IPv6 syntax validation status.
  • status_source (str) – The final status source.
  • status (str) – The final status.
  • subdomain_syntax_validation (bool) – The subdomain syntax validation status.
  • tested (str) – The tested subject.
  • url_syntax_validation (bool) – The URL syntax validation status.
  • whois_server (str) – The WHOIS server we contact-ed to get the WHOIS record.
  • whois_record (str) – The WHOIS record.
get()[source]

Provides the status in a dict format.

Availability: DomainAndIp()

class PyFunceble.status.availability.domain_and_ip.DomainAndIp(subject, filename=None, whois_db=None, inactive_db=None)[source]

Gather the availability of the given IP or Domain.

_DomainAndIp__gather()

Process the gathering.

_DomainAndIp__gather_expiration_date()

Gather the expiration date.

_DomainAndIp__gather_extra_rules()

Handle the lack of WHOIS record.

Availability: ExtraRules()

class PyFunceble.status.availability.extra_rules.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) or None 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) or None if there is any change to apply.
Return type:tuple|None
_ExtraRules__handle_ip_range()

Handle the IP range status escalation.

Returns:(new status, new source) or None 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) or None 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) or None if there is any change to apply.
Return type:tuple|None
_ExtraRules__handle_reputation()

Handle the reputation escalation.

Returns:(new status, new source) or None 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
_ExtraRules__special_down_404()

Set what we return for the SPECIAL status de-escalation when the 404 status code is caught.

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) or None if there is any change to apply.
Return type:tuple|None
handle(previous_state, previous_source)[source]

Globally handle the case of the currently tested domain.

Availability: Url()

class PyFunceble.status.availability.url.Url(subject, filename=None, whois_db=None, inactive_db=None)[source]

Gather the availability of the given URL.

_Url__gather()

Process the gathering.

Reputation: DomainAndIp()

class PyFunceble.status.reputation.domain_and_ip.DomainAndIp(subject, filename=None, whois_db=None, inactive_db=None)[source]

Gather the reputation of the given domain or IP.

_DomainAndIp__gather()

Process the gathering.

Reputation: Url()

class PyFunceble.status.reputation.url.Url(subject, filename=None, whois_db=None, inactive_db=None)[source]

Gather the reputation of the given URL (base).

_Url__gather()

Process the gathering.

Syntax: DomainAndIp()

class PyFunceble.status.syntax.domain_and_ip.DomainAndIp(subject, filename=None, whois_db=None, inactive_db=None)[source]

Gather the availability of the given IP or Domain.

_DomainAndIp__gather()

Process the gathering.

Syntax: Url()

class PyFunceble.status.syntax.url.Url(subject, filename=None, whois_db=None, inactive_db=None)[source]

Gather the syntax of the given URL.

_Url__gather()

Process the gathering.