MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / generate_typosquatting

Function generate_typosquatting

aura/commands.py:222–230  ·  view source on GitHub ↗
(distance=2, limit=None, pkgs=None, format_uri="text", extended=False)

Source from the content-addressed store, hash-verified

220
221
222def generate_typosquatting(distance=2, limit=None, pkgs=None, format_uri="text", extended=False):
223 if not pkgs:
224 pkgs = typos.get_popular_packages()
225
226 f = partial(typos.damerau_levenshtein, max_distance=distance)
227 combinations = typos.generate_combinations(left=pkgs)
228
229 formatter = TyposquattingOutputBase.from_uri(format_uri)
230 formatter.output_typosquatting(islice(typos.enumerator(combinations, f, extended=extended), 0, limit))
231
232
233def cleanup(cache_tags):

Callers

nothing calls this directly

Calls 2

from_uriMethod · 0.45
output_typosquattingMethod · 0.45

Tested by

no test coverage detected