AFLplusplus / Grammar-Mutator

A grammar-based custom mutator for AFL++
Apache License 2.0
215 stars 18 forks source link

Enhancement: name lib and grammar generator with name of the grammar type #12

Closed vanhauser-thc closed 3 years ago

vanhauser-thc commented 3 years ago

when compiling for a grammar compiling new would overwrite an existing one. also from the lib name it is not clear for which grammar it is.

proposal: simply name the resulting grammar generator and lib with the grammar type, e.g. libgrammarmutator-json.so

h1994st commented 3 years ago

I was thinking about this.

What about appending the grammar file name to the generated library? It looks a bit long. For example:

Or let the user specify a short name, so the name of the generated library can be shorter. Otherwise, we can fall back to the default naming, by appending the grammar file name to the library name.

h1994st commented 3 years ago

Updated the building scripts to append a suffix to the grammar mutator lib and grammar_generator.

Please take a look at the latest commits in dev branch

vanhauser-thc commented 3 years ago

I made a few changes, e.g. renaming to lowercase letter and removing everything after _.- to keep the name short. also made it a make option.

additionally I updated the documentation.

a few other things that could be done:

but I leave that decision to you.

h1994st commented 3 years ago

Thanks!