https://github.com/secoats/spraygen
Login Spray Generator. Create common username permutations as wordlist.
https://github.com/secoats/spraygen
pentesting python3 spray usernames
Last synced: about 1 year ago
JSON representation
Login Spray Generator. Create common username permutations as wordlist.
- Host: GitHub
- URL: https://github.com/secoats/spraygen
- Owner: secoats
- Created: 2021-05-29T13:54:21.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-29T16:13:55.000Z (about 5 years ago)
- Last Synced: 2025-02-07T21:36:21.883Z (over 1 year ago)
- Topics: pentesting, python3, spray, usernames
- Language: Python
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SprayGen

This is a small script that I wrote in order to automate the annoying part of spray attacks. It creates common username permutations as a wordlist.
## Usage
```default
usage: spraygen.py [-h] [-i INPUT] [-o OUTPUT] [-d DOMAIN] [-v] [-l] [-u] [-e] [-c] [-n]
Login Spray Generator
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
File with names in "Firstname Lastname" format in each line. Single name is allowed as well.
-o OUTPUT, --output OUTPUT
Output filename
-d DOMAIN, --domain DOMAIN
Domain to use for email style usernames
-v, --verbose Print all the steps
-l, --lower Only lowercase
-u, --upper Only uppercase
-e, --emailonly Only create email addresses
-c, --nocolor Turn off color
-n, --nologo Don't print ascii logo
```
There are no library requirements. Use Python 3.x
## Examples
```bash
# Basic example
spraygen.py -i names.txt -o spraylist.txt
spraygen.py -i names.txt
```
Omitting the output filename will print the created names in the terminal directly.
You can also generate email-style usernames (e.g. `j.smith@domain.com`) using a supplied domain name:
```bash
# Create emails and regular usernames
spraygen.py -i names.txt -d test.local -o spraylist.txt
```
If you only want email addresses and nothing else, then use the `-e` / `--emailonly` parameter:
```bash
# Create only emails
spraygen.py -i names.txt -d test.local -o spraylist.txt -e
```
It is highly recommended to use the `-l` / `--lower` parameter in order to decrease the number of results. Email addresses are also usually lowercase anyway.
```bash
# only lowercase usernames
spraygen.py -i names.txt -o spraylist.txt --lower
# only lowercase emails
spraygen.py -i names.txt -o spraylist.txt -d mydomain.com -el
```
## Input
Expected input file format:
```default
Max Musterman
Eli Vance
Megatron
Steve Urban
admin
```
So either `"Firstname Lastname"` or just a single `"Username"` in each line.
I did not really optimize this thing, so if you have a large number of input names, then you might want to use some better solution.
For example, the output for the first user in that list would be:
```default
m-max
m-musterman
m.max
m.musterman
max
max-musterman
max.musterman
maxmusterman
mmax
mmusterman
musterman
musterman-max
musterman.max
mustermanmax
M-MAX
M-MUSTERMAN
M-Max
M-Musterman
M.MAX
M.MUSTERMAN
M.Max
M.Musterman
MAX
MAX-MUSTERMAN
MAX.MUSTERMAN
MAXMUSTERMAN
MMAX
MMUSTERMAN
MMax
MMusterman
MUSTERMAN
MUSTERMAN-MAX
MUSTERMAN.MAX
MUSTERMANMAX
Max
Max-Musterman
Max.Musterman
MaxMusterman
Musterman
Musterman-Max
Musterman.Max
MustermanMax
```