Skip to content
/ bat Public

Powerful Wordlist generation tool based on custom scripts

License

Notifications You must be signed in to change notification settings

0xF55/bat

Repository files navigation

Bat Wordlist Generation Tool

batman

Bat License Bat Starts Bat Forks

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
....

Benchmark

  • 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

Docs


Escape Charachters

Escape Code Replaced With
SP (space)
COM ,
RSA (
RCL )
DS $
EQ =
AT @

Special Variables

$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 !@

Variables

  • 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

  • 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

Lists

  • Declare a list
list=(1,2,3,4,5,6,7,8)
list2=($rndc:10,$rnds:5)
list3=(qwerty,qazxswedc,abc,6,1)

Write Output

Use @ Control Character to write to ouput file

  • Example :
@$name$age
@$name$rndn:5

Loops

  • Range:
for i=1..10
  @$name,_$i
end

Output

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
end

Output

cat wordlist.txt
Yaraqwerty
Yarasecret
Yarapassword
Yaraleet
  • Nested Loops
for i=1..10
  for j=1..10
    @$i$j
  end
end

Also you can use

for i=1..10
for j=1..10
@$i$j
end
end
  • Iterate Over File
for i=%test.txt
    @hello$i
end

Output

cat wordlist.txt
hellofromtest1
hellofromtest2
hellofromtest3
hellofromtest4
hellofromtest5

Examples:

name=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
end

Output

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

Directives

  • 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

Rules

  • You can't use @,$,= as literal value, instead use Escape Charachters

Templates

  • There is a ready for use templates in templates folder
  • Make sure to replace required variables with your values

Download & Build

  • 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

Thanks to

EmojiCombos for bat ascii art

Cobra for cli arguments

Fatih/Color for cli colors