Formatted commands in magellan.sh script

This commit is contained in:
David J. Allen 2023-10-24 08:04:53 -06:00
parent b85aae84c3
commit 14447ee51e

View file

@ -7,9 +7,10 @@ USER=""
PASS=""
SMD_HOST=""
SMD_PORT=""
THREADS="-1"
THREADS="1"
TIMEOUT="30"
ARGS=""
FORCE_UPDATE=false
function build(){
@ -18,7 +19,11 @@ function build(){
function scan() {
# ./magellan scan --subnet 172.16.0.0 --port 443
${EXE} scan --subnet ${SUBNETS} --port ${PORTS} --timeout ${TIMEOUT} --threads ${THREADS}
${EXE} scan \
--subnet ${SUBNETS} \
--port ${PORTS} \
--timeout ${TIMEOUT} \
--threads ${THREADS}
}
function list(){
@ -28,7 +33,14 @@ function list(){
function collect() {
# ./magellan collect --user admin --pass password
${EXE} collect --user ${USER} --pass ${PASS} --timeout ${TIMEOUT} --threads ${THREADS} --host ${SMD_HOST} --port ${SMD_PORT}
${EXE} collect \
--user ${USER} \
--pass ${PASS} \
--timeout ${TIMEOUT} \
--threads ${THREADS} \
--host ${SMD_HOST} \
--port ${SMD_PORT} \
--force-update ${FORCE_UPDATE}
}
@ -93,6 +105,8 @@ echo "SMD port = ${SMD_PORT}"
echo "subnets = ${SUBNETS}"
echo "ports = ${PORTS}"
echo "user = ${USER}"
echo "threads = ${THREADS}"
echo "timeout = ${TIMEOUT}"
echo "pass = ..."
if [[ -n $1 ]]; then