api

package
v0.0.0-...-2a0a9dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

The api package serves two purposes

1. handle incoming requests via lambda 2. route requests to other backend functions to collect information on the submitted url (or file hash or ip)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsRequest

type DnsRequest struct {
	Errors      string    `json:"Errors"`
	Nameservers []*net.NS `json:"Nameservers"`
	IPs         []net.IP  `json:"IP addrs"`
	MX          []*net.MX `json:"MX records"`
}

func QueryNet

func QueryNet(server string) DnsRequest

Runs through a query param from Lambda and looks up the

Will return some amount of information assuming the input item is not an invalid url

type IQ

type IQ struct {
	Url string `json:"url"`
}

type Response

type Response struct {
	Rep         interface{} `json:"Reputation"`
	Url         interface{} `json:"Url"`
	LastSubDate time.Time   `json:"Last Submission Date"`
	DNS         DnsRequest  `json:"DNS Query"`
}

func Ingest

func Ingest(request events.APIGatewayProxyRequest) (Response, error)

Ingest takes a query param from AWS API Gateway and passes that along to

ValidateQuery(url)

func QueryVirusTotal

func QueryVirusTotal(url string) Response

Uses the Virus total sdk/client provided by VT themselves and returns some information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL