Exposed more parameters in magellan.sh script

This commit is contained in:
David J. Allen 2023-10-02 15:42:06 -06:00
parent b730e98fb3
commit 7a99aa5b2d

View file

@ -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