Giter Club home page Giter Club logo

netcat-api-endpoints's Introduction

Netcat API endpoints

This is a simple netcat server that accepts and processes endpoint requests REST API to manage Linux-based services via systemctl.

Supported only the GET method for PowerShell 7 (Invoke-RestMethod or Invoke-WebRequest).

Curl is not supported! Curl does not wait for additional time from the server to get a complete response to the request (same with irm/iwr and POST method), unlike Invoke-RestMethod and GET method in PowerShell 7, it waits for a complete response from the server before returning the result of the request. In the case of netcat, the utility does not terminate the connection until the server sends a complete response. The result of the request is stored in a buffer/stream and gives back the response of the previous request when the client makes a subsequent request.

Endpoints:

  • /api/date
  • /api/disk
  • /api/service/service_name

Request syntax for send:

irm http://192.168.3.101:8081/api/service/cron -Method Get

irm http://192.168.3.101:8081/api/service/cron -Method Get -Headers @{"Status" = "restart"}

irm http://192.168.3.101:8081/api/service/cron -Method Get -Headers @{"Status" = "stop"}

irm http://192.168.3.101:8081/api/service/cron -Method Get -Headers @{"Status" = "start"}

Example:

Image alt

Disk endpoint:

Image alt

Bad Example:

Image alt

Netcat jobs work example:

Image alt

netcat-api-endpoints's People

Contributors

lifailon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.