-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
54 lines (46 loc) · 1.55 KB
/
setup.bat
File metadata and controls
54 lines (46 loc) · 1.55 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
@echo off
setlocal
echo [OnionSpy] Windows setup started...
where python >nul 2>nul
if %errorlevel% neq 0 (
echo [ERROR] Python is not installed or not in PATH.
echo Install Python 3.13+ and run setup again.
exit /b 1
)
if not exist ".venv" (
echo [INFO] Creating virtual environment...
python -m venv .venv
if %errorlevel% neq 0 (
echo [ERROR] Failed to create virtual environment.
exit /b 1
)
)
echo [INFO] Installing dependencies...
call .venv\Scripts\python.exe -m pip install --upgrade pip
call .venv\Scripts\python.exe -m pip install -r requirements.txt
if %errorlevel% neq 0 (
echo [ERROR] Dependency installation failed.
exit /b 1
)
if not exist "config.yaml" (
if exist "example.config.yaml" (
echo [INFO] Creating config.yaml from example.config.yaml...
copy /Y example.config.yaml config.yaml >nul
) else (
echo [WARN] example.config.yaml not found. Create config.yaml manually.
)
)
if not exist "logs" mkdir logs
if not exist "data" mkdir data
if not exist "data\search_results" mkdir data\search_results
if not exist "data\relays_info" mkdir data\relays_info
if not exist "data\breaches_info" mkdir data\breaches_info
if not exist "data\crawled_sites_data" mkdir data\crawled_sites_data
echo.
echo [SUCCESS] Setup complete.
echo Next:
echo 1. Update config.yaml (tor_executable, tor_data_dir, proxy_url, optional mongodb/ollama values)
echo 2. Ensure Tor daemon is running with torcc-compatible ports
echo 3. Start OnionSpy: .venv\Scripts\python.exe main.py
echo.
exit /b 0