<commit_before># Typogenerator: a typosquatting generator in Golang

A Golang typosquat generator utilizing various strategies to generate potential variants of a string. Some strategies are similar to those utilized by [dnstwist](https://github.com/elceef/dnstwist). This library is not intended to be a complete port of dnstwist and may include additional strategies.

## Usage

See files under `cmd/` for example usage.
<commit_msg>Update README with Fuzz and FuzzDomain examples<commit_after># Typogenerator: a typosquatting generator in Golang

A Golang typosquat generator utilizing various strategies to generate potential variants of a string. Some strategies are similar to those utilized by [dnstwist](https://github.com/elceef/dnstwist). This library is not intended to be a complete port of dnstwist and may include additional strategies.

## Usage

See files under `cmd/` for example usage.

### Fuzz

```
all := []strategy.Strategy{
	strategy.Omission,
	strategy.Repetition,
}

results, err := typogenerator.Fuzz("zenithar", all...)
if err != nil {
	fmt.Println(err)
}

for _, r := range results {
	for _, p := range r.Permutations {
		fmt.Println(p)
	}
}

// enithar
// znithar
// zeithar
// zenthar
// ...
```

### FuzzDomain

```
all := []strategy.Strategy{
	strategy.Omission,
	strategy.Repetition,
}

results, err := typogenerator.FuzzDomain("example.com", all...)
if err != nil {
	fmt.Println(err)
}

for _, r := range results {
	for _, p := range r.Permutations {
		fmt.Println(p)
	}
}

// xample.com
// eample.com
// exmple.com
// exaple.com
// ...
```

{'fraction_non_alphanumeric': 0.11746031746031746, 'fraction_numerical': 0.0, 'mean_word_length': 3.9559748427672954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4241231', 'n_tokens_mistral': 525, 'n_tokens_neox': 512, 'n_words': 168}