Coder Social home page Coder Social logo

go4th's Introduction

Go for The Hive


Go for The Hive is a Golang port of TheHive4py. This is an API client to communicate with TheHive.

Installation

go get github.com/Xumeiquer/go4th

Usage

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)
  }
}

API implementation

Alert

  • 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

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

Obervable

  • 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

Task

  • 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

Log

  • Get logs of the task
  • Find logs in specified task
  • Find logs
  • Create a log
  • Update a log
  • Remove a log
  • Get a log

User

  • Logout
  • User login
  • Get current user
  • Find user
  • Create a user
  • Get a user
  • Delete a user
  • Update user details
  • Set password
  • Change password

ko-fi

go4th's People

Contributors

monaxgt avatar xumeiquer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

monaxgt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.