diff options
| author | Shulhan <ms@kilabit.info> | 2021-09-18 21:43:57 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-09-18 21:43:57 +0700 |
| commit | 8fa18a28d3f378dba8b5fddf19021c9849b7de7e (patch) | |
| tree | 4573b1dd3487b84f79cb39c334647e2048d388df /_www/http_target.ts | |
| parent | baef891125b216cbe427288ad2d5fcb943b42db3 (diff) | |
| download | gorankusu-8fa18a28d3f378dba8b5fddf19021c9849b7de7e.tar.xz | |
all: add "Hint" for Target, HTTP, and WebSocket Target
The "Hint" provide a general description for Target, a single HttpTarget,
and WebSocketTarget.
Diffstat (limited to '_www/http_target.ts')
| -rw-r--r-- | _www/http_target.ts | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/_www/http_target.ts b/_www/http_target.ts index a806696..2b1d71e 100644 --- a/_www/http_target.ts +++ b/_www/http_target.ts @@ -14,7 +14,8 @@ import { WuiInputString, WuiInputStringOpts } from "./wui/input/string.js" const CLASS_HTTP_TARGET = "http_target" const CLASS_HTTP_TARGET_ACTIONS = "http_target_actions" const CLASS_HTTP_TARGET_ATTACK_RESULT = "http_target_attack_result" -const CLASS_HTTP_TARGET_ATTACK_RESULT_ACTIONS = "http_target_attack_result_actions" +const CLASS_HTTP_TARGET_ATTACK_RESULT_ACTIONS = + "http_target_attack_result_actions" const CLASS_HTTP_TARGET_INPUT = "http_target_input" const CLASS_HTTP_TARGET_INPUT_HEADER = "http_target_input_header" const CLASS_HTTP_TARGET_INPUT_PARAMS = "http_target_input_header" @@ -48,6 +49,7 @@ export class HttpTarget { this.el.appendChild(el_title) this.generateActions(el_title) + this.generateHint(this.el) this.generateInput(this.el) this.generateOutput(this.el) this.generateOutputAttack(this.el) @@ -74,6 +76,15 @@ export class HttpTarget { parent.appendChild(el_actions) } + private generateHint(parent: HTMLElement) { + if (!this.opts.Hint) { + return + } + let el_hint = document.createElement("p") + el_hint.innerHTML = this.opts.Hint + parent.appendChild(el_hint) + } + private generateInput(parent: HTMLElement) { this.el_request_input.classList.add(CLASS_HTTP_TARGET_INPUT) @@ -321,7 +332,9 @@ export class HttpTarget { el.innerText = result.Name let actions = document.createElement("span") - actions.classList.add(CLASS_HTTP_TARGET_ATTACK_RESULT_ACTIONS) + actions.classList.add( + CLASS_HTTP_TARGET_ATTACK_RESULT_ACTIONS, + ) let btn_attack_show = document.createElement("button") btn_attack_show.innerText = "Show" |
