mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Formatted commands in magellan.sh script
This commit is contained in:
parent
b85aae84c3
commit
14447ee51e
1 changed files with 17 additions and 3 deletions
|
|
@ -7,9 +7,10 @@ USER=""
|
||||||
PASS=""
|
PASS=""
|
||||||
SMD_HOST=""
|
SMD_HOST=""
|
||||||
SMD_PORT=""
|
SMD_PORT=""
|
||||||
THREADS="-1"
|
THREADS="1"
|
||||||
TIMEOUT="30"
|
TIMEOUT="30"
|
||||||
ARGS=""
|
ARGS=""
|
||||||
|
FORCE_UPDATE=false
|
||||||
|
|
||||||
|
|
||||||
function build(){
|
function build(){
|
||||||
|
|
@ -18,7 +19,11 @@ 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} --timeout ${TIMEOUT} --threads ${THREADS}
|
${EXE} scan \
|
||||||
|
--subnet ${SUBNETS} \
|
||||||
|
--port ${PORTS} \
|
||||||
|
--timeout ${TIMEOUT} \
|
||||||
|
--threads ${THREADS}
|
||||||
}
|
}
|
||||||
|
|
||||||
function list(){
|
function list(){
|
||||||
|
|
@ -28,7 +33,14 @@ function list(){
|
||||||
|
|
||||||
function collect() {
|
function collect() {
|
||||||
# ./magellan collect --user admin --pass password
|
# ./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 "subnets = ${SUBNETS}"
|
||||||
echo "ports = ${PORTS}"
|
echo "ports = ${PORTS}"
|
||||||
echo "user = ${USER}"
|
echo "user = ${USER}"
|
||||||
|
echo "threads = ${THREADS}"
|
||||||
|
echo "timeout = ${TIMEOUT}"
|
||||||
echo "pass = ..."
|
echo "pass = ..."
|
||||||
|
|
||||||
if [[ -n $1 ]]; then
|
if [[ -n $1 ]]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue