Use seq mysql.sh to output available mysql databases
This commit is contained in:
@@ -1,13 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/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_info() { echo "Delete IP from bruteforce table <NC TABLE> <IPV4 ADDRESS>"; }
|
||||||
step_100() {
|
step_100() {
|
||||||
|
|
||||||
local ncdb=
|
local ncdb=
|
||||||
local ip=
|
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}$'
|
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
|
if [ -z $2 ] ; then
|
||||||
echoerr " [E] No database provided"
|
echoerr " [E] No database provided"
|
||||||
|
if [ -f "${WDIR}/mysql.sh" ] ; then
|
||||||
|
echo " [I] Available mysql databases:"
|
||||||
|
"${WDIR}/mysql.sh" -qq listdb
|
||||||
|
fi
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
ncdb="$2"
|
ncdb="$2"
|
||||||
|
Reference in New Issue
Block a user