Skip to content

e-gineer/urlscan-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urlscan.io in Go

Report card   Build Status GoDoc

The package provides a API client of urlscan.io in Go.

package main

import (
  "github.com/m-mizutani/urlscan-go/urlscan"
  "fmt"
)

func main() {
    client := urlscan.NewClient("YOUR-API-KEY")
    task, err := client.Submit(urlscan.SubmitArguments{URL: "https://golang.org"})
    if err != nil {
        log.Fatal(err)
    }

    err = task.Wait()
    if err != nil {
        log.Fatal(err)
    }

    for _, cookie := range task.Result.Data.Cookies {
        fmt.Printf("Cookie: %s = %s\n", cookie.Name, cookie.Value)
    }
}

Document

https://godoc.org/github.com/m-mizutani/urlscan-go/urlscan

Test

You need to retrieve API key at first. See https://urlscan.io/about-api/#integrations for more detail.

env URLSCAN_API_KEY=12345678-your-apikey go test ./urlscan

License

About

urlscan.io client library in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%