MCPcopy Create free account

hub / github.com/atenreiro/opensquat / functions

Functions180 in github.com/atenreiro/opensquat

↓ 24 callersFunction_mock_response
Build a MagicMock response. The explicit `headers` default to `{}` (not a MagicMock). Without this, `response.headers.get("Retry-After")
tests/test_api_client.py:21
↓ 21 callersMethodlookalike
Query the lookalike endpoint for a single keyword. Args: keyword: brand/term to search for (URL-encoded internally)
opensquat/api_client.py:109
↓ 11 callersMethodmain
( self, keywords_file, confidence_level, domains_file, dns, do
opensquat/app.py:430
↓ 9 callersFunctionload_api_key
Resolve the openSquat API key from CLI > env var > key file. Args: cli_value: value from --api-key flag, or None/empty key_f
opensquat/auth.py:26
↓ 7 callersMethod_extract_detail
Extract a human-readable error detail from an HTTP response. Preference order: 1. JSON body's "detail" field (for well-f
opensquat/api_client.py:228
↓ 7 callersMethod_print_result
Helper to print to buffer or stdout (with reset style)
opensquat/dns_validator.py:41
↓ 7 callersMethod_run
Run get_args with a fake sys.argv and return the Namespace.
tests/test_arg_parser.py:13
↓ 7 callersMethodclose
(self)
opensquat/api_client.py:184
↓ 5 callersMethod_build_headers
(self)
opensquat/feed_manager.py:31
↓ 4 callersMethodcheck_certificate
(cls, domain: str)
opensquat/ct.py:36
↓ 4 callersMethodcheck_domain
Check the domain reputation using DNS resolvers (Quad9). Prints results (or writes to buffer) and updates malicious list.
opensquat/dns_validator.py:15
↓ 4 callersFunctionmask_key
Mask an API key for safe display in error messages and logs. Returns 'os_abcde...wxyz' style for keys long enough, otherwise '***'.
opensquat/auth.py:82
↓ 3 callersMethod_run
(self, argv)
tests/test_arg_parser.py:114
↓ 3 callersMethoddownload
Downloads the latest registered domains.
opensquat/feed_manager.py:119
↓ 2 callersMethod__init__
(self, api_key, base_url=None, timeout=DEFAULT_TIMEOUT, session=None)
opensquat/api_client.py:96
↓ 2 callersMethod_domain_contains
(self, keyword, domain)
opensquat/squatting_detector.py:66
↓ 2 callersFunction_ok_response
(content=b"example.com\n", status=200)
tests/test_feed_manager.py:11
↓ 2 callersMethod_read_keywords
Load the keywords file into self.list_file_keywords.
opensquat/app.py:144
↓ 2 callersMethod_run
(self, argv)
tests/test_arg_parser.py:67
↓ 2 callersMethod_run
(self, argv)
tests/test_arg_parser.py:94
↓ 2 callersMethodcheck
(self)
opensquat/check_update.py:31
↓ 2 callersMethodcheck_latest_feeds
Checks if the local feed file is up to date by comparing MD5 checksums. Premium feeds skip the freshness check entirely (no .md5 sibl
opensquat/feed_manager.py:72
↓ 2 callersFunctionlevenshtein
Compute Levenshtein distance using native Python. When threshold is provided, applies early exit optimizations: - Skips computation if l
opensquat/validations.py:12
↓ 2 callersFunctionmain
()
opensquat/cli.py:157
↓ 1 callersMethodURL_contains
(keyword, phishing)
opensquat/phishing.py:44
↓ 1 callersFunction_build_csv_rows
Build the CSV output rows: a header row followed by one data row per domain. Premium API mode populates the metadata columns from Lookali
opensquat/cli.py:81
↓ 1 callersFunction_build_json_content
Build the JSON output structure: a list of per-keyword objects, each with a "domains" array of {"domain": ..., ...} dicts. In Premium AP
opensquat/cli.py:50
↓ 1 callersMethod_extract_balance
(response)
opensquat/api_client.py:248
↓ 1 callersMethod_on_contains
(self, keyword, domain, result_buffer, result_domains)
opensquat/squatting_detector.py:142
↓ 1 callersMethod_on_homograph
(self, keyword, domain, value, result_buffer, result_domains)
opensquat/squatting_detector.py:135
↓ 1 callersMethod_on_similarity
(self, keyword, domain, value, result_buffer, result_domains)
opensquat/squatting_detector.py:128
↓ 1 callersMethod_parse_success
(keyword, response)
opensquat/api_client.py:196
↓ 1 callersFunction_print_mode_summary
Print the mode-specific lines of the run summary.
opensquat/cli.py:108
↓ 1 callersMethod_process_doppelganger
(self, keyword, domain, original_domain, result_buffer, result_domains)
opensquat/squatting_detector.py:91
↓ 1 callersMethod_process_levenshtein
(self, keyword, domain, homograph_domain, original_domain, result_buffer, result_domains)
opensquat/squatting_detector.py:69
↓ 1 callersMethod_read_domains
Load the domain feed file into self.list_file_domains.
opensquat/app.py:134
↓ 1 callersFunction_read_first_usable_line
Return the first non-comment, non-blank, stripped line of a text file. Returns None if no usable line is found.
opensquat/auth.py:69
↓ 1 callersMethod_run
(self, argv)
tests/test_arg_parser.py:136
↓ 1 callersMethod_run_api_worker
Run --api mode. One APIClient shared across a thread pool, one task per keyword. Honors --dns by annotating each returned domain and
opensquat/app.py:285
↓ 1 callersMethod_safe_filename
Extract and validate local filename from feed URL. Prevents path traversal attacks from crafted URLs.
opensquat/feed_manager.py:38
↓ 1 callersFunction_serialize_domain
Serialize a LookalikeDomain into a JSON-friendly dict. Optional fields (tld, date, unicode) are omitted when they're None so the output
opensquat/cli.py:29
↓ 1 callersMethodas_csv
Save to CSV. self.content must be a list of rows, where each row is a list of column values. The first row is treated as the
opensquat/output.py:51
↓ 1 callersMethodas_json
save to json. Args: none Return none
opensquat/output.py:38
↓ 1 callersMethodas_text
save to plain text. Args: none Return none
opensquat/output.py:73
↓ 1 callersMethodcheck_phishing
(self)
opensquat/phishing.py:56
↓ 1 callersMethodconnect
(self)
opensquat/port_check.py:53
↓ 1 callersMethodcount_domains
Count number of domains (lines) from the domains file. Args: none Return: self.domain_total: total
opensquat/file_input.py:29
↓ 1 callersMethodcount_files
(self)
opensquat/app.py:128
↓ 1 callersMethodcount_keywords
Count number of keywords from the keyword file the counter will ignore the chars "#", "\n" and " ". Args: none
opensquat/file_input.py:56
↓ 1 callersMethodcount_keywords
(self)
opensquat/phishing.py:50
↓ 1 callersMethoddns_query
(self)
opensquat/dns_resolvers.py:37
↓ 1 callersMethoddomain_report
Fetch the VT domain report and return [harmless, malicious]. Returns: list[int]: [harmless_votes, malicious_votes]. Retu
opensquat/vt.py:59
↓ 1 callersMethodensure_feeds
Ensures that the feed file exists and is up to date.
opensquat/feed_manager.py:176
↓ 1 callersMethodmain
main function that will call other functions. Args: keyword: keyword to search for(duh) Return: non
opensquat/phishing.py:148
↓ 1 callersMethodprint_info
Method to print some configuration information.
opensquat/app.py:159
↓ 1 callersMethodprint_info_api
Method to print configuration info for Premium API mode (no feed).
opensquat/app.py:169
↓ 1 callersMethodread_files
Method to read domain and keywords files (community/premium modes).
opensquat/app.py:152
↓ 1 callersMethodset_apikey
(self, api_key_file)
opensquat/vt.py:32
↓ 1 callersMethodset_content
(self, file_content)
opensquat/output.py:88
↓ 1 callersMethodset_domain
(self, domain)
opensquat/vt.py:56
↓ 1 callersMethodset_domain
(self, domain)
opensquat/port_check.py:35
↓ 1 callersMethodset_domain
(self, domain)
opensquat/dns_resolvers.py:34
↓ 1 callersMethodset_domains_file
(self, domains_file)
opensquat/file_input.py:23
↓ 1 callersMethodset_filename
(self, file_name)
opensquat/output.py:91
↓ 1 callersMethodset_filetype
(self, file_type)
opensquat/output.py:94
↓ 1 callersMethodset_keywords
(self, keywords)
opensquat/phishing.py:40
↓ 1 callersMethodset_keywords_file
(self, keywords_file)
opensquat/file_input.py:26
↓ 1 callersMethodsubdomains
Fetch the list of subdomains of self.domain from VirusTotal. Returns: list[str]: list of subdomain strings. Returns an e
opensquat/vt.py:112
↓ 1 callersMethodupdate_db
(self)
opensquat/phishing.py:103
↓ 1 callersMethodwait
(self)
opensquat/app.py:67
↓ 1 callersMethodworker
Method that will compute all the similarity calculations between the keywords and domain names.
opensquat/app.py:205
Method__enter__
(self)
opensquat/api_client.py:187
Method__exit__
(self, *exc)
opensquat/api_client.py:190
Method__init__
Initiator.
opensquat/check_update.py:26
Method__init__
Initiator.
opensquat/file_input.py:16
Method__init__
(self, confidence_level=2, doppelganger_only=False, dns_validator=None)
opensquat/squatting_detector.py:15
Method__init__
(self)
opensquat/output.py:32
Method__init__
(self, use_dns=False)
opensquat/dns_validator.py:12
Method__init__
Initiator.
opensquat/vt.py:26
Method__init__
(self, rate_per_sec)
opensquat/app.py:59
Method__init__
Initiator.
opensquat/app.py:96
Method__init__
(self)
opensquat/phishing.py:30
Method__init__
Initiator.
opensquat/port_check.py:28
Method__init__
initiator.
opensquat/dns_resolvers.py:28
Method__init__
(self, message, balance=0)
opensquat/api_client.py:69
Method__init__
(self, message, retry_after=10)
opensquat/api_client.py:78
Method__init__
( self, _id, logget_at, not_before, not_after, matching_ident, issuer_name )
opensquat/ct.py:19
Method__init__
( self, feed_url="https://feeds.opensquat.com/opensquat-nrd-latest.txt", api_key=None,
opensquat/feed_manager.py:19
Method_api_keyword_task
Worker for one keyword in API mode. Runs in a thread.
opensquat/app.py:230
Methodcheck
Checks a single keyword against a list of domains. This method is designed to be run in a separate process.
opensquat/squatting_detector.py:28
Functioncheck_homograph
Check if domain contain homograph character. Args: none Return: none
opensquat/homograph.py:15
Methodcheck_socket
(self, host, port)
opensquat/port_check.py:38
Functionget_args
Parser main function. Args: none Return: args: returns arguments
opensquat/arg_parser.py:62
Functionhomograph_to_latin
Convert homograph domain to LATIN characters. Args: none Return: none
opensquat/homograph.py:33
Methodmain
(self)
opensquat/check_update.py:87
Methodmain
(self, keywords_file, domains_file)
opensquat/file_input.py:83
Methodmain
main function that will call other functions. Args: file_name: file name (duh) file_type: file type (txt, js
opensquat/output.py:97
Methodmain
Run a VirusTotal lookup. Args: domain: domain to look up mode: "report" (default) returns [harmless, malicio
opensquat/vt.py:151
Methodmain
(self, domain)
opensquat/port_check.py:66
Methodmain
main function that will call other functions. Args: domain: the domain name (duh) Return: none
opensquat/dns_resolvers.py:65
next →1–100 of 180, ranked by callers