mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 13:02:12 -07:00
new: new /api/session/modules route
This commit is contained in:
parent
f489d61440
commit
08f3766d30
2 changed files with 8 additions and 0 deletions
|
@ -87,6 +87,10 @@ func (api *RestAPI) showInterface(w http.ResponseWriter, r *http.Request) {
|
|||
toJSON(w, session.I.Interface)
|
||||
}
|
||||
|
||||
func (api *RestAPI) showModules(w http.ResponseWriter, r *http.Request) {
|
||||
toJSON(w, session.I.Modules)
|
||||
}
|
||||
|
||||
func (api *RestAPI) showLan(w http.ResponseWriter, r *http.Request) {
|
||||
params := mux.Vars(r)
|
||||
mac := strings.ToLower(params["mac"])
|
||||
|
@ -205,6 +209,9 @@ func (api *RestAPI) sessionRoute(w http.ResponseWriter, r *http.Request) {
|
|||
case path == "/api/session/interface":
|
||||
api.showInterface(w, r)
|
||||
|
||||
case strings.HasPrefix(path, "/api/session/modules"):
|
||||
api.showModules(w, r)
|
||||
|
||||
case strings.HasPrefix(path, "/api/session/lan"):
|
||||
api.showLan(w, r)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue