aboutsummaryrefslogtreecommitdiff
path: root/target.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-09-19 01:42:06 +0700
committerShulhan <ms@kilabit.info>2021-09-19 01:42:06 +0700
commit29c3898ec03adaf7f6e1dd80f82d02b032f3979b (patch)
treea3daf2eb6a79e1dd0c3de84970f013b01ba948e2 /target.go
parent8fa18a28d3f378dba8b5fddf19021c9849b7de7e (diff)
downloadgorankusu-29c3898ec03adaf7f6e1dd80f82d02b032f3979b.tar.xz
all: add option to set description (Hint) on any inputs element
This changes refactor the KeyValue from map[string]string into map[string]FormInput, where FormInput is a struct with Label, Hint, Kind, Value, Max, and Min. With the available of Hint field, the web user interface can render it as description of input. This changes also make all input hint to be displayed on the first render.
Diffstat (limited to 'target.go')
-rw-r--r--target.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/target.go b/target.go
index d0e608b..da4382c 100644
--- a/target.go
+++ b/target.go
@@ -24,7 +24,7 @@ type Target struct {
BaseUrl string
Opts *AttackOptions
- Vars KeyValue
+ Vars KeyFormInput
HttpTargets []*HttpTarget
WebSocketTargets []*WebSocketTarget
@@ -49,7 +49,7 @@ func (target *Target) init() (err error) {
target.Opts.init()
if target.Vars == nil {
- target.Vars = KeyValue{}
+ target.Vars = KeyFormInput{}
}
for _, ht := range target.HttpTargets {