Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/intelowlproject/go-intelowl
IntelOwl's client library/SDK in golang.
https://github.com/intelowlproject/go-intelowl
golang intelowl intelowl-api threat-hunting threat-intelligence
Last synced: 6 days ago
JSON representation
IntelOwl's client library/SDK in golang.
- Host: GitHub
- URL: https://github.com/intelowlproject/go-intelowl
- Owner: intelowlproject
- License: agpl-3.0
- Created: 2021-01-31T13:32:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-17T12:04:06.000Z (3 months ago)
- Last Synced: 2024-10-30T05:42:34.379Z (22 days ago)
- Topics: golang, intelowl, intelowl-api, threat-hunting, threat-intelligence
- Language: Go
- Homepage: https://pkg.go.dev/github.com/intelowlproject/go-intelowl
- Size: 132 KB
- Stars: 22
- Watchers: 9
- Forks: 12
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-intelowl
[![GitHub issues](https://img.shields.io/github/issues/intelowlproject/go-intelowl?style=plastic)](https://github.com/intelowlproject/go-intelowl/issues)
[![GitHub license](https://img.shields.io/github/license/intelowlproject/go-intelowl?style=plastic)](https://github.com/intelowlproject/go-intelowl/blob/main/LICENSE)![go-banner](./Banner.png)
go-intelowl is a client library/SDK that allows developers to easily automate and integrate [IntelOwl](https://github.com/intelowlproject/IntelOwl) with their own set of tools!# Table of Contents
- [go-intelowl](#go-intelowl)
- [Getting Started](#getting-started)
- [Pre requisites](#pre-requisites)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Contribute](#contribute)
- [License](#liscence)
- [Links](#links)
- [FAQ](#faq)
- [Generate API key](#generate-api-key)
- [v4.0 and above](#v40-and-above)
- [v4.0 below](#v40-below)# Getting Started
## Pre requisites
- Go 1.17+## Installation
Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.```bash
$ go get github.com/intelowlproject/go-intelowl
```## Usage
This library was built with ease of use in mind! Here are some quick examples to get you started. If you need more example you can go to the [examples directory](./examples/)To start using the go-intelowl library you first need to import it:
```
import "github.com/intelowlproject/go-intelowl/gointelowl"
```
Construct a new `IntelOwlClient`, then use the various services to easily access different parts of Intelowl's REST API. Here's an example of getting all jobs:```Go
clientOptions := gointelowl.IntelOwlClientOptions{
Url: "your-cool-URL-goes-here",
Token: "your-super-secret-token-goes-here",
// This is optional
Certificate: "your-optional-certificate-goes-here",
}intelowl := gointelowl.NewIntelOwlClient(
&clientOptions,
nil
)ctx := context.Background()
// returns *[]Jobs or an IntelOwlError!
jobs, err := intelowl.JobService.List(ctx)
```
For easy configuration and set up we opted for `options` structs. Where we can customize the client API or service endpoint to our liking! For more information go [here](). Here's a quick example!```Go
// ...Making the client and context!tagOptions = gointelowl.TagParams{
Label: "NEW TAG",
Color: "#ffb703",
}createdTag, err := intelowl.TagService.Create(ctx, tagOptions)
if err != nil {
fmt.Println(err)
} else {
fmt.Println(createdTag)
}
```
## Examples
The [examples](./examples/) directory contains a couple for clear examples, of which one is partially listed here as well:```Go
package mainimport (
"fmt""github.com/intelowlproject/go-intelowl/gointelowl"
)func main(){
intelowlOptions := gointelowl.IntelOwlClientOptions{
Url: "your-cool-url-goes-here",
Token: "your-super-secret-token-goes-here",
Certificate: "your-optional-certificate-goes-here",
}client := gointelowl.NewIntelOwlClient(
&intelowlOptions,
nil,
)ctx := context.Background()
// Get User details!
user, err := client.UserService.Access(ctx)
if err != nil {
fmt.Println("err")
fmt.Println(err)
} else {
fmt.Println("USER Details")
fmt.Println(*user)
}
}```
For complete usage of go-intelowl, see the full [package docs](https://pkg.go.dev/github.com/intelowlproject/go-intelowl).# Contribute
If you want to follow the updates, discuss, contribute, or just chat then please join our [slack](https://honeynetpublic.slack.com/archives/C01KVGMAKL6) channel we'd love to hear your feedback!# License
Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.# Links
- [Intelowl](https://github.com/intelowlproject/IntelOwl)
- [Documentation](https://intelowlproject.github.io/docs/)
- [API documentation](https://intelowlproject.github.io/docs/IntelOwl/api_docs/)
- [Examples](./examples/)# FAQ
## Generate API key
You need a valid API key to interact with the IntelOwl server.
### v4.0 and above
You can get an API by doing the following:
1. Log / Signin into intelowl
2. At the upper right click on your profile from the drop down select `API Access/ Sessions`
3. Then generate an API key or see it!### v4.0 below
Keys should be created from the admin interface of [IntelOwl](https://github.com/intelowlproject/intelowl): you have to go in the *Durin* section (click on `Auth tokens`) and generate a key there.