MCPcopy Index your code
hub / github.com/LeakIX/LeakIXClient

github.com/LeakIX/LeakIXClient @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
11 symbols 34 edges 3 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LeakIXClient

This is a Go CLI & library making queries to LeakIX easier.

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

$ # Example query on the index
$ leakix -l 2 -q "protocol:web AND plugin:GitConfigPlugin" -t "{{ .Ip }}:{{ .Port }} : {{ .Data }}"
178.62.217.44:80 : Found git deployment configuration
[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://gitlab.com/lyranalytics/lyra-website.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "abdulrahman"]
    remote = origin
    merge = refs/heads/abdulrahman

2604:a880:800:a1::10f:1001:80 : Found git deployment configuration
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://github.com/mautic/mautic.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "staging"]
    remote = origin
    merge = refs/heads/staging

$ # 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 DoSearch(){
    // Create a searcher
    LeakIXSearch := LeakIXClient.SearchResultsClient{
        Scope: "leak",
        Query: "protocol:kafka AND \"telecom_italia_data\"",
    }
    // Iterate, the lib will query further pages if needed
    for LeakIXSearch.Next() {
        // Use the result
        leak := LeakIXSearch.SearchResult()
        fmt.Printf("%s:%s - Country:%s\n", leak.Ip, leak.Port, leak.GeoLocation.CountryName)
    }
}


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

Core symbols most depended-on inside this repo

GetEndpoint
called by 2
Client.go
Next
called by 2
Client.go
SearchResult
called by 2
Client.go
OutputSearchResult
called by 2
cmd/leakix/main.go
GetSearchResults
called by 1
Client.go
GetChannel
called by 1
Client.go
Search
called by 1
cmd/leakix/main.go
LiveStream
called by 1
cmd/leakix/main.go

Shape

Function 5
Method 5
Struct 1

Languages

Go100%

Modules by API surface

Client.go6 symbols
cmd/leakix/main.go4 symbols
example/main.go1 symbols

For agents

$ claude mcp add LeakIXClient \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact