Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Madhurendra
mongohunter
Commits
a48c86d3
Commit
a48c86d3
authored
Feb 06, 2019
by
Yash Paliwal
Browse files
Introduced --max-rate flag
parent
2f64e7f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
a48c86d3
...
...
@@ -11,3 +11,5 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
.vscode
paused.conf
mongobuster
README.md
View file @
a48c86d3
# 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.
### F
eatures
### F
lags -
*
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
mongobuster.go
View file @
a48c86d3
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment