Kharma: a new alternative to Dharma for grammar-based fuzzing
Grammar-based fuzzing
As a developer, you’ve probably had to test code at some point. One of the most effective ways to do it is fuzzing: feeding random inputs to your program to trigger unexpected behavior. Tools like Dharma generate these inputs from a grammar.
Creating Kharma
Dharma was no longer maintained and lacked some features I wanted, so I wrote my own version: Kharma. It adds several features that weren’t available in Dharma:
- Writing functions inside the grammar in Python, which is very useful for generating more complex inputs
- Generating random strings from regular expressions
If you’d like to try it, Kharma is available on GitHub.