Skip to content

Realtime update

Pre-release
Pre-release
Compare
Choose a tag to compare
@gboddin gboddin released this 14 Aug 14:41
· 16 commits to develop since this release

Command line usage

$ leakix -h
Usage of leakix: 

  -j    JSON mode, (excludes -t)
  -l int
        Limit results output (default 100)
  -q string
        Search mode, specify search query (default "*")
  -r    Realtime mode, (excludes -q)
  -s string
        Specify scope (default "leak")
  -t string
        Specify output template (default "{{ .Ip }}:{{ .Port }}")

$ # Stream results in realtime from the engine, no filtering
$ ./leakix -r -s services -l 0
14.167.7.149:81
54.249.38.136:9200
23.65.39.190:80
[2a01:4f8:10a:1b5a::2]:80
23.225.38.43:3306
210.16.68.51:80
...keeps streaming...

Library usage

package main
import (
	"fmt"
	"github.com/LeakIX/LeakIXClient"
)


func LiveStream() {
	// Get a channel from the websocket
	serviceChannel, err := LeakIXClient.GetChannel("services")
	if err != nil {
		log.Println("Websocket connection error:")
		log.Fatal(err)
	}
	for {
		// Print everything received on the channel
		service := <- serviceChannel
		log.Println(service.Ip)
	}
}