Complete documentation overhaul with Web UI installation

This commit is contained in:
2026-01-01 18:04:03 +11:00
parent 84ac59485c
commit 04465f8d29
4 changed files with 680 additions and 201 deletions

View File

@@ -463,5 +463,57 @@ ln -fs /usr/share/sniper/loot/workspaces/ /root/Desktop/workspaces 2> /dev/null
echo -e "$OKBLUE[*]$RESET Cleaning up installation files... $RESET"
rm -Rf /tmp/arachni* /tmp/gobuster* /tmp/msfinstall /tmp/openssl.cnf 2> /dev/null
# ============================================================================
# ULTYSCAN WEB UI INSTALLATION
# ============================================================================
echo -e "$OKBLUE[*]$RESET Installing UltyScan Web Interface... $RESET"
# Install Apache and PHP
echo -e "$OKBLUE[*]$RESET Installing Apache and PHP... $RESET"
export DEBIAN_FRONTEND=noninteractive
apt install -y apache2 libapache2-mod-php php 2> /dev/null
# Enable PHP module
a2enmod php8.3 2>/dev/null || a2enmod php8.2 2>/dev/null || a2enmod php 2>/dev/null
# Create web UI directory
echo -e "$OKBLUE[*]$RESET Deploying Web UI files... $RESET"
mkdir -p /var/www/html/ultyscan
cp -r $INSTALL_DIR/webui/* /var/www/html/ultyscan/ 2>/dev/null
# Set permissions
chown -R www-data:www-data /var/www/html/ultyscan
chmod 755 /var/www/html/ultyscan/*.php
# Create log directory for web UI
mkdir -p /var/log/ultyscan
chown www-data:www-data /var/log/ultyscan
# Create symlink for loot access from web
ln -sf $LOOT_DIR /var/www/html/loot 2>/dev/null
# Configure sudoers for www-data to run sniper
echo -e "$OKBLUE[*]$RESET Configuring permissions for Web UI... $RESET"
echo 'www-data ALL=(ALL) NOPASSWD: /usr/bin/bash /usr/share/sniper/sniper *' > /etc/sudoers.d/www-data-sniper
echo 'www-data ALL=(ALL) NOPASSWD: /usr/bin/pkill *' >> /etc/sudoers.d/www-data-sniper
chmod 440 /etc/sudoers.d/www-data-sniper
# Restart Apache
systemctl restart apache2 2>/dev/null || service apache2 restart 2>/dev/null
# Get server IP for display
SERVER_IP=$(hostname -I 2>/dev/null | awk '{print $1}')
echo -e "$OKGREEN[OK]$RESET Web UI installed successfully! $RESET"
echo ""
echo -e "$OKRED[>]$RESET Done! $RESET"
echo -e "$OKRED[>]$RESET To run, type 'sniper'! $RESET"
echo -e "$OKRED[>]$RESET To run from command line, type 'sniper'! $RESET"
echo ""
echo -e "$OKBLUE============================================$RESET"
echo -e "$OKGREEN ULTYSCAN WEB INTERFACE$RESET"
echo -e "$OKBLUE============================================$RESET"
echo -e "$OKBLUE URL:$RESET http://$SERVER_IP/ultyscan/"
echo -e "$OKBLUE Logs:$RESET /var/log/ultyscan/"
echo -e "$OKBLUE Loot:$RESET /usr/share/sniper/loot/workspace/"
echo -e "$OKBLUE============================================$RESET"
echo ""