diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-27 21:57:57 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-27 21:57:57 +0700 |
| commit | eaffbf8780e370ecec4e9bbc534694b8a815a86a (patch) | |
| tree | 53d5f36d7059fdcf58824ab36cad103dc0d2fd08 /_www | |
| parent | a098c7d1641299e14ddfa88800922c128feff2d0 (diff) | |
| download | gorankusu-eaffbf8780e370ecec4e9bbc534694b8a815a86a.tar.xz | |
all: change the Run result to return dump of HTTP request and response
Previously, we display the actual response of the HTTP target only
on the user interface.
This changes make the Run function to display the actual HTTP request and
response that being send and received on HTTP target.
Diffstat (limited to '_www')
| -rw-r--r-- | _www/index.js | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/_www/index.js b/_www/index.js index 5512b14..a902ad1 100644 --- a/_www/index.js +++ b/_www/index.js @@ -184,7 +184,8 @@ function renderHttpTargets(target) { <h4>Parameters</h4> <div id="${http.ID}_params" class="params"></div> - <h4>Run response</h4> + <h4>Run output</h4> + <pre id="${http.ID}_request" class="response mono"></pre> <pre id="${http.ID}_response" class="response mono"></pre> <h4>Attack results</h4> @@ -397,19 +398,8 @@ async function run(targetID, httpTargetID) { return } - let elResponse = document.getElementById(httpTargetID + "_response") - let m = _requestMethods[req.HttpTarget.Method] - switch (m) { - case "GET": - case "POST": - case "PUT": - case "DELETE": - elResponse.innerHTML = JSON.stringify(res, null, 2) - break - default: - elResponse.innerHTML = atob(res.data) - break - } + document.getElementById(httpTargetID + "_request").innerHTML = atob(res.data.DumpRequest) + document.getElementById(httpTargetID + "_response").innerHTML = atob(res.data.DumpResponse) } async function runWebSocket(targetID, wstID) { |
