Skip to content

Commit 473fcd8

Browse files
authored
Create fix-all-wrappers.sh
1 parent b281ffb commit 473fcd8

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

scripts/fix-all-wrappers.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
2+
set -e
3+
4+
echo "🛠️ 516 Hackers - Comprehensive Wrapper Fix"
5+
echo "==========================================="
6+
7+
# Create logs directory
8+
echo "📁 Creating logs directory..."
9+
mkdir -p logs
10+
11+
# List of all wrapper scripts to fix
12+
wrappers=(
13+
"tools/reconnaissance/whois-wrapper.sh"
14+
"tools/reconnaissance/subfinder-wrapper.sh"
15+
"tools/network/nmap-wrapper.sh"
16+
"tools/network/masscan-wrapper.sh"
17+
"tools/network/rustscan-wrapper.sh"
18+
"tools/web/gobuster-wrapper.sh"
19+
"tools/web/ffuf-wrapper.sh"
20+
"tools/web/dirb-wrapper.sh"
21+
"tools/vulnerability/nikto-wrapper.sh"
22+
"tools/vulnerability/nuclei-wrapper.sh"
23+
"tools/vulnerability/wpscan-wrapper.sh"
24+
"tools/password/john-wrapper.sh"
25+
"tools/password/hashcat-wrapper.sh"
26+
"tools/analysis/exiftool-wrapper.sh"
27+
"tools/utils/ffmpeg-wrapper.sh"
28+
)
29+
30+
echo "🔧 Fixing log paths in wrapper scripts..."
31+
for wrapper in "${wrappers[@]}"; do
32+
if [ -f "$wrapper" ]; then
33+
echo "Fixing: $wrapper"
34+
35+
# Create temporary file
36+
temp_file=$(mktemp)
37+
38+
# Process the file line by line
39+
while IFS= read -r line; do
40+
# Replace ../../logs with ./logs
41+
modified_line="${line//..\/..\/logs/.\/logs}"
42+
echo "$modified_line" >> "$temp_file"
43+
done < "$wrapper"
44+
45+
# Replace original file
46+
mv "$temp_file" "$wrapper"
47+
48+
# Make executable
49+
chmod +x "$wrapper"
50+
51+
echo "✅ Fixed: $wrapper"
52+
else
53+
echo "⚠️ Not found: $wrapper"
54+
fi
55+
done
56+
57+
# Fix Python scripts permissions
58+
echo "🐍 Fixing Python script permissions..."
59+
find tools -name "*.py" -exec chmod +x {} \; 2>/dev/null
60+
61+
echo ""
62+
echo "🎉 All wrappers have been fixed!"
63+
echo "📁 Logs directory: ./logs/"
64+
echo ""
65+
echo "🚀 Testing fixes..."
66+
./tools/reconnaissance/whois-wrapper.sh example.com > /dev/null 2>&1 && echo "✅ WHOIS wrapper working" || echo "❌ WHOIS wrapper failed"

0 commit comments

Comments
 (0)