bat is tool & DSL language for wordlist generating
-
Why bat ? :
- fast Generating & Parsing (Golang Based)
- Easy syntax
- Allow many patterns
- User Friendly
- Flexible (No Specific Pattern)
-
Example:
name=victim
age=25
for i=2000..2026
@$name$age,_$i
@$!name$age,_$i
end
- Sample of Output:
victim25_2000
mitciv25_2000
victim25_2001
mitciv25_2001
victim25_2002
mitciv25_2002
victim25_2003
mitciv25_2003
victim25_2004
mitciv25_2004
victim25_2005
mitciv25_2005
victim25_2006
....
-
For 2 million password with complex patterns
-
Kali VMWare 5gb ram,2 cpu cores
-
Time: about 20 second
➜ bat time ./bat -q
./bat -q 18.61s user 2.79s system 105% cpu 20.197 total
| Escape Code | Replaced With |
|---|---|
SP |
(space) |
COM |
, |
RSA |
( |
RCL |
) |
DS |
$ |
EQ |
= |
AT |
@ |
$rndn:length Returns a random number with specific length
$rndc:length Returns a random string with specific length
$rnds:length Returns a random special chars with specific length
- Example:
- $rndn:10 returns 2195325923
- $rndc:5 returns gAWrl // example
- $rnds:2 returns !@
- Declare a variable
name=bat
age=25
phone=1337
// nested variable
name2=$name$age$phone // bat251337
test=$name$rnds:3
// , to separate between variable and literal value
name3=$name,qwerty-
Modifiers are characters that change the pattern of the variable
-
Example:
name=aura
upper=$+name
lower=$-upper
zigzag=$~name
reversed=$!name
capitaltized=$^name
@*@*write all variables in the same order to output file
Output
cat wordlist.txt
aura
AURA
aura
aUrA
arua
Aura- Declare a list
list=(1,2,3,4,5,6,7,8)
list2=($rndc:10,$rnds:5)
list3=(qwerty,qazxswedc,abc,6,1)Use @ Control Character to write to ouput file
- Example :
@$name$age
@$name$rndn:5- Range:
for i=1..10
@$name,_$i
endOutput
Get-Content wordlist.txt
mohamed_1
mohamed_2
mohamed_3
mohamed_4
mohamed_5
mohamed_6
mohamed_7
mohamed_8
mohamed_9- Loop with zero padding
for i=1.100
@$i
end
Sample
001
002
003
004
...
- List
list=(qwerty,secret,password,leet)
name=Yara
for i=$list
@$name$i
endOutput
cat wordlist.txt
Yaraqwerty
Yarasecret
Yarapassword
Yaraleet- Nested Loops
for i=1..10
for j=1..10
@$i$j
end
endAlso you can use
for i=1..10
for j=1..10
@$i$j
end
end- Iterate Over File
for i=%test.txt
@hello$i
endOutput
cat wordlist.txt
hellofromtest1
hellofromtest2
hellofromtest3
hellofromtest4
hellofromtest5name=test
for i=1970..2026
@$name$i
@$+name$i
@$~name$i
end
Output
test1970
TEST1970
tEsT1970
test1971
TEST1971
tEsT1971
test1972
TEST1972
tEsT1972
test1973
TEST1973
tEsT1973
test1974
TEST1974
tEsT1974
test1975
TEST1975
tEsT1975
test1976
TEST1976
tEsT1976
test1977
TEST1977
tEsT1977
..... // till 2025- Example2:
name=mohamed
for i=1..1000
@$name,_$rndn:5
endOutput
mohamed_80939
mohamed_15960
mohamed_41304
mohamed_62122
mohamed_76753
mohamed_11165
mohamed_29215
mohamed_46849
mohamed_67054
mohamed_43134
mohamed_55809
mohamed_97010
mohamed_16121
.... // 1000 lines- Example3:
name=john
father=doe
for i=1..1000
@$^name$^father$rndc:3
end
Output
JohnDoeFlX
JohnDoeyAm
JohnDoeYTd
JohnDoewKI
JohnDoeTwN
JohnDoeogc
JohnDoelYb
JohnDoeKbo
JohnDoemJG
JohnDoeLrc
JohnDoeIEh
JohnDoeyQI
JohnDoeWpj
JohnDoeBtg
JohnDoemth
JohnDoeTUp
JohnDoeFFP
... // 1000 line
- Example4:
name=bat
for y=1970..2026
for m=1..13
for d=1..31
@$name$y:$m:$d
end
end
end
Output
.\bat.exe -i main.bs
Wordlist: wordlist.txt
BatFile: main.bs
Generated Lines: 20160
- Sample of output
bat1970:1:1
bat1970:1:2
bat1970:1:3
bat1970:1:4
bat1970:1:5
bat1970:1:6
bat1970:1:7
bat1970:1:8
bat1970:1:9
bat1970:1:10
bat1970:1:11
... till 2025
-
Directive is a command given to the parser to change its behaviour
-
Directive Symbol is
| -
Example:
Change The Charset
-
charset is used for random generating
-
charset lower only
|charset:lower
- charset upper only
|charset:upper
- all
|charset:all
- add numbers to charset
|charset:with_numbers
- custom
|charset:abcfyl
- Same for special chars
Note! Dont use literal value here like @ or , or =,.. Use Escape Charachters
|special:`AT``COM``EQ`
- Try to make the code tidy like in documentation
- You can't use @,$,= as literal value, instead use Escape Charachters
- There is a ready for use templates in templates folder
- Make sure to replace required variables with your values
-
You can download precompiled binaries from releases page
-
Build Source:
git clone https://github.com/0xF55/bat.git
cd bat
make build
cd bin-
Then you can run the executable
-
For maximum speed, it's recommended to use quiet mode
-q
EmojiCombos for bat ascii art
Cobra for cli arguments
Fatih/Color for cli colors
