mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 13:02:12 -07:00
new: new http-req-dump caplet and js module.
This commit is contained in:
parent
29002eb0b8
commit
2eaee90182
3 changed files with 171 additions and 1 deletions
|
@ -17,6 +17,7 @@ type JSRequest struct {
|
|||
Method string
|
||||
Version string
|
||||
Path string
|
||||
Query string
|
||||
Hostname string
|
||||
ContentType string
|
||||
Headers []JSHeader
|
||||
|
@ -42,8 +43,9 @@ func NewJSRequest(req *http.Request) JSRequest {
|
|||
Client: strings.Split(req.RemoteAddr, ":")[0],
|
||||
Method: req.Method,
|
||||
Version: fmt.Sprintf("%d.%d", req.ProtoMajor, req.ProtoMinor),
|
||||
Path: req.URL.Path,
|
||||
Hostname: req.Host,
|
||||
Path: req.URL.Path,
|
||||
Query: req.URL.RawQuery,
|
||||
ContentType: cType,
|
||||
Headers: headers,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue