Go for The Hive
Go for The Hive is a Golang port of TheHive4py. This is an API client to communicate with TheHive.
go get github.com/Xumeiquer/go4th
Go 4 TheHive exposes the whole API through an API object.
package main
import (
"os"
"github.com/Xumeiquer/go4th"
)
var (
thehive = "https://127.0.0.1:9000"
apiKey = "apiKey"
trustSSL = true
)
func main() {
api := go4th.NewAPI(thehive, apiKey, trustSSL)
alerts, err := api.GetAlerts()
if err != nil {
fmt.Println("error while getting alerts")
os.Exit(1)
}
for _, alert := range alerts {
fmt.Printf("Got Alert %s with title %s\n", alert.ID, alert.Title)
}
}
- List alerts
- Find alerts
- Update alerts in bulk
- Compute stats on alerts
- Create an alert
- Get an alert
- Update an alert
- Delete an alert
- Mark an alert as read
- Mark an alert as unread
- Create a case from an alert
- Follow an alert
- Unfollow an alert
- Merge an alert in a case
- List cases
- Find cases
- Update cases in bulk
- Compute stats on cases
- Create a case
- Get a case
- Update a case
- Remove a case
- Get list of cases linked to this case
- Merge two cases
- Find observables
- Compute stats on observables
- Create an observable
- Get an observable
- Remove an observable
- Update an observable
- Get list of similar observables
- Update observables in bulk
- Find tasks in a case (deprecated) - Will not be implemented
- Find tasks
- Compute stats on tasks
- Get a task
- Update a task
- Create a task
- Get logs of the task
- Find logs in specified task
- Find logs
- Create a log
- Update a log
- Remove a log
- Get a log
- Logout
- User login
- Get current user
- Find user
- Create a user
- Get a user
- Delete a user
- Update user details
- Set password
- Change password