-
Notifications
You must be signed in to change notification settings - Fork 21
Examples
bytebutcher edited this page Feb 6, 2021
·
17 revisions
Name: Decoder++
Group:
Command: dpp --dialog -f %F
[ ] Run in background
[ ] Run in terminal
[X] Output should replace selection
[ ] Show preview
Name: add Request/Response
Group: stack
Command: echo %R >> $HOME/burp-send-to.stack
[X] Run in background
[ ] Run in terminal
[ ] Output should replace selection
[ ] Show preview
Name: clear
Group: stack
Command: echo -n '' > $HOME/burp-send-to.stack
[X] Run in background
[ ] Run in terminal
[ ] Output should replace selection
[ ] Show preview
Name: diff
Group: stack
Command: meld $(paste -sd' ' $HOME/burp-send-to.stack)
[X] Run in background
[ ] Run in terminal
[ ] Output should replace selection
[ ] Show preview
Some tools require a specific header format which is not directly supported by the Burp Send-To
extension. However, with a wrapper-script we can work around it:
Name: header format
Group: misc
Command: header_script.sh %U %E
[ ] Run in background
[X] Run in terminal
[ ] Output should replace selection
[X] Show preview
header_script_1.sh
#!/bin/bash
url="${1}"
headers="$(sed ':a;N;$!ba;s/\n/\\n/g' ${2})" # Replace newlines in header-file with a literal "\n"
/path/to/tool -u "${url}" --headers "${headers}"
header_script_2.sh
#!/bin/bash
url="${1}"
headers_file="${2}"
header_options=""
while read header || [ -n "${header}" ]; do
header_options+=" -H '${header}'"
done< <(tail -n+2 "${headers_file}")
/path/to/tool -u "${url}" ${header_options}
Sometimes you might require a specific header value which is not directly supported by the Burp Send-To
extension. However, with a wrapper-script we can work around it:
Name: headers
Group: misc
Command: extract-header-value.sh %E "Content-Length"
[ ] Run in background
[X] Run in terminal
[ ] Output should replace selection
[X] Show preview
#!/bin/bash
function extract_header_value_by_key() {
_header_file="${1}"
_key="${2}"
while read line; do
key="$(echo "${line}" | cut -f1 -d':')"
value="$(echo "${line}" | cut -f2- -d' ')"
if [ "${key}" = "${_key}" ]; then
# Prints value on matching key ...
echo "${value}"
break
fi
done< "${_header_file}"
}
header_file="${1}"
key="${2}"
extract_header_value_by_key "${header_file}" "${key}"