-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup-pentesting-menu.sh
More file actions
executable file
Β·148 lines (117 loc) Β· 4.74 KB
/
setup-pentesting-menu.sh
File metadata and controls
executable file
Β·148 lines (117 loc) Β· 4.74 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/bin/bash
#############################################################################
# NULLSEC LINUX - PENTESTING MENU SETUP v1.1 #
# Repository: https://github.com/bad-antics/nullsec #
#############################################################################
# Adds "Pentesting" category to start menu below Games
# Includes all NullSec tools in the new category
#############################################################################
set -e
CYAN='\033[0;36m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
echo -e "${CYAN}"
cat << "EOF"
====
| NULLSEC LINUX - PENTESTING MENU INSTALLER |
====
EOF
echo -e "${NC}"
echo -e "${GREEN}[+] Setting up Pentesting category in start menu...${NC}"
# Create directory file for Pentesting category
echo -e "${YELLOW}[*] Creating Pentesting.directory file...${NC}"
sudo tee /usr/share/desktop-directories/NullSec-Pentesting.directory > /dev/null << 'DIREOF'
[Desktop Entry]
Name=β’ Pentesting
Name[en]=β’ Pentesting
Comment=NullSec Penetration Testing Tools
Type=Directory
Icon=/usr/share/icons/hicolor/256x256/apps/nullsec.png
DIREOF
echo -e "${GREEN}[β] Created NullSec-Pentesting.directory${NC}"
# Backup original menu file
echo -e "${YELLOW}[*] Backing up menu configuration...${NC}"
sudo cp /etc/xdg/menus/mate-applications.menu /etc/xdg/menus/mate-applications.menu.bak
# Create menu entry (insert after Games section)
echo -e "${YELLOW}[*] Adding Pentesting menu after Games...${NC}"
# Create temp file with Pentesting menu entry
cat > /tmp/pentesting-menu.xml << 'MENUEOF'
<!-- Pentesting (NullSec Linux) -->
<Menu>
<Name>Pentesting</Name>
<Directory>NullSec-Pentesting.directory</Directory>
<Include>
<Or>
<Category>Pentesting</Category>
<Filename>nullsec-launcher.desktop</Filename>
<Filename>nullsec-desktop.desktop</Filename>
</Or>
</Include>
</Menu> <!-- End Pentesting -->
MENUEOF
# Insert after Games section
sudo sed -i '/<\/Menu> <!-- End Games -->/r /tmp/pentesting-menu.xml' /etc/xdg/menus/mate-applications.menu
echo -e "${GREEN}[β] Added Pentesting menu section${NC}"
# Update desktop files to include Pentesting category
echo -e "${YELLOW}[*] Updating NullSec desktop files...${NC}"
# Update nullsec-launcher.desktop
if [ -f "$HOME/.local/share/applications/nullsec-launcher.desktop" ]; then
sed -i 's/Categories=Security;System;/Categories=Pentesting;Security;System;/' \
"$HOME/.local/share/applications/nullsec-launcher.desktop"
echo -e "${GREEN}[β] Updated nullsec-launcher.desktop${NC}"
fi
# Update nullsec-desktop.desktop
if [ -f "$HOME/.local/share/applications/nullsec-desktop.desktop" ]; then
sed -i 's/Categories=Security;System;/Categories=Pentesting;Security;System;/' \
"$HOME/.local/share/applications/nullsec-desktop.desktop"
echo -e "${GREEN}[β] Updated nullsec-desktop.desktop${NC}"
fi
# Update in nullsec directory as well
if [ -f "$HOME/nullsec/nullsec-launcher.desktop" ]; then
sed -i 's/Categories=Security;System;/Categories=Pentesting;Security;System;/' \
"$HOME/nullsec/nullsec-launcher.desktop"
fi
if [ -f "$HOME/nullsec/nullsec-desktop/nullsec-desktop.desktop" ]; then
sed -i 's/Categories=Security;System;/Categories=Pentesting;Security;System;/' \
"$HOME/nullsec/nullsec-desktop/nullsec-desktop.desktop"
fi
# Refresh menu cache
echo -e "${YELLOW}[*] Refreshing application menu cache...${NC}"
update-desktop-database ~/.local/share/applications/ 2>/dev/null || true
xdg-desktop-menu forceupdate 2>/dev/null || true
# Restart MATE panel to apply changes
echo -e "${YELLOW}[*] Restarting MATE panel...${NC}"
killall mate-panel 2>/dev/null && sleep 2 && mate-panel &
disown
echo -e "${GREEN}"
cat << "EOF"
====
| β
INSTALLATION COMPLETE |
====
π― PENTESTING MENU ADDED!
The following has been configured:
π Menu Structure:
ββ Games
ββ β’ Pentesting β NEW!
β ββ NullSec Framework Launcher
β ββ NullSec Desktop GUI
ββ Graphics
ββ ...
π Files Created:
β’ /usr/share/desktop-directories/NullSec-Pentesting.directory
β’ /etc/xdg/menus/mate-applications.menu.bak (backup)
π§ Files Updated:
β’ /etc/xdg/menus/mate-applications.menu
β’ ~/.local/share/applications/nullsec-launcher.desktop
β’ ~/.local/share/applications/nullsec-desktop.desktop
π Access:
Click: Applications β Pentesting β NullSec Framework Launcher
β‘ Quick Test:
Open the Applications menu and look for "β’ Pentesting"
It should appear right below "Games"
NOTE: If menu doesn't update immediately, log out and back in.
EOF
echo -e "${NC}"
exit 0