403Webshell
Server IP : 199.250.200.62  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : jasonp18 ( 1000)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2/cwd/opt/imh-python/lib/python3.9/site-packages/slapdtest/certs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/2/cwd/opt/imh-python/lib/python3.9/site-packages/slapdtest/certs/gencerts.sh
#!/bin/sh
# Written by Christian Heimes
set -e

export CAOUTDIR=.
export CATMPDIR=tmp

rm -rf $CATMPDIR
rm -rf ca.pem ca.key server.pem server.key client.pem client.key
rm -rf cert9.db key4.db pkcs11.tx

mkdir -p $CAOUTDIR
mkdir -p $CATMPDIR

touch $CATMPDIR/ca.db
touch $CATMPDIR/ca.db.attr
echo '01' > $CATMPDIR/ca.crt.srl
echo '01' > $CATMPDIR/ca.crl.srl

# root CA
openssl req -new \
    -config ca.conf \
    -out $CATMPDIR/ca.csr \
    -keyout $CAOUTDIR/ca.key \
    -batch

openssl ca -selfsign \
    -config ca.conf \
    -in $CATMPDIR/ca.csr \
    -out $CAOUTDIR/ca.pem \
    -extensions ca_ext \
    -days 356300 \
    -batch

# server cert
openssl req -new \
    -config server.conf \
    -out $CATMPDIR/server.csr \
    -keyout $CAOUTDIR/server.key \
    -batch

openssl ca \
    -config ca.conf \
    -in $CATMPDIR/server.csr \
    -out $CAOUTDIR/server.pem \
    -policy match_pol \
    -extensions server_ext \
    -batch

# client cert
openssl req -new \
    -config client.conf \
    -out $CATMPDIR/client.csr \
    -keyout $CAOUTDIR/client.key \
    -batch

openssl ca \
    -config ca.conf \
    -in $CATMPDIR/client.csr \
    -out $CAOUTDIR/client.pem \
    -policy match_pol \
    -extensions client_ext \
    -batch

# cleanup
rm -rf $CATMPDIR ca.key

echo DONE

Youez - 2016 - github.com/yon3zu
LinuXploit