BLACKSITE
:
3.133.148.180
:
103.154.184.216 / www.astitvaad.com
:
Linux vps.readyhost.in 4.18.0-553.6.1.el8.x86_64 #1 SMP Thu May 30 04:13:58 UTC 2024 x86_64
:
/
bin
/
Upload File:
files >> //bin/mongodssl
#!/bin/bash MONGO_CHECK=`whereis mongod | awk '{print $2}'` if [[ $MONGO_CHECK = "" ]] then echo "Mongodb not installed" exit else if [[ $# -eq 5 ]]; then COUNTRY=$1 STATE=$2 CITY=$3 ORG_NAME=$4 ORG_FQDN=$5 cd /etc/ssl/ openssl req -newkey rsa:2048 -new -x509 -days 365 -nodes -out $ORG_FQDN-mongodb-cert.crt -keyout $ORG_FQDN-mongodb-cert.key -subj "/C=$COUNTRY/ST=$STATE/L=$CITY/O=$ORG_NAME/OU=IT Department/CN=$ORG_FQDN" openssl req -nodes -newkey rsa:2048 -keyout $ORG_FQDN.key -out $ORG_FQDN.csr -subj "/C=$COUNTRY/ST=$STATE/L=CITY/O=$ORG_NAME/OU=IT Department/CN=$ORG_FQDN" cat $ORG_FQDN-mongodb-cert.key $ORG_FQDN-mongodb-cert.crt > $ORG_FQDN-mongodb.pem sed -i '/net:/a\ ssl:\n\ mode:\ requireSSL\n\ PEMKeyFile:\ \/etc\/ssl\/'$ORG_FQDN'-mongodb.pem' /etc/mongod.conf else echo "Please pass the proper arguments" fi fi