-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_ScayNum.ps1
More file actions
163 lines (139 loc) · 4.13 KB
/
run_ScayNum.ps1
File metadata and controls
163 lines (139 loc) · 4.13 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# ScayNum PowerShell Launcher
# Advanced OSINT Tool by Scayar
param(
[switch]$Install,
[switch]$Update,
[switch]$Test,
[switch]$Help
)
# Colors for output
$Red = "Red"
$Green = "Green"
$Yellow = "Yellow"
$Cyan = "Cyan"
$White = "White"
function Write-ColorOutput {
param(
[string]$Message,
[string]$Color = $White
)
Write-Host $Message -ForegroundColor $Color
}
function Show-Banner {
Write-ColorOutput "========================================" $Cyan
Write-ColorOutput " ScayNum by Scayar" $Cyan
Write-ColorOutput "========================================" $Cyan
Write-Host ""
}
function Show-Help {
Show-Banner
Write-ColorOutput "Available commands:" $White
Write-ColorOutput " .\run_ScayNum.ps1 -Install - Install dependencies" $White
Write-ColorOutput " .\run_ScayNum.ps1 -Update - Update ScayNum" $White
Write-ColorOutput " .\run_ScayNum.ps1 -Test - Test installation" $White
Write-ColorOutput " .\run_ScayNum.ps1 -Help - Show this help" $White
Write-ColorOutput " .\run_ScayNum.ps1 - Run ScayNum" $White
Write-Host ""
Write-ColorOutput "Quick start:" $Yellow
Write-ColorOutput " .\run_ScayNum.ps1 -Install" $Yellow
Write-ColorOutput " .\run_ScayNum.ps1" $Yellow
}
function Install-Dependencies {
Write-ColorOutput "📦 Installing ScayNum dependencies..." $Cyan
try {
# Upgrade pip
Write-ColorOutput " Upgrading pip..." $White
python -m pip install --upgrade pip
# Install requirements
Write-ColorOutput " Installing requirements..." $White
pip install -r requirements.txt
Write-ColorOutput "✅ Installation completed!" $Green
}
catch {
Write-ColorOutput "❌ Installation failed: $($_.Exception.Message)" $Red
exit 1
}
}
function Update-ScayNum {
Write-ColorOutput "🔄 Updating ScayNum..." $Cyan
try {
# Check if git is available
$gitVersion = git --version 2>$null
if (-not $gitVersion) {
Write-ColorOutput "❌ Git is not installed" $Red
Write-ColorOutput "💡 Please install Git from: https://git-scm.com/" $Yellow
exit 1
}
# Pull latest changes
Write-ColorOutput " Pulling latest changes..." $White
git pull origin main
# Install updated requirements
Write-ColorOutput " Installing updated requirements..." $White
pip install -r requirements.txt
Write-ColorOutput "✅ Update completed!" $Green
}
catch {
Write-ColorOutput "❌ Update failed: $($_.Exception.Message)" $Red
exit 1
}
}
function Test-Installation {
Write-ColorOutput "🧪 Testing ScayNum installation..." $Cyan
try {
# Test Python imports
$testScript = @"
import sys
try:
import pyfiglet
import colorama
import requests
import beautifulsoup4
print('✅ All dependencies installed successfully!')
except ImportError as e:
print(f'❌ Missing dependency: {e}')
sys.exit(1)
"@
python -c $testScript
Write-ColorOutput "✅ Test completed!" $Green
}
catch {
Write-ColorOutput "❌ Test failed: $($_.Exception.Message)" $Red
exit 1
}
}
function Start-ScayNum {
Write-ColorOutput "🚀 Starting ScayNum..." $Cyan
try {
# Check if Python is available
$pythonVersion = python --version 2>$null
if (-not $pythonVersion) {
Write-ColorOutput "❌ Python is not installed or not in PATH" $Red
Write-ColorOutput "💡 Please install Python from: https://python.org/" $Yellow
exit 1
}
# Run ScayNum
python main.py
}
catch {
Write-ColorOutput "❌ Failed to start ScayNum: $($_.Exception.Message)" $Red
exit 1
}
}
# Main execution
if ($Help) {
Show-Help
exit 0
}
Show-Banner
if ($Install) {
Install-Dependencies
}
elseif ($Update) {
Update-ScayNum
}
elseif ($Test) {
Test-Installation
}
else {
Start-ScayNum
}