项目作者: mh0x

项目描述 :
Permutation engine for Twitter usernames
高级语言: Python
项目地址: git://github.com/mh0x/twister.git
创建时间: 2018-05-31T20:05:11Z
项目社区:https://github.com/mh0x/twister

开源协议:MIT License

下载


Twister

Permutation engine for generating and checking the availability of malicious
Twitter usernames. Several edit operations are supported: substitution,
transposition, insertion, deletion, and prefix/suffix. Inspired by
dnstwist.

Twister Screenshot

Prerequisites

  • Python 3

Install

  1. git clone https://github.com/mh0x/twister.git

Usage

  1. usage: twister.py [-h] [-c] [-q] [-o OUTPUT] [-n THREADS]
  2. [-r RETRIES] [-t TIMEOUT] profile user [user ...]
  3. positional arguments:
  4. profile generator profile json
  5. user target username(s)
  6. optional arguments:
  7. -h, --help show this help message and exit
  8. -c, --check check availability of generated usernames
  9. -q, --quiet suppress messages sent to stdout
  10. -o OUTPUT, --output OUTPUT output results to csv file
  11. -n THREADS, --threads THREADS max concurrent requests (default: 5)
  12. -r RETRIES, --retries RETRIES max request retries (default: 2)
  13. -t TIMEOUT, --timeout TIMEOUT request timeout, secs (default: 10)
  14. edit operations: notation:
  15. {"sub": {x: [y, ...], ...}, "max": n} x, y characters
  16. {"tra": [[x, y], ...], "max": n} u strings
  17. {"ins": {x: [y, ...], ...}, "max": n} n positive integers
  18. {"del": [x, ...], "max": n}
  19. {"pre": [u, ...]}
  20. {"suf": [u, ...]}

Profiles

A generator profile is a JSON description of a pipeline of edit operations:

[ o1 , o2 , o3 ,
on ]

The output of o1 passed to o2, whose output is passed
to o3, and so on to on.

Operations

Supported edit operations are described below using the following notation:

  • x’ and ‘y’ range over characters;
  • u’ and ‘v’ range over strings;
  • n’ ranges over positive integers;
  • asterisks denote Kleene star (ignoring comma separators).

Note: Operations that perform single-character edits have a max property
that specifies their maximum edit distance.

Substitution (uxvuyv)

{"sub":{ (" x ":[ (" y ")* ])* },"max": n }

Transposition (uxyvuyxv)

{"tra":[ ([" x "," y "])* ],"max": n }

Insertion (uxvuxyv)

{"ins":{ (" x ":[ (" y ")* ])* },"max": n }

Deletion (uxvuv)

{"del":[ (" x ")* ],"max": n }

Prefix (uvu)

{"pre":[ (" v ")* ]}

Suffix (uuv)

{"suf":[ (" v ")* ]}

Examples

Some examples of individual edit operations are provided in
ops/:

Note: max values are provisionally set to 1.

Complex Profiles

The profile argument accepts a JSON string or a path to a JSON file. The
latter option is useful for specifying complex profiles. Alternatively,
individual edit operations may be saved (cf.
ops/)
and composed on the command line:

  1. twister.py [args ...] <<< echo "[$(cat op1.json), $(cat op2.json), ...]" user [user ...]

Usernames

Twitter usernames are case-insensitive strings of 1–15 characters (az,
AZ, 09, _)
[5]. Hence, user and profile
arguments are converted to lower-case.

Output

The -o/--output option outputs the results to a given file, in CSV format.
The first column contains generated usernames. If the -c/--check option is
specified, there is a second column that contains their availability status
(1 available, 0 unavailable, -1 error).

References

  1. Sloppy Typing

    https://datagenetics.com/blog/november42012/index.html

  2. Copmany Suffixes

    https://www.harborcompliance.com/information/company-suffixes

  3. List of Visually Similar Characters for Detecting Spoofing and Social
    Engineering Attacks

    https://security.stackexchange.com/a/128463

  4. ISO 639.2: Codes for the Representation of Names of Languages

    https://www.loc.gov/standards/iso639-2/php/code_list.php

  5. Help with Username Registration

    https://help.twitter.com/en/managing-your-account/twitter-username-rules

License

MIT
© 2018 mh0x

Disclaimer

Taken from MIT License:

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.