Coder Social home page Coder Social logo

fosonrong / webnettools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johannesschaefer/webnettools

0.0 0.0 0.0 1.37 MB

Web Net Tools is a web frontend for some useful command line tooling. It provides especially an web frontend for tools like testssl.sh and nmap.

License: MIT License

JavaScript 3.18% Java 65.78% TypeScript 1.83% CSS 0.63% HTML 0.56% Svelte 28.03%

webnettools's Introduction

Web Net Tools

GitHub tag License Docker

Web Net Tools is a web frontend for some useful command line tooling. It provides especially an web frontend for tools like testssl.sh and nmap. Currently it support the following tools:

test ssl tooling ping tooling

Web Net Tools is a ready to use Docker image. No additional setup of the mentioned tools is needed.

Main usage

This tool was made to make command line tools available in closed networks. Especially the tool testssl.sh has currently no web frontend and similar tools in the public internet can't be used in close private networks. Web Net Tools can help you to make such services available for easy use.

Usage

Simple run the following Docker command:

docker run -p 8080:8080 --name webnettools johannesschafer/webnettools

Configuration options

Currently you can configure the following aspects

  • Available tools - set the Docker environment variable AVAILABLE_TOOLS with an set of the following tools to limit the tools shown in the web frontend: testssl, ping, traceroute, nmap. E.g. AVAILABLE_TOOLS=testssl,nmap.

  • Rate limit - Limits the number of calls of a specific tool to a specific target (e.g. host). The value is set in milliseconds between consecutive calls. E.g. set Docker variable RATE_LIMIT=60000 to limit the calls to one per minute.

  • To set additional certificates for the testssl.sh tool, just map the folder with the certificates to the container folder /certs. This directory can be adjusted by the Docker environment variable CA_DIR E.g.

docker run -p 8080:8080 -v ./localfolderwithcerts:/certs --name webnettools johannesschafer/webnettools
  • Intro text - set the Docker environment variable INTRO_TEXT to show an additional paragraph in front of the tool selection. This can be used to help the users in your specific environment. HTML tags are supported.

Extension

To build the tooling, just run mvn clean install. This builds the backend and frontend and creates an Docker image (johannesschafer/webnettools). To run the application during development mode, please start the backend with the following command from the root folder.

mvn compile quarkus:dev

The frontend needs to be started from the frontend folder with the following command.

npm run dev

The backend listens on port 8080 and the frontend on port 5000 (and connects to the backend on port 8080). During testing, please make sure to disable CORS in your browser.

To add own tools you have to create an clone or fork of this repository and create an payload class for your tool. Via Java annotations to your parameter fields, all settings for an tool are done.

E.g.

import io.github.johannesschaefer.webnettools.annotation.*;
import lombok.Data;

@Data
@Tool(name="demo", displayName = "Demo", cmd="echo", description="Demo for the tooling.")
public class DemoPayload implements Payload {
    @MainParameter(displayName ="Main", description="Main parameter for this tool.")
    private String main;

    @NumberParam(displayName ="NumInt", param="num-int", description="number integer demo ", min=0., max=100., step=1.)
    private Integer numInt = 50;

    @NumberParam(displayName ="NumDouble", param="num-double", description="number double demo ", min=0.1, max=99.9, step=.1)
    private Double numDouble = 66.6;

    @StringParam(displayName ="String", param="string", description="String demo", paramType = ParameterType.EQUALS)
    private String string;

    @BooleanParam(displayName ="Bool", param="bool1", description="boolean demo")
    private Boolean bool;

    @EnumParam(displayName = "color", param = "--color", description="color selection")
    private Color color;

    @FileParam(displayName = "file", param = "--file-ca", accept = "*.abc", description = "File upload" )
    private String file;
    
    @ServerParam(param = "--optionXXX", handler = XXXHandler.class)
    private String xxx;
    
    @FixedParam(param = "--warnings")
    private String warnings = "off";
}

The following parameter type are supported.

  • Main parameter - string value used for the main input panel
  • String - simple input for strings
  • Number - simple input for number
  • Boolean - dropdown selection for true/false
  • Enum - dropdown selection for values from the given enum, the enum should have the final parameter value as toString result. See examples in testssl payload.
  • File - file upload, web net tools create a temporary file with the content and passes the path to the file
  • Fixed - Fixes parameter with no choice on client side
  • Server side - Special parameter with additional control logic on the server side

Please check the existing payload under /src/main/java/io/github/johannesschaefer/webnettools/payload for more examples.

To make the tool available, please enter the name of the tool in the Dockerfile (ENV AVAILABLE_TOOLS, used as default for the Docker image) and in the Java file Producer (ConfigProperty availableTools, used at development time).

webnettools's People

Contributors

johannesschaefer avatar dependabot[bot] 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.