nbs-system / nxtool-ng

Because life is too short to waste your time transforming naxsi logs to rules by hand
42 stars 13 forks source link

Implement regexp factorization #20

Open jvoisin opened 7 years ago

jvoisin commented 7 years ago

It would be great to be able to factorize results like those ones:

BasicRule wl:1015 "mz:$URL:/api/fr/contents|$ARGS_VAR:type" "msg:Variable zone-wide on a specific url if it matches a comma";
BasicRule wl:1015 "mz:$URL:/api/ar/contents|$ARGS_VAR:type" "msg:Variable zone-wide on a specific url if it matches a comma";
BasicRule wl:1015 "mz:$URL:/api/en/contents|$ARGS_VAR:type" "msg:Variable zone-wide on a specific url if it matches a comma";
jvoisin commented 7 years ago

Things like this

BasicRule wl:1015 "mz:$URL:/api/contents/pouet|$ARGS_VAR:type" "msg:Variable zone-wide on a specific url if it matches a comma";
BasicRule wl:1015 "mz:$URL:/api/contents|$ARGS_VAR:type" "msg:Variable zone-wide on a specific url if it matches a comma";

should be simplified in

BasicRule wl:1015 "mz:$URL:/api/contents|$ARGS_VAR:type" "msg:Variable zone-wide on a specific url if it matches a comma";