internetnl_scan package
Submodules
internetnl_scan.internetnl_classes module
internetnl_scan.main module
internetnl_scan.utils module
Utilities for the internetnl tool
- class internetnl_scan.utils.Credentials(service_name='Internet.nl')[source]
Bases:
objectstores the user credentials in a key ring
- internetnl_scan.utils.get_clean_url(url, cache_dir=None)[source]
Turns an url into a clean url and adds it
- internetnl_scan.utils.get_urls_from_domain_file(domain_file: str | Path, url_column_key: str | None = None, sep: str = ',', column_number: int = 0) list[source]
Get urls from a file name
- Parameters:
domain_file (str) – the file name to be read
url_column_key (str, optional) – The name of the column containing the url values. Defaults to None, meaning
header (that the file does not have a)
sep (str, optional) – The separator of the file
column_number (int, optional) – The column number to read in case no header is given
- Returns:
list of cleaned url’s
- Return type:
- internetnl_scan.utils.make_cache_file_name(directory, scan_id, scan_type)[source]
build the cache file name
- internetnl_scan.utils.query_yes_no(question, default_answer='no')[source]
Ask a yes/no question via raw_input() and return their answer.
- internetnl_scan.utils.remove_sub_domain(url: str) str[source]
remove www or any other subdomain from the url
- internetnl_scan.utils.remove_sub_domains(urls_to_scan: list) list[source]
remove www or any other subdomain from the url
- internetnl_scan.utils.response_to_dataframe(response)[source]
Convert the Internet.nl response to pandas dataframe
- Parameters:
response – the returned response ot the Internet.nl API
- Returns:
Pandas dataframe