-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall_PhantomEye.bat
More file actions
132 lines (120 loc) · 5.04 KB
/
Install_PhantomEye.bat
File metadata and controls
132 lines (120 loc) · 5.04 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
@echo off
:: =============================================================================
:: PhantomEye v2.1.0 — Installer
:: Red Parrot Accounting Ltd
::
:: What this does:
:: 1. Checks Python is installed
:: 2. Creates log, feeds, and gui directories
:: 3. Copies all modules to permanent location
:: 4. Downloads threat feeds
:: 5. Creates scheduled tasks (runs as current user, NOT SYSTEM)
:: 6. Launches the GUI
:: =============================================================================
title PhantomEye v2.1.0 — Installer
echo.
echo ============================================================
echo PhantomEye v2.1.0 — Threat Intelligence Platform
echo Red Parrot Accounting Ltd
echo ============================================================
echo.
net session >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Please right-click and "Run as administrator"
pause & exit /b 1
)
echo [1/5] Checking Python...
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python not found. Download from https://www.python.org/downloads/
echo Tick "Add Python to PATH" during install.
pause & exit /b 1
)
python --version
echo Python OK.
echo.
echo [2/5] PhantomEye uses only Python built-in libraries. No pip required.
echo.
echo [3/5] Creating directories...
if not exist "C:\SecurityLogs\PhantomEye\feeds" mkdir "C:\SecurityLogs\PhantomEye\feeds"
if not exist "C:\SecurityLogs\PhantomEye\gui" mkdir "C:\SecurityLogs\PhantomEye\gui"
if not exist "C:\SecurityLogs\PhantomEye\assets" mkdir "C:\SecurityLogs\PhantomEye\assets"
echo Directories ready.
echo.
echo [4/5] Copying PhantomEye modules...
for %%f in (main.py config.py logger.py database.py utils.py feeds.py lookup.py alerts.py scanner.py geolocation.py reports.py monitor.py custom_feeds.py) do (
copy /Y "%~dp0%%f" "C:\SecurityLogs\PhantomEye\%%f" >nul
if %errorlevel% neq 0 (
echo [ERROR] Could not copy %%f
pause & exit /b 1
)
)
:: Copy gui package
copy /Y "%~dp0gui\__init__.py" "C:\SecurityLogs\PhantomEye\gui\__init__.py" >nul
copy /Y "%~dp0gui\app.py" "C:\SecurityLogs\PhantomEye\gui\app.py" >nul
copy /Y "%~dp0gui\theme.py" "C:\SecurityLogs\PhantomEye\gui\theme.py" >nul
copy /Y "%~dp0gui\tab_dashboard.py" "C:\SecurityLogs\PhantomEye\gui\tab_dashboard.py" >nul
copy /Y "%~dp0gui\tab_lookup.py" "C:\SecurityLogs\PhantomEye\gui\tab_lookup.py" >nul
copy /Y "%~dp0gui\tab_email.py" "C:\SecurityLogs\PhantomEye\gui\tab_email.py" >nul
copy /Y "%~dp0gui\tab_alerts.py" "C:\SecurityLogs\PhantomEye\gui\tab_alerts.py" >nul
copy /Y "%~dp0gui\tab_feeds.py" "C:\SecurityLogs\PhantomEye\gui\tab_feeds.py" >nul
copy /Y "%~dp0gui\tab_monitor.py" "C:\SecurityLogs\PhantomEye\gui\tab_monitor.py" >nul
copy /Y "%~dp0gui\tooltip.py" "C:\SecurityLogs\PhantomEye\gui\tooltip.py" >nul
:: Copy assets
copy /Y "%~dp0assets\header.png" "C:\SecurityLogs\PhantomEye\assets\header.png" >nul
echo All modules copied.
echo.
echo [5/5] Creating scheduled tasks (running as %USERNAME%, not SYSTEM)...
schtasks /delete /tn "PhantomEye Feed Update" /f >nul 2>&1
schtasks /delete /tn "PhantomEye Morning Scan" /f >nul 2>&1
:: Feed update every 6 hours — runs as current user
schtasks /create ^
/tn "PhantomEye Feed Update" ^
/tr "python C:\SecurityLogs\PhantomEye\main.py --update-feeds" ^
/sc HOURLY /mo 6 ^
/ru "%USERNAME%" /f >nul
if %errorlevel% equ 0 (
echo Task created: Feed update every 6 hours
) else (
echo [WARNING] Could not create feed update task. Run --update-feeds manually.
)
:: Morning scan at 6 AM daily — runs as current user
schtasks /create ^
/tn "PhantomEye Morning Scan" ^
/tr "python C:\SecurityLogs\PhantomEye\main.py --scan" ^
/sc DAILY /st 06:00 ^
/ru "%USERNAME%" /f >nul
if %errorlevel% equ 0 (
echo Task created: Network scan daily at 6:00 AM
) else (
echo [WARNING] Could not create morning scan task. Run --scan manually.
)
echo.
echo ============================================================
echo Downloading threat feeds (requires internet, 1-2 minutes)...
echo ============================================================
echo.
python "C:\SecurityLogs\PhantomEye\main.py" --update-feeds
echo.
echo ============================================================
echo INSTALLATION COMPLETE
echo Red Parrot Accounting Ltd
echo ============================================================
echo.
echo Launching PhantomEye GUI...
echo.
start "" python "C:\SecurityLogs\PhantomEye\main.py" --gui
echo.
echo To open PhantomEye at any time:
echo python C:\SecurityLogs\PhantomEye\main.py --gui
echo.
echo IMPORTANT — Email alerts (optional):
echo If you enable EMAIL_ENABLED = True in config.py, set your password
echo as an environment variable (never put it in the script):
echo PowerShell (run as admin):
echo [System.Environment]::SetEnvironmentVariable(
echo 'PHANTOMEYE_EMAIL_PASSWORD','your_password','Machine')
echo.
echo Log: C:\SecurityLogs\PhantomEye\phantom_eye.log
echo.
pause