Commit a48c86d3 authored by Yash Paliwal's avatar Yash Paliwal

Introduced --max-rate flag

parent 2f64e7f9
......@@ -11,3 +11,5 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
.vscode
paused.conf
mongobuster
# mongoBuster
Hunt Open MongoDB instances
### Features
* Worlds fastest and most efficient scanner ( Uses Masscan ).
* Scans entire internet by default, So fire the tool and chill.
* Hyper efficient - Uses Go-routines which are even lighter than threads.
### Pre-Requisites -
* Go language ( sudo apt install golang )
......@@ -21,8 +27,8 @@ sudo ./mongobuster
Note: Run it with sudo as Masscan requires sudo access.
### Features
### Flags -
* Worlds fastest and most efficient scanner ( Uses Masscan ).
* Scans entire internet by default, So fire the tool and chill.
* Hyper efficient - Uses Go-routines which are even lighter than threads.
|Flag| Description
|---|
|--max-rate= (int)| Defines maximum rate at which packets are generated and sent. Default is 1000
......@@ -3,6 +3,7 @@ package main
import (
"bufio"
"context"
"flag"
"log"
"os"
"os/exec"
......@@ -17,12 +18,15 @@ func main() {
masscanInstalled() // Check if masscan binary is installed.
WelcomeMsg()
go execMasscan(ipAddr)
maxPtr := flag.String("max-rate", "1000", "Max rate at which packets will be sent")
flag.Parse()
go execMasscan(ipAddr, maxPtr)
workDispatcher(ipAddr) // Dont call this func inside execMasscan coz exec.Command is a blocking statement.
}
func execMasscan(ipAddr chan string) {
cmd := exec.Command("/bin/bash", "-c", "sudo masscan -p27017 0.0.0.0/0 --exclude 255.255.255.255 --open-only")
func execMasscan(ipAddr chan string, maxPtr *string) {
cmd := exec.Command("/bin/bash", "-c", "sudo masscan -p27017 0.0.0.0/0 --exclude 255.255.255.255 --open-only --max-rate "+*maxPtr)
ok, err := cmd.StdoutPipe()
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment