mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Exposed more parameters in magellan.sh script
This commit is contained in:
parent
b730e98fb3
commit
7a99aa5b2d
1 changed files with 20 additions and 2 deletions
|
|
@ -5,6 +5,9 @@ SUBNETS=""
|
||||||
PORTS=""
|
PORTS=""
|
||||||
USER=""
|
USER=""
|
||||||
PASS=""
|
PASS=""
|
||||||
|
SMD_HOST=""
|
||||||
|
THREADS="-1"
|
||||||
|
TIMEOUT="30"
|
||||||
ARGS=""
|
ARGS=""
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -14,7 +17,7 @@ function build(){
|
||||||
|
|
||||||
function scan() {
|
function scan() {
|
||||||
# ./magellan scan --subnet 172.16.0.0 --port 443
|
# ./magellan scan --subnet 172.16.0.0 --port 443
|
||||||
${EXE} scan --subnet ${SUBNETS} --port ${PORTS}
|
${EXE} scan --subnet ${SUBNETS} --port ${PORTS} --host ${SMD_HOST} --timeout ${TIMEOUT} --threads ${THREADS}
|
||||||
}
|
}
|
||||||
|
|
||||||
function list(){
|
function list(){
|
||||||
|
|
@ -24,7 +27,7 @@ function list(){
|
||||||
|
|
||||||
function collect() {
|
function collect() {
|
||||||
# ./magellan collect --user admin --pass password
|
# ./magellan collect --user admin --pass password
|
||||||
${EXE} collect --user ${USER} --pass ${PASS}
|
${EXE} collect --user ${USER} --pass ${PASS} --timeout ${TIMEOUT} --threads ${THREADS}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -51,6 +54,21 @@ while [[ $# -gt 0 ]]; do
|
||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--smd-host)
|
||||||
|
SMD_HOST="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--timeout)
|
||||||
|
TIMEOUT="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--threads)
|
||||||
|
THREADS="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-*|--*)
|
-*|--*)
|
||||||
echo "Unknown option $1"
|
echo "Unknown option $1"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue