Introducing Another Wordlist Generator

Veniamin Viflyantsev
System Weakness
Published in
2 min readMay 11, 2023

--

Some time ago, while working on a CTF challenge, I found myself in need of a wordlist generator. I turned to the de facto standard tool “crunch”, but unfortunately, I encountered a non-standard pattern requirement. Each word had to start with the case-insensitive word “taylor” followed by two digits and a special character. Achieving this with crunch proved to be challenging, so I decided to write a simple script instead of spending time figuring out the intricacies of existing tools.

fun main() {
for (t in setOf('t', 'T'))
for (a in setOf('a', 'A'))
for (y in setOf('y', 'Y'))
for (l in setOf('l', 'L'))
for (o in setOf('o', 'O'))
for (r in setOf('r', 'R'))
for (d1 in 0..9)
for (d2 in 0..9)
for (s in setOf('!', ..., '&'))
println("""$t$a$y$l$o$r$d1$d2$s""")
}

Inspiration

This experience got me thinking that there should be a tool to generate wordlists based on more complex patterns. Thus, I decided to create one myself.

Pattern Notation

To define patterns, I chose to adopt regular expressions since they are widely used in various contexts for validation and parsing. There is abundant documentation, learning materials, and a plethora of tools available for regular expressions.

Introducing Regrunch 0.1.0

Today, I am excited to present the early version, 0.1.0, of my wordlist generator tool, named “Regrunch”. It supports basic regular expression notations such as \d*, \w+, .?, and [a-f0-9]{2,3} (a complete list of supported notations can be found here). Regrunch can generate and list all combinations that match the supplied pattern. For instance, it can generate all combinations of two and three digits: ./regrunch [0-9]{2,3}.

GitHub Repository

The source code and project details for Regrunch can be found on my GitHub repository. You can access it by clicking here.

Conclusion

Regrunch fills the gap by providing a tool to generate wordlists based on complex patterns. I invite you to try out the 0.1.0 version and provide feedback to help me enhance its capabilities.

--

--