Facebook
From 121, 1 Month ago, written in Bash.
Embed
Download Paste or View Raw
Hits: 222
  1. #!/bin/bash
  2.  
  3. # 检查是否已经安装了Go
  4. if ! command -v go &> /dev/null; then
  5.     echo "Go is not installed. Please install Go first."
  6.     exit 1
  7. fi
  8.  
  9. # 安装Nuclei
  10. echo "Installing Nuclei..."
  11. go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
  12.  
  13. # 检查Nuclei是否成功安装
  14. if [ $? -eq 0 ]; then
  15.     echo "Nuclei installed successfully."
  16. else
  17.     echo "Failed to install Nuclei."
  18.     exit 1
  19. fi
  20.  
  21. # 安装Subfinder
  22. echo "Installing Subfinder..."
  23. go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
  24.  
  25. # 检查Subfinder是否成功安装
  26. if [ $? -eq 0 ]; then
  27.     echo "Subfinder installed successfully."
  28. else
  29.     echo "Failed to install Subfinder."
  30.     exit 1
  31. fi
  32.  
  33. echo "Initialization completed."
  34.