-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvalidate-modules.sh
More file actions
executable file
Β·82 lines (72 loc) Β· 1.86 KB
/
validate-modules.sh
File metadata and controls
executable file
Β·82 lines (72 loc) Β· 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
#
# NullSec Module Validator v1.1
# Quick module functionality validator
# Repository: https://github.com/bad-antics/nullsec
#
echo "ββ NULLSEC MODULE VALIDATION"
echo "β"
# Test modules that were reportedly broken
test_modules=(
"port-scanner"
"wifi-deauth"
"web-exploit"
"password-crack"
)
working=0
broken=0
for mod in "${test_modules[@]}"; do
echo "ββ Testing $mod..."
# Check if files exist
if [ ! -f ~/nullsec/nullsecurity/${mod}.sh ] || [ ! -f ~/nullsec/nullsecurity/${mod}.json ]; then
echo "β β Missing files"
((broken++))
continue
fi
# Check JSON validity
if ! python3 -m json.tool ~/nullsec/nullsecurity/${mod}.json >/dev/null 2>&1; then
echo "β β Invalid JSON"
((broken++))
continue
fi
# Check bash syntax
if ! bash -n ~/nullsec/nullsecurity/${mod}.sh 2>/dev/null; then
echo "β β Bash syntax error"
((broken++))
continue
fi
# Try to load with framework (just load, don't execute)
if timeout 2 python3 -c "
import sys
sys.path.insert(0, '/home/antics/nullsec')
from pathlib import Path
exec(open('/home/antics/nullsec/module-framework.py').read())
fw = InteractiveFramework()
config = fw.load_config_from_json('/home/antics/nullsec/nullsecurity/${mod}.json')
if config:
print('OK')
sys.exit(0)
else:
sys.exit(1)
" 2>/dev/null | grep -q "OK"; then
echo "β β
Working"
((working++))
else
echo "β β Framework load failed"
((broken++))
fi
done
echo "β"
echo "β°β VALIDATION COMPLETE"
echo ""
echo "π Results:"
echo " β
Working: $working"
echo " β Broken: $broken"
echo ""
if [ $broken -eq 0 ]; then
echo "π All tested modules are functional!"
exit 0
else
echo "β οΈ Some modules need attention"
exit 1
fi