Use seq mysql.sh to output available mysql databases

This commit is contained in:
2020-01-05 14:46:44 +01:00
parent 0cb059a58f
commit da30fc84b8

View File

@@ -1,13 +1,25 @@
#!/bin/bash
# Dependency to other seqs
# - mysql.sh (soft; Missing informational output)
# Get script working directory
# (when called from a different directory)
WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
step_100_info() { echo "Delete IP from bruteforce table <NC TABLE> <IPV4 ADDRESS>"; }
step_100() {
local ncdb=
local ip=
local ipregex='^[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}$'
if [ -z $2 ] ; then
echoerr " [E] No database provided"
if [ -f "${WDIR}/mysql.sh" ] ; then
echo " [I] Available mysql databases:"
"${WDIR}/mysql.sh" -qq listdb
fi
return 1
else
ncdb="$2"