Categorygithub.com/aswin-kevin/nuclei-grpc
repositorypackage
0.0.0-20241220053550-07ab94621810
Repository: https://github.com/aswin-kevin/nuclei-grpc.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Nuclei gRPC Application

This application serves nuclei engine as GRPC service. It uses nuclei engine V3.

Prerequisites

  • Go 1.16 or higher
  • gRPC Go plugin

Installation

  1. Clone the repository:

    git clone https://github.com/aswin-kevin/nuclei-grpc.git
    cd nuclei-grpc
    
  2. Install dependencies:

    go mod tidy
    

Usage

Starting the Server

To start the gRPC server, run the following command:

go run main.go start

Starting the Server with Custom Address and Port

To start the gRPC server with a custom address and port, use the following command:

go run main.go start --address <custom_address> --port <custom_port>

Replace <custom_address> with the desired address (e.g., localhost) and <custom_port> with the desired port (e.g., 50051).

Example Request

To make a request to the gRPC server, use the following payload:

  1. Filter using tags
{
  "targets": ["https://hotstar.com"],
  "tags": ["dns", "ssl", "tech"]
}
  1. Filter using templates
{
  "targets": ["https://hotstar.com"],
  "templates": ["http/cves", "network/cves"]
}
  1. Filter using templates relative paths
{
  "targets": ["https://hotstar.com"],
  "templates": ["http/cves/xyz.yaml", "network/cves/new.yaml"]
}
  1. Filter using templates ids
{
  "targets": ["https://hotstar.com"],
  "template_ids": ["detect-dangling-cname", "dnssec-detection"]
}
  1. Add concurrency configuration and scan strategy
{
  "targets": ["https://hotstar.com"],
  "template_ids": ["caa-fingerprint"],
  "scan_strategy": "host-spray",
  "scan_concurrency_config": {
    "template_concurrency": 5,
    "host_concurrency": 9,
    "headless_host_concurrency": 109,
    "headless_template_concurrency": 178,
    "javascript_template_concurrency": 7,
    "template_payload_concurrency": 100,
    "probe_concurrency": 89
  }
}
  1. Filter using severity
{
  "targets": ["https://hotstar.com"],
  "severity": "low"
}

Example Response

The response is a server-side streaming response. Example JSON responses can be found in the examples/jsons directory.

Protofile

Protofile is placed in pkg/service/service.proto , you this on your client side.

If you want to rebuild the protofile use the following command

protoc --go_out=. --go-grpc_out=. ./pkg/service/service.proto

Contributing

Feel free to submit issues, fork the repository and send pull requests!

License

This project is licensed under the MIT License.