mri

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: GPL-3.0

README

mri

Little RESTful API that exposes NMAP functionalities.

Request

{
  "host": "8.8.8.8",
  "ports": [
    53
  ]
}

Response

{
  "request": {
    "host": "8.8.8.8",
    "ports": [
      53
    ]
  },
  "results": {
    "53": {
      "proto": "tcp",
      "service": "tcpwrapped",
      "state": "open",
      "version": ""
    }
  }
}

Using dedicated client

package main

import (
	"fmt"
	"github.com/darkspot-org/mri/client"
	"log"
)

func main() {
	c := client.NewClient("http://localhost:8080")

	res, err := c.Scan("1.1.1.1", []int{80, 443})
	if err != nil {
		log.Fatal(err)
	}

	for port, info := range res.Results {
		fmt.Printf("%d %v \n", port, info)
	}
}

Directories

Path Synopsis
cmd
mri

Jump to

Keyboard shortcuts

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