Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding permutator feature for usernames #1575

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

balestek
Copy link

@balestek balestek commented Jun 7, 2024

("", "_", "-", ".") when id_type == username

File : maigret/permutator.py

Arg : --permute

For now, only permute from 2 elements and doesn't return single elements (element1, _element1, element1_, element2, _element2, element2_, ...). 12 permuts for 2 elements.

To return single elements as well, Permute(usernames).gather(method="all"), but not implemented in maigrat.py. 18 permuts for 2 elements. Should we ? With another argument ?

("", "_", "-", ".") when id_type == username

File : maigret/permutator.py

Arg : --permute

For now, only permute from 2 elements and doesn't return single elements (element1, _element1, element1_,  element2, _element2, ...). 12 permuts for 2 elements.

To return single elements as well, Permute(usernames).gather(method="all"), but not implemented in maigrat.py. 18 permuts for 2 elements. Should we ? With another argument ?
@balestek
Copy link
Author

balestek commented Jun 8, 2024

A bit more.

It helps to find user accounts when we have only a few elements to work with by generating possible combinations.

It permutes username entries with separators in the middle (empty string, underscore, hyphen, and period) using the option --permute, generating combinations to search for. It also adds combinations with an underscore at the beginning and end of elements that are separated by an empty string.

--permute: searches for all generated elements but doesn't return single entries.

maigret balestek 86 --permute generates and searches for 12 combinations:

balestek86
_balestek86
balestek86_
balestek_86
balestek-86
balestek.86
86balestek
_86balestek
86balestek_
86_balestek
86-balestek
86.balestek

but not balestek, _balestek, balestek_ 86, _86, and 86_

Implementing +single entries can be easily done later with another argument, --permuteall. In that case, it would generates 18 combinations.

It also works for three, four, five, or more elements, but it takes longer to search and produces more matches to check (for example, for three elements, it generates 72 combinations). Nonetheless, it can be useful in certain cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant