Enpoints¶
Note
This section document what you can call directly when you use PyFunceble as an imported module.
The tool to check the availability or syntax of domains, IPv4, IPv6 or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
- 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.
-
PyFunceble.
dns_lookup
(subject, dns_server=None, complete=False, lifetime=3)[source]¶ Make a DNS lookup of the given subject.
Parameters: Returns: A dict with following index if the given subject is not registered into the given DNS server. (More likely local subjects).
{ "hostname": "", "aliases": [], "ips": [] }
A dict with following index for everything else (and if found).
{ "A": [], "AAAA": [], "CNAME": [], "MX": [], "NS": [], "TXT": [], "PTR": [] }
Return type:
-
PyFunceble.
get_complements
(subject, include_given=False)[source]¶ Provides the complements of the given subject(s).
A complement is for example
example.com
ifwww.example.com
is given and vice-versa.Parameters: Return type:
-
PyFunceble.
ipv4_syntax_check
(ip)[source]¶ Check the syntax of the given IPv4.
Parameters: ip (str|list) – The IPv4 to check the syntax for. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_domain
(subject)[source]¶ Check if the given subject is a syntactically valid domain.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_domain_malicious
(subject)[source]¶ Checks if the given domain is malicious.
Parameters: subject (str) – The subject to work with. Return type: bool
-
PyFunceble.
is_ip
(subject)[source]¶ Checks if the given subject is a syntactivally valid IPv4 or IPv6.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_ip_range
(subject)[source]¶ Check if the given subject is a syntactically valid IPv4 or IPv6 range.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The IPv4 range state. Return type: bool|dict
-
PyFunceble.
is_ipv4
(subject)[source]¶ Check if the given subject is a syntactically valid IPv4.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_ipv4_malicious
(subject)[source]¶ Checks if the given IPv4 is malicious.
Return type: bool
-
PyFunceble.
is_ipv4_range
(subject)[source]¶ Check if the given subject is a syntactically valid IPv4 range.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The IPv4 range state. Return type: bool|dict
-
PyFunceble.
is_ipv6
(subject)[source]¶ Checks if the given subject is syntactivally valid IPv6.
Parameters: subject (str, list) – The subject to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_subdomain
(subject)[source]¶ Check if the given subject is a syntactically valid subdomain.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_url
(subject)[source]¶ Check if the given subject is a syntactically valid URL.
Parameters: subject (str|list) – The subject to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
is_url_malicious
(subject)[source]¶ Checks if the given URL is malicious.
Parameters: subject (str) – The subject to work with. Return type: bool
-
PyFunceble.
load_config
(generate_directory_structure=False, custom=None)[source]¶ Load the configuration.
Parameters: Note
If
config
is given, the givendict
overwrite the last value of the given indexes in the configuration.It’s actually something like following:
pyfunceble.configuration.update(config_given_by_user)
-
PyFunceble.
syntax_check
(domain)[source]¶ Check the syntax of the given domain.
Parameters: domain (str|list) – The domain to check the syntax from. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
test
(subject, complete=False, config=None)[source]¶ Test the availability of the given subject (domain or IP).
Parameters: Returns: The status or the informations of the domain.
Return type: str|dict
Note
If
config
is given, the givendict
overwrite the last value of the given indexes in the configuration.It’s actually something like following:
pyfunceble.configuration.update(config_given_by_user)
Note
If
complete
is set toTrue
, we return the following indexes.{ "_status_source": None, "_status": None, "dns_lookup": [], "domain_syntax_validation": None, "expiration_date": None, "http_status_code": None, "ipv4_range_syntax_validation": None, "ipv4_syntax_validation": None, "ipv6_range_syntax_validation": None, "ipv6_syntax_validation": None, "status": None, "status_source": None, "subdomain_syntax_validation": None, "tested": None, "url_syntax_validation": None, "whois_record": None, "whois_server": None, }
-
PyFunceble.
url_syntax_check
(url)[source]¶ Check the syntax of the given URL.
Parameters: url (str|list) – The URL to check the syntax for. Returns: The syntax validity. Return type: bool|dict
-
PyFunceble.
url_test
(subject, complete=False, config=None)[source]¶ Test the availability of the given subject (URL).
Parameters: Returns: The status or the informations of the URL.
Return type: str|dict
Note
If
config
is given, the givendict
overwrite the last value of the given indexes in the configuration.It’s actually something like following:
pyfunceble.configuration.update(config_given_by_user)
Note
If
complete
is set toTrue
, we return the following indexes.{ "_status_source": None, "_status": None, "dns_lookup": [], "domain_syntax_validation": None, "expiration_date": None, "http_status_code": None, "ipv4_range_syntax_validation": None, "ipv4_syntax_validation": None, "ipv6_range_syntax_validation": None, "ipv6_syntax_validation": None, "status": None, "status_source": None, "subdomain_syntax_validation": None, "tested": None, "url_syntax_validation": None, "whois_record": None, "whois_server": None, }