Skip to content

oucema001/censys-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

censys-go

Build Status Build status codecov GoDoc MIT License Go Report Card

To start working with censys you have to create an account and get an application Key and application secret First. You can do this at https://censys.io.

Installation

Download the package:

go get github.com/oucema001/censys-go

You can now use the library in your own projects :-)

Usage

package main

import (
    "log"
    
    "github.com/oucema001/censys-go"
)

func main() {
    client := censys.NewClient(nil, "MY_APPID", "MY_APPSECRET")
    dns, err := client.GetDNSResolve([]string{"google.com", "ya.ru"})
    
    a, err := client.Search(context.Background(), "www.google.com", censys.WEBSITES)
	if err != nil {
		log.Panic(err)
    } else {
        fmt.Println("alexa rank : %d",a.Results[0].AlexaRank)
    }
}

This will output :

alexa rank : 1

###Implemented Censys APIs :

Account

  • /api/v1/account

Search

  • /api/v1/search/ipv4
  • /api/v1/search/websites
  • /api/v1/search/certificates

View

  • /api/v1/view/:index/:id
  • /api/v1/view/ipv4/:id
  • /api/v1/view/websites/:id
  • /api/v1/view/certificates/:id

Data

  • /api/v1/data

Report

  • /api/v1/report/:index
  • /api/v1/report/ipv4
  • /api/v1/report/websites
  • /api/v1/report/certificates

Links

Releases

No releases published

Packages

No packages published

Languages