Giter Site home page Giter Site logo

go-ioc's Introduction

Golang IOC Library

Go Report Card Documentation

This library provides functions to extract IOCs from text or a reader. You can also fang and defang IOCs.

CLI Usage

go-ioc can be used to extract IOCs from articles, RSS feeds, and text.

Usage:
  go-ioc [command] [flags]
  go-ioc [command]

Examples:
go-ioc url https://google.com

Available Commands:
  docs        Generate docs
  help        Help about any command
  rss         Crawl a RSS feed and get all IOCs from articles in the feed
  stdin       Find IOCs from stdin
  url         Crawl a URL and print all the IOCs

Flags:
      --all                  Get all fanged IOCs.  This typically is rather noisy in that it finds _all_ links, etc
  -f, --format string        Print format for printing IOCs.  Options include: csv, table (default "csv")
  -h, --help                 help for go-ioc
  -o, --output string        Save IOCs to file
      --printFanged          Print all IOCs fanged, will override standardizeDefangs
  -s, --sort                 Sort IOCs by their type (default true)
      --standardizeDefangs   Standardize all defanged IOCs using square brackets (default true)
      --stats                Print count of each IOC found at start of output

Use "go-ioc [command] --help" for more information about a command.

Docker CLI usage

docker run -it vertoforce/go-ioc help

Library Usage

GetIOCs

data := `this is a bad url http[://]google[.]com/path`
iocs := GetIOCs(data, false, true)

Defang / Fang

ioc := &IOC{IOC: "google.com", Type: Domain}

ioc = ioc.Defang()
fmt.Println(ioc)

ioc = ioc.Fang()
fmt.Println(ioc)

// Output: google[.]com|Domain
// google.com|Domain

How

The finding IOCs in readers uses these two libraries:

IOC Methods

  • String() string
  • Defang() *IOC
  • Fang() *IOC
  • IsFanged() bool

go-ioc's People

Contributors

jon77p avatar vertoforce avatar

Watchers

 avatar

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.