portscan

command module
v0.0.0-...-03e13da Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

README

Portscan

Go Report Card GoDoc

SampleInput

POST /api/scan

Input:

{
  "targets": [
    {
      "address": "www.google.com",
      "ports": [
        80,
        433,
        443,
        27017
      ]
    },
    {
      "address": "127.0.0.1",
      "ports": [
        10,
        20,
        30,
        40,
        50,
        60,
        70,
        80,
        90,
        100,
        200,
        300,
        400,
        433,
        443,
        500,
        4433,
        8000,
        27017
      ]
    }
  ]
}

Output:

{
  "token":"1542889524688374400-2241993678076296288",
  "ip":[
    "172.217.26.132",
    "127.0.0.1"
  ]
}

Input:

{
  "targets": [
    {
      "address": "::1",
      "ports": [
        80,
        433,
        443,
        27017
      ]
    }
  ]
}

Output:

{
  "msg":"ipv6 is not currently support"
}
GET /api/token/<token_id>

Output:

{
  "results": [
    {
      "host": "www.google.com",
      "ip":"172.217.166.132",
      "ports": [
        {
          "port":80,
          "description":"HyperText Transfer Protocol (HTTP)"
        },
        {
          "port":443,
          "description":"HTTP with Secure Sockets Layer (SSL)"
        }
      ],
      "finished":true
    },
    {
      "ip":"127.0.0.1",
      "ports": [
        {
          "port":80,
          "description":"HyperText Transfer Protocol (HTTP)"
        },
        {
          "port":27017,
          "description":"MongoDB daemon process"
        }
      ],
      "finished":true
    }
  ],
  "last_update":"2018-11-22T19:49:06.3678471+07:00"
}

or

{
  "msg":"token id not found"
}
DELETE /api/token/<token_id>

Output: 200 OK or

{
  "msg":"token id not found"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
Package api supports api between the website and server, the type of input and return results are JSON document on the RESTful API that specified in model package
Package api supports api between the website and server, the type of input and return results are JSON document on the RESTful API that specified in model package
cache
Package cache provides database connection for store the result as a cache
Package cache provides database connection for store the result as a cache
model
Package model contains the json struct for using in RESTful API for request port scan and send the result
Package model contains the json struct for using in RESTful API for request port scan and send the result
portdes
Package portdes contains the description of the common used ports.
Package portdes contains the description of the common used ports.
Package scanner provides useful functions for scanning the open port.
Package scanner provides useful functions for scanning the open port.
Package web serves the RESTful API service server for port scanner
Package web serves the RESTful API service server for port scanner

Jump to

Keyboard shortcuts

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