mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
add boolean for dumping HTTP bodies in hex format
This commit is contained in:
parent
4a96bf641a
commit
3d6e28ea45
1 changed files with 7 additions and 0 deletions
|
@ -36,6 +36,7 @@ type EventsStream struct {
|
||||||
quit chan bool
|
quit chan bool
|
||||||
dumpHttpReqs bool
|
dumpHttpReqs bool
|
||||||
dumpHttpResp bool
|
dumpHttpResp bool
|
||||||
|
dumpFormatHex bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEventsStream(s *session.Session) *EventsStream {
|
func NewEventsStream(s *session.Session) *EventsStream {
|
||||||
|
@ -214,6 +215,10 @@ func NewEventsStream(s *session.Session) *EventsStream {
|
||||||
"false",
|
"false",
|
||||||
"If true all HTTP responses will be dumped."))
|
"If true all HTTP responses will be dumped."))
|
||||||
|
|
||||||
|
mod.AddParam(session.NewBoolParameter("events.stream.http.format.hex",
|
||||||
|
"true",
|
||||||
|
"If true dumped HTTP bodies will be in hexadecimal format."))
|
||||||
|
|
||||||
return mod
|
return mod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,6 +263,8 @@ func (mod *EventsStream) Configure() (err error) {
|
||||||
return err
|
return err
|
||||||
} else if err, mod.dumpHttpResp = mod.BoolParam("events.stream.http.response.dump"); err != nil {
|
} else if err, mod.dumpHttpResp = mod.BoolParam("events.stream.http.response.dump"); err != nil {
|
||||||
return err
|
return err
|
||||||
|
} else if err, mod.dumpFormatHex = mod.BoolParam("events.stream.http.format.hex"); err != nil {
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue