Skip to content

Latest commit

 

History

History
executable file
·
58 lines (39 loc) · 1.34 KB

README.md

File metadata and controls

executable file
·
58 lines (39 loc) · 1.34 KB

net-scanner

Gets external IP address and can check if a port is open on that address.

Purpose

Pet project to play around with containers (Kubernetes and Docker) and see if that open port on a remote machine can be accessed.

Version

  • 0.0.1
    • Initial Release

How it Works

Node

node> net-scanner [port]

  • port - optional port to host server on (default 4747)

Get External IP

Make a GET request to the server at '/ip' on the configured port:

curl -i -X GET localhost:4747/ip

Check Open Port

Make a POST request to the server at '/scan' on the configured port with a JSON object in the form of:

{
  ip - optional, if not supplied external IP will be discoverd first
  port - port to check
}
curl -i -X POST -H "Content-Type: application/json" -d '{"ip":"1.1.1.1","port":"1234"}' localhost:4747/scan

Docker

TODO

Kubernetes

TODO

Dependencies

Node

  • net - opening a connection to remote IP address to check if a port is open
  • http - hosting web server
  • url - url processing
  • external-ip - get external IP address

References

TODO