[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.220.130.220: ~ $
#!/bin/bash

if [ $# -eq 0 ]; then
	echo $"Usage: `basename $0` filename" 1>&2
	exit 1
fi

PEM=$1
REQ=`/bin/mktemp /tmp/openssl.XXXXXX`
KEY=`/bin/mktemp /tmp/openssl.XXXXXX`
CRT=`/bin/mktemp /tmp/openssl.XXXXXX`
NEW=${PEM}_

trap "rm -f $REQ $KEY $CRT $NEW" SIGINT

if [ ! -f $PEM ]; then
	echo "$PEM: file not found" 1>&2
	exit 1
fi

let -a SERIAL=0x$(openssl x509 -in $PEM -noout -serial | cut -d= -f2)
let SERIAL++

umask 077

OWNER=`ls -l $PEM | awk '{ printf "%s.%s", $3, $4; }'`

openssl rsa -inform pem -in $PEM -out $KEY
openssl x509 -x509toreq -in $PEM -signkey $KEY -out $REQ
openssl x509 -req -in $REQ -signkey $KEY -set_serial $SERIAL -days 365 \
	-extfile /etc/pki/tls/openssl.cnf -extensions v3_ca -out $CRT

(cat $KEY ; echo "" ; cat $CRT) > $NEW

chown $OWNER $NEW

mv -f $NEW $PEM

rm -f $REQ $KEY $CRT

exit 0


Filemanager

Name Type Size Permission Actions
Makefile File 2.46 KB 0644
ca-bundle.crt File 221.18 KB 0444
ca-bundle.trust.crt File 493.15 KB 0444
hmhcc472.hostpapavps.net.crt File 1.19 KB 0644
localhost.crt File 1.42 KB 0600
make-dummy-cert File 610 B 0755
renew-dummy-cert File 829 B 0755
vps.hostpapavps.net.crt File 1.19 KB 0644