vegeta
vegeta copied to clipboard
Proposal: extra properties in the targets file
Proposal
Ability to pass extra properties in the targets file and these properties shouldn't be passed to the final query but they should be passed to the results file.
Background
I need to fine-track the results of specific targets in order to test database indices. For this reason, I need to insert basic key=value extra infos (for example: query_type=like,keyword_type=random), in the targets file, and I should get these infos in the results file. It will help me to get more infos.
The suggested final format would be, for json, adding a property "extra":
{"method":"GET","url":"http://goku","body":"UHVuY2gh","header":{"Content-Type":["text/plain"]},"extra":{"firstkey":"firstvalue","secondkey":"secondvalue"}}
And for the HTTP format, comments beginning with "extra":
GET http://user:password@goku:9090/path/to
X-Account-ID: 8675309
#extra:key=value
DELETE http://goku:9090/path/to/remove
Confirmation-Token: 90215
Authorization: Token DEADBEEF
#extra:firstkey=firstvalue
#extra:secondkey=secondvalue
Workarounds
Right now, the only known way is to separate the attacks and give them a different name each time, or to use the X-Vegeta-Seq header but we can't trace it in the results file.
Proposed Implementation
fork https://github.com/falconandy/vegeta commit https://github.com/falconandy/vegeta/commit/ee914c1d1fd854bce2daa4cc904034987a915cb0