This commit is contained in:
2023-11-12 21:48:04 -06:00
parent 43b3d58fd9
commit 49066c553a
2 changed files with 63 additions and 9 deletions

View File

@@ -267,6 +267,61 @@ LISTCERTS(){
i=`expr $i + 1`
done
if [ ${EDIT} -eq 1 ]; then
DIVIDER . yellow ${dl}
function exitspacing {
echo -e "\n\033[K\n\033[K"
exit 0
}
trap exitspacing EXIT
while [ "${editc^}" != "E" ]; do
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[K (${idsCL[Green]}R${idsCL[Default]})eload, (${idsCL[Green]}E${idsCL[Default]})xit"
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[7A"
echo -en "${idsCL[LightCyan]}Enter the cert number you want to edit: ${idsCL[Default]}"
read certid
echo
if [ "${certid^}" == "E" ]; then
echo -e "\033[K"
exit 0
elif [ "${certid^}" == "R" ]; then
[ "${SEARCH}" != "0" ] && LISTCERTS -edit -search ${SEARCH} || LISTCERTS -edit
exit 0
elif [ "${CERTLIST[${siteid}]}" != "" ]; then
until [ "${editc^}" = "C" ]; do
echo -e "\033[K${idsCL[White]} Expires: ${idsCL[Cyan]}${idsST[Bold]}${ssl}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]} Cert Common Name: ${idsCL[Cyan]}${idsST[Bold]}${servernames}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}1) Cert Alt. Names: ${idsCL[Cyan]}${idsST[Bold]}${type}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}2) Monitored: ${idsCL[Cyan]}${idsST[Bold]}${hsts}${idsST[Reset]}"
if [ "${editc}" != "s" ]; then
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[K (${idsCL[Green]}S${idsCL[Default]})ave, (${idsCL[Red]}D${idsCL[Default]})elete, (${idsCL[Red]}C${idsCL[Default]})ancel, (${idsCL[Green]}E${idsCL[Default]})xit"
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[7A"
echo -en "\033[K\n\033[K\r${idsCL[LightCyan]}Enter the item number to edit: ${idsCL[Default]}"
read -n 1 edit
fi
done
fi
done
fi
echo
if [ -z $action ] || [ "${action}" = "gui" ]; then

View File

@@ -731,16 +731,15 @@ SITEINFO(){
i=`expr $i + 1`
done
echo
DIVIDER . yellow ${dl}
if [ ${EDIT} -eq 1 ]; then
DIVIDER . yellow ${dl}
function exitspacing {
echo -e "\n\033[K\n\033[K"
exit 0
}
trap exitspacing EXIT
while [ "${edit^}" != "E" ]; do
while [ "${editc^}" != "E" ]; do
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[K (${idsCL[Green]}R${idsCL[Default]})eload, (${idsCL[Green]}E${idsCL[Default]})xit"
@@ -811,12 +810,12 @@ SITEINFO(){
lock='-'
fi
f=0; edit=0
until [ "${edit^}" = "C" ]; do
until [ "${editc^}" = "C" ]; do
echo -e "\033[K${idsCL[White]}0) Site Address(es): ${idsCL[Cyan]}${idsST[Bold]}${servernames}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}1) Site Type: ${idsCL[Cyan]}${idsST[Bold]}${type}${idsST[Reset]}"
echo -en "\033[K${idsCL[White]}2) SSL Secure: ${idsCL[Cyan]}${idsST[Bold]}${ssl}${idsST[Reset]}"
[ "${SUBJECTNAMES}" != "" ] && echo -e " ${idsCL[Cyan]}[SSL Names: ${idsCL[Yellow]}${SUBJECTNAMES}${idsCL[Cyan]}; expires ${idsCL[Yellow]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsCL[Cyan]}]" || echo
echo -e "\033[K${idsCL[White]}3) HSTS Enabled ${idsCL[Cyan]}${idsST[Bold]}${hsts}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}3) HSTS Enabled: ${idsCL[Cyan]}${idsST[Bold]}${hsts}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}4) Web Sockets: ${idsCL[Cyan]}${idsST[Bold]}${wbskt}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}5) Exploits Block: ${idsCL[Cyan]}${idsST[Bold]}${explt}${idsST[Reset]}"
echo -e "\033[K${idsCL[White]}6) Secured Access: ${idsCL[Cyan]}${idsST[Bold]}${lock}${idsST[Reset]}"
@@ -829,7 +828,7 @@ SITEINFO(){
echo -e "\033[K"
echo -e "\033[K"
fi
if [ "${edit}" != "s" ]; then
if [ "${editc}" != "s" ]; then
echo -e "\033[K"
echo -e "\033[K"
echo -e "\033[K"
@@ -838,10 +837,10 @@ SITEINFO(){
echo -e "\033[K"
echo -e "\033[7A"
echo -en "\033[K\n\033[K\r${idsCL[LightCyan]}Enter the site number to edit: ${idsCL[Default]}"
echo -en "\033[K\n\033[K\r${idsCL[LightCyan]}Enter the item number to edit: ${idsCL[Default]}"
read -n 1 edit
case "${edit}" in
case "${editc}" in
0) echo -e "\033[K\n\033[K"
echo -en "\033[KEnter new Server Names (comma seperated): "
read -i "${servernames}" -e servernames
@@ -884,7 +883,7 @@ SITEINFO(){
;;
*) ;;
esac
[ "${edit}" == "" ] && echo -e "\033[13A" || echo -e "\033[12A"
[ "${editc}" == "" ] && echo -e "\033[13A" || echo -e "\033[12A"
else
for (( c=1; c<=5; c++ )); do echo -e "\033[K"; done; echo -e "\033[6A"
echo -en "\n\033[K${idsCL[LightCyan]}Confirm changes (Y/n): ${idsCL[Default]}"