SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
generate-certificate: add validation
Brendan Coles6d1c101ffb41
diff --git a/generate-certificate b/generate-certificateindex 003816c9..ffb6b4a4 100755--- a/generate-certificate+++ b/generate-certificate@@ -1,4 +1,20 @@#!/bin/sh+if ! command -v openssl >/dev/null 2>&1 ; then+ echo "Error: Could not find openssl in \$PATH: $PATH"+ exit 1+fi++if test -f spiderfoot.key; then+ echo "Error: spiderfoot.key already exists"+ exit 1+fi++if test -f spiderfoot.crt; then+ echo "Error: spiderfoot.crt already exists"+ exit 1+fi+openssl req -new -newkey rsa:4096 -sha256 -x509 -days 365 -nodes -out spiderfoot.crt -keyout spiderfoot.key -subj "/CN=localhost"+chmod 600 spiderfoot.crtchmod 600 spiderfoot.key