diff --git a/CHANGELOG.md b/CHANGELOG.md index a1fd3fdf..7af9a933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this add-on will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- targeted/SQLMapCommandGenerator.js - it will generate and copy sqlmap command based on the request + ### Changed - Update minimum ZAP version to 2.12.0: - Remove compatibility code that provided the singletons (`control` and `model`) in JavaScript scripts, they can now be accessed directly always. diff --git a/targeted/SQLMapCommandGenerator.js b/targeted/SQLMapCommandGenerator.js new file mode 100644 index 00000000..3983c74b --- /dev/null +++ b/targeted/SQLMapCommandGenerator.js @@ -0,0 +1,30 @@ +//it will generate and copy sqlmap command based on the request +//released under the Apache v2.0 licence. +//You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +//author: @juliosmelo + + +function invokeWith(msg) { + var string = "sqlmap --url '"+msg.getRequestHeader().getURI().toString()+"' \\\n"; + var header = msg.getRequestHeader().getHeadersAsString(); + header = header.split(msg.getRequestHeader().getLineDelimiter()); + + for(var i=0;i