Repository navigation
Expand file tree
/
Copy pathinstall.ps1
More file actions
424 lines (375 loc) · 55.2 KB
/
Copy pathinstall.ps1
File metadata and controls
424 lines (375 loc) · 55.2 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
# WireFox Installer Script
# https://github.com/TalviFox/WireFox
# Automated Roaming & Watchdog Manager for WireGuard on Windows
[CmdletBinding(DefaultParameterSetName = "Default")]
param(
[Parameter(Position = 0)]
[string]$Path,
[switch]$Force,
[switch]$Build
)
# Console environment normalization (ensures 24-bit TrueColor and black background in legacy conhost)
try {
if (-not ([System.Management.Automation.PSTypeName]'Win32.ConsoleVT').Type) {
Add-Type -MemberDefinition @'
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr GetStdHandle(int nStdHandle);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool SetConsoleTextAttribute(IntPtr hConsoleHandle, ushort wAttributes);
'@ -Name 'ConsoleVT' -Namespace 'Win32'
}
$hStdOut = [Win32.ConsoleVT]::GetStdHandle(-11)
[Win32.ConsoleVT]::SetConsoleTextAttribute($hStdOut, 0x0007) | Out-Null
$consoleMode = 0
if ([Win32.ConsoleVT]::GetConsoleMode($hStdOut, [ref]$consoleMode)) {
[Win32.ConsoleVT]::SetConsoleMode($hStdOut, ($consoleMode -bor 0x0004)) | Out-Null
}
} catch {}
try {
$host.UI.RawUI.BackgroundColor = 'Black'
$host.UI.RawUI.ForegroundColor = 'White'
Clear-Host
} catch {}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$ErrorActionPreference = "Stop"
$OutputEncoding = [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$esc = [char]27
$u = [char]0x2580
$d = [char]0x2584
$guardianBanner = @"
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;7;5;5m$esc[49m$d$esc[38;2;23;30;35m$esc[49m$d$esc[38;2;0;0;0m$esc[48;2;39;78;98m$u$esc[38;2;13;20;24m$esc[48;2;117;163;184m$u$esc[38;2;14;21;26m$esc[48;2;107;153;176m$u$esc[38;2;0;0;0m$esc[48;2;39;79;99m$u$esc[38;2;23;30;34m$esc[49m$d$esc[38;2;7;5;4m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;0;0;0m$esc[49m$d$esc[38;2;0;0;0m$esc[49m$d$esc[38;2;17;25;29m$esc[49m$d$esc[38;2;0;0;0m$esc[48;2;46;72;88m$u$esc[38;2;4;2;2m$esc[48;2;53;88;114m$u$esc[38;2;33;48;57m$esc[48;2;34;51;63m$u$esc[38;2;48;78;98m$esc[48;2;33;73;114m$u$esc[38;2;58;108;139m$esc[48;2;28;71;122m$u$esc[38;2;63;134;173m$esc[48;2;18;54;92m$u$esc[38;2;38;125;169m$esc[48;2;16;71;99m$u$esc[38;2;86;114;143m$esc[48;2;9;102;122m$u$esc[38;2;75;104;135m$esc[48;2;9;103;122m$u$esc[38;2;39;125;169m$esc[48;2;16;73;99m$u$esc[38;2;62;131;170m$esc[48;2;17;55;93m$u$esc[38;2;58;108;139m$esc[48;2;28;70;120m$u$esc[38;2;47;77;98m$esc[48;2;32;72;112m$u$esc[38;2;31;47;56m$esc[48;2;32;51;62m$u$esc[38;2;2;2;2m$esc[48;2;52;89;115m$u$esc[38;2;0;0;0m$esc[48;2;45;71;87m$u$esc[38;2;17;25;29m$esc[49m$d$esc[38;2;0;0;0m$esc[49m$d$esc[38;2;0;0;0m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $([char]::ConvertFromUtf32(0x1F98A)) $esc[1;36mWireFox$esc[0m $esc[1;34mv1.0.6$esc[0m
$esc[38;2;9;12;14m$esc[49m$d$esc[38;2;0;0;0m$esc[48;2;52;83;104m$u$esc[38;2;12;15;15m$esc[48;2;61;109;145m$u$esc[38;2;30;44;51m$esc[48;2;51;104;149m$u$esc[38;2;45;74;94m$esc[48;2;39;88;139m$u$esc[38;2;55;97;126m$esc[48;2;25;59;111m$u$esc[38;2;54;107;148m$esc[48;2;18;40;84m$u$esc[38;2;43;92;143m$esc[48;2;10;48;84m$u$esc[38;2;14;32;56m$esc[48;2;11;26;33m$u$esc[38;2;26;23;19m$esc[48;2;75;69;69m$u$esc[38;2;13;17;26m$esc[48;2;40;35;32m$u$esc[38;2;11;74;95m$esc[48;2;8;88;98m$u$esc[38;2;13;138;151m$esc[48;2;14;110;136m$u$esc[38;2;12;133;148m$esc[48;2;11;68;96m$u$esc[38;2;14;126;145m$esc[48;2;11;74;101m$u$esc[38;2;16;102;127m$esc[48;2;17;43;79m$u$esc[38;2;15;116;136m$esc[48;2;18;36;74m$u$esc[38;2;13;134;148m$esc[48;2;20;79;114m$u$esc[38;2;11;74;95m$esc[48;2;9;76;88m$u$esc[38;2;14;17;26m$esc[48;2;39;37;34m$u$esc[38;2;26;23;19m$esc[48;2;74;69;68m$u$esc[38;2;14;33;58m$esc[48;2;11;27;33m$u$esc[38;2;42;92;143m$esc[48;2;10;48;84m$u$esc[38;2;54;107;147m$esc[48;2;18;39;84m$u$esc[38;2;55;97;126m$esc[48;2;26;60;111m$u$esc[38;2;46;75;94m$esc[48;2;39;88;140m$u$esc[38;2;30;43;51m$esc[48;2;51;103;149m$u$esc[38;2;12;14;16m$esc[48;2;61;109;146m$u$esc[38;2;0;0;0m$esc[48;2;52;83;104m$u$esc[38;2;9;12;15m$esc[49m$d$esc[0m $esc[90mWireGuard Companion for Windows$esc[0m
$esc[38;2;3;6;11m$esc[48;2;2;4;8m$u$esc[38;2;37;81;122m$esc[48;2;20;56;99m$u$esc[38;2;44;87;130m$esc[48;2;29;64;107m$u$esc[38;2;14;39;81m$esc[48;2;12;116;129m$u$esc[38;2;12;46;80m$esc[48;2;13;167;176m$u$esc[38;2;12;75;98m$esc[48;2;13;131;147m$u$esc[38;2;13;112;127m$esc[48;2;17;132;154m$u$esc[38;2;9;101;107m$esc[48;2;1;52;61m$u$esc[38;2;43;57;57m$esc[48;2;65;42;42m$u$esc[38;2;174;117;126m$esc[48;2;237;157;170m$u$esc[38;2;62;59;59m$esc[48;2;182;173;175m$u$esc[38;2;17;15;18m$esc[48;2;91;90;86m$u$esc[38;2;8;53;75m$esc[48;2;3;37;54m$u$esc[38;2;13;87;116m$esc[48;2;10;50;67m$u$esc[38;2;13;91;118m$esc[48;2;1;34;46m$u$esc[38;2;19;58;95m$esc[48;2;4;22;39m$u$esc[38;2;21;54;93m$esc[48;2;14;33;56m$u$esc[38;2;12;30;58m$esc[48;2;4;18;40m$u$esc[38;2;17;11;16m$esc[48;2;91;93;89m$u$esc[38;2;63;60;60m$esc[48;2;182;173;175m$u$esc[38;2;174;117;125m$esc[48;2;238;156;170m$u$esc[38;2;43;57;57m$esc[48;2;64;42;41m$u$esc[38;2;9;103;109m$esc[48;2;1;38;50m$u$esc[38;2;13;113;129m$esc[48;2;17;125;148m$u$esc[38;2;12;75;98m$esc[48;2;12;130;146m$u$esc[38;2;13;46;80m$esc[48;2;12;167;174m$u$esc[38;2;14;39;82m$esc[48;2;12;116;130m$u$esc[38;2;44;88;131m$esc[48;2;29;64;106m$u$esc[38;2;37;80;122m$esc[48;2;19;56;98m$u$esc[38;2;3;6;10m$esc[48;2;2;4;8m$u$esc[0m
$esc[38;2;3;5;10m$esc[48;2;1;2;4m$u$esc[38;2;25;61;104m$esc[48;2;13;42;84m$u$esc[38;2;26;78;121m$esc[48;2;25;77;121m$u$esc[38;2;12;145;159m$esc[48;2;12;130;144m$u$esc[38;2;12;111;132m$esc[48;2;13;117;137m$u$esc[38;2;12;125;144m$esc[48;2;13;155;169m$u$esc[38;2;16;97;124m$esc[48;2;17;138;158m$u$esc[38;2;1;50;59m$esc[48;2;1;45;54m$u$esc[38;2;148;92;98m$esc[48;2;174;106;114m$u$esc[38;2;255;155;173m$esc[48;2;255;158;174m$u$esc[38;2;255;233;238m$esc[48;2;234;158;170m$u$esc[38;2;145;151;150m$esc[48;2;163;155;150m$u$esc[38;2;0;6;12m$esc[48;2;36;14;5m$u$esc[38;2;34;22;17m$esc[48;2;77;45;32m$u$esc[38;2;67;32;19m$esc[48;2;103;60;42m$u$esc[38;2;59;25;10m$esc[48;2;136;103;89m$u$esc[38;2;28;16;12m$esc[48;2;97;70;58m$u$esc[38;2;0;1;9m$esc[48;2;34;13;4m$u$esc[38;2;145;151;150m$esc[48;2;163;155;150m$u$esc[38;2;255;233;239m$esc[48;2;232;155;169m$u$esc[38;2;255;155;173m$esc[48;2;255;157;172m$u$esc[38;2;147;86;92m$esc[48;2;174;108;117m$u$esc[38;2;0;65;73m$esc[48;2;0;20;23m$u$esc[38;2;19;144;166m$esc[48;2;8;47;54m$u$esc[38;2;13;126;145m$esc[48;2;9;53;74m$u$esc[38;2;12;114;136m$esc[48;2;12;84;113m$u$esc[38;2;14;146;159m$esc[48;2;14;136;150m$u$esc[38;2;26;78;122m$esc[48;2;25;75;118m$u$esc[38;2;25;61;104m$esc[48;2;12;42;82m$u$esc[38;2;2;5;9m$esc[48;2;1;2;5m$u$esc[0m $esc[1;37mHighlights:$esc[0m
$esc[38;2;25;26;27m$esc[48;2;16;18;21m$u$esc[38;2;79;86;110m$esc[48;2;162;164;175m$u$esc[38;2;21;72;104m$esc[48;2;95;148;161m$u$esc[38;2;13;136;151m$esc[48;2;0;125;141m$u$esc[38;2;13;113;134m$esc[48;2;18;123;144m$u$esc[38;2;14;157;172m$esc[48;2;10;51;60m$u$esc[38;2;18;140;162m$esc[48;2;5;17;26m$u$esc[38;2;0;28;42m$esc[48;2;26;22;19m$u$esc[38;2;167;102;110m$esc[48;2;198;120;126m$u$esc[38;2;247;140;158m$esc[48;2;233;159;171m$u$esc[38;2;248;207;216m$esc[48;2;140;117;105m$u$esc[38;2;187;171;163m$esc[48;2;115;80;66m$u$esc[38;2;86;38;20m$esc[48;2;90;48;32m$u$esc[38;2;94;53;36m$esc[48;2;90;47;31m$u$esc[38;2;101;62;47m$esc[48;2;103;63;48m$u$esc[38;2;255;255;255m$esc[48;2;245;242;241m$u$esc[38;2;174;154;146m$esc[48;2;232;227;225m$u$esc[38;2;66;13;0m$esc[48;2;181;163;156m$u$esc[38;2;191;175;166m$esc[48;2;109;74;59m$u$esc[38;2;247;206;215m$esc[48;2;163;145;135m$u$esc[38;2;248;138;156m$esc[48;2;246;174;187m$u$esc[38;2;162;104;115m$esc[48;2;186;114;119m$u$esc[38;2;27;12;5m$esc[48;2;76;43;26m$u$esc[38;2;57;20;8m$esc[48;2;68;34;21m$u$esc[38;2;2;42;59m$esc[48;2;5;73;86m$u$esc[38;2;13;84;115m$esc[48;2;18;118;140m$u$esc[38;2;13;141;156m$esc[48;2;1;130;145m$u$esc[38;2;20;72;103m$esc[48;2;96;150;164m$u$esc[38;2;78;84;107m$esc[48;2;163;164;175m$u$esc[38;2;25;26;28m$esc[48;2;16;18;21m$u$esc[0m $esc[32m*$esc[0m $esc[1mAuto-Roaming:$esc[0m Bypasses on trusted Wi-Fi
$esc[38;2;2;3;8m$esc[48;2;1;3;8m$u$esc[38;2;89;109;134m$esc[48;2;27;80;119m$u$esc[38;2;84;175;186m$esc[48;2;25;152;177m$u$esc[38;2;2;147;159m$esc[48;2;9;94;99m$u$esc[38;2;11;120;140m$esc[48;2;24;17;16m$u$esc[38;2;7;36;38m$esc[48;2;53;32;26m$u$esc[38;2;72;32;18m$esc[48;2;97;53;35m$u$esc[38;2;85;44;27m$esc[48;2;202;188;183m$u$esc[38;2;209;186;183m$esc[48;2;251;253;253m$u$esc[38;2;248;247;247m$esc[48;2;245;242;240m$u$esc[38;2;90;47;31m$esc[48;2;106;65;50m$u$esc[38;2;88;44;27m$esc[48;2;95;51;37m$u$esc[38;2;95;54;37m$esc[48;2;83;39;22m$u$esc[38;2;93;51;35m$esc[48;2;163;139;129m$u$esc[38;2;109;73;58m$esc[48;2;238;235;233m$u$esc[38;2;242;238;237m$esc[48;2;254;253;253m$u$esc[38;2;255;255;255m$esc[48;2;241;236;234m$u$esc[38;2;225;218;215m$esc[48;2;108;73;58m$u$esc[38;2;83;38;21m$esc[48;2;91;49;30m$u$esc[38;2;93;52;36m$esc[48;2;100;57;41m$u$esc[38;2;236;232;230m$esc[48;2;108;69;54m$u$esc[38;2;139;99;88m$esc[48;2;222;219;215m$u$esc[38;2;98;54;36m$esc[48;2;178;156;147m$u$esc[38;2;61;23;13m$esc[48;2;54;15;5m$u$esc[38;2;5;76;87m$esc[48;2;9;67;84m$u$esc[38;2;17;124;145m$esc[48;2;15;116;142m$u$esc[38;2;1;129;144m$esc[48;2;10;160;168m$u$esc[38;2;95;184;194m$esc[48;2;27;150;172m$u$esc[38;2;91;110;134m$esc[48;2;27;80;119m$u$esc[38;2;2;3;8m$esc[48;2;1;3;7m$u$esc[0m $esc[36m*$esc[0m $esc[1mARP Anti-Spoof:$esc[0m Gateway MAC detection
$esc[38;2;2;3;8m$esc[48;2;1;3;5m$u$esc[38;2;31;88;126m$esc[48;2;29;82;116m$u$esc[38;2;20;153;177m$esc[48;2;31;157;185m$u$esc[38;2;2;17;24m$esc[48;2;16;124;137m$u$esc[38;2;84;45;29m$esc[48;2;81;104;99m$u$esc[38;2;98;51;33m$esc[48;2;141;120;116m$u$esc[38;2;76;32;14m$esc[48;2;209;197;191m$u$esc[38;2;218;210;206m$esc[48;2;246;244;243m$u$esc[38;2;247;245;244m$esc[48;2;143;117;104m$u$esc[38;2;218;210;207m$esc[48;2;88;39;29m$u$esc[38;2;32;24;18m$esc[48;2;93;134;107m$u$esc[38;2;22;25;16m$esc[48;2;0;93;32m$u$esc[38;2;16;10;6m$esc[48;2;17;64;32m$u$esc[38;2;149;138;135m$esc[48;2;113;130;120m$u$esc[38;2;255;255;255m$esc[48;2;254;254;254m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;154;147;143m$esc[48;2;114;119;137m$u$esc[38;2;14;7;6m$esc[48;2;0;12;76m$u$esc[38;2;25;21;30m$esc[48;2;63;80;155m$u$esc[38;2;27;13;13m$esc[48;2;107;114;153m$u$esc[38;2;86;44;27m$esc[48;2;92;50;27m$u$esc[38;2;246;244;243m$esc[48;2;230;224;223m$u$esc[38;2;185;165;157m$esc[48;2;233;227;224m$u$esc[38;2;25;0;0m$esc[48;2;194;189;186m$u$esc[38;2;0;23;29m$esc[48;2;179;168;167m$u$esc[38;2;13;122;126m$esc[48;2;23;50;48m$u$esc[38;2;10;124;137m$esc[48;2;11;122;135m$u$esc[38;2;19;141;166m$esc[48;2;32;159;186m$u$esc[38;2;30;89;127m$esc[48;2;29;80;114m$u$esc[38;2;2;3;8m$esc[48;2;1;2;5m$u$esc[0m $esc[33m*$esc[0m $esc[1mWatchdog:$esc[0m Recovers silent UDP drops
$esc[38;2;0;0;0m$esc[48;2;0;0;0m$u$esc[38;2;18;42;68m$esc[48;2;13;26;53m$u$esc[38;2;34;128;165m$esc[48;2;27;107;149m$u$esc[38;2;18;140;152m$esc[48;2;17;150;163m$u$esc[38;2;78;101;103m$esc[48;2;55;44;49m$u$esc[38;2;114;111;112m$esc[48;2;79;83;82m$u$esc[38;2;220;223;224m$esc[48;2;92;92;92m$u$esc[38;2;247;248;248m$esc[48;2;224;224;224m$u$esc[38;2;163;141;132m$esc[48;2;255;255;255m$u$esc[38;2;126;91;80m$esc[48;2;255;255;255m$u$esc[38;2;222;233;224m$esc[48;2;255;255;255m$u$esc[38;2;100;184;129m$esc[48;2;255;255;255m$u$esc[38;2;67;163;98m$esc[48;2;255;255;255m$u$esc[38;2;184;201;189m$esc[48;2;255;255;255m$u$esc[38;2;252;252;252m$esc[48;2;255;255;255m$u$esc[38;2;252;252;252m$esc[48;2;255;255;255m$u$esc[38;2;189;192;208m$esc[48;2;255;255;255m$u$esc[38;2;94;116;201m$esc[48;2;255;255;255m$u$esc[38;2;128;148;221m$esc[48;2;255;255;255m$u$esc[38;2;223;223;233m$esc[48;2;255;255;254m$u$esc[38;2;135;105;91m$esc[48;2;255;255;255m$u$esc[38;2;232;227;225m$esc[48;2;252;252;252m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;237;238;238m$esc[48;2;104;104;103m$u$esc[38;2;205;198;198m$esc[48;2;0;0;0m$u$esc[38;2;30;79;82m$esc[48;2;17;135;148m$u$esc[38;2;13;144;154m$esc[48;2;17;158;171m$u$esc[38;2;34;125;163m$esc[48;2;27;104;146m$u$esc[38;2;18;41;68m$esc[48;2;13;26;52m$u$esc[38;2;0;0;0m$esc[48;2;0;0;0m$u$esc[0m $esc[35m*$esc[0m $esc[1mSelf-Healing:$esc[0m Recovers deadlocked tunnels
$esc[0m $esc[38;2;8;19;33m$esc[48;2;1;4;6m$u$esc[38;2;28;71;120m$esc[48;2;23;46;86m$u$esc[38;2;22;155;177m$esc[48;2;22;140;176m$u$esc[38;2;44;59;66m$esc[48;2;42;104;104m$u$esc[38;2;93;60;49m$esc[48;2;97;41;24m$u$esc[38;2;77;76;76m$esc[48;2;63;63;61m$u$esc[38;2;133;134;134m$esc[48;2;84;85;86m$u$esc[38;2;150;149;149m$esc[48;2;88;88;88m$u$esc[38;2;160;159;159m$esc[48;2;105;105;105m$u$esc[38;2;250;250;250m$esc[48;2;245;245;244m$u$esc[38;2;253;253;253m$esc[48;2;250;250;250m$u$esc[38;2;254;254;254m$esc[48;2;251;252;251m$u$esc[38;2;170;170;170m$esc[48;2;132;132;132m$u$esc[38;2;93;93;93m$esc[48;2;0;0;0m$u$esc[38;2;93;93;93m$esc[48;2;0;0;0m$u$esc[38;2;171;171;171m$esc[48;2;133;133;133m$u$esc[38;2;254;254;254m$esc[48;2;251;251;252m$u$esc[38;2;252;252;252m$esc[48;2;248;248;248m$u$esc[38;2;254;254;255m$esc[48;2;254;254;254m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;249;248;248m$esc[48;2;246;246;245m$u$esc[38;2;139;141;141m$esc[48;2;72;74;74m$u$esc[38;2;90;71;64m$esc[48;2;79;52;40m$u$esc[38;2;61;31;21m$esc[48;2;101;41;25m$u$esc[38;2;14;69;71m$esc[48;2;17;82;81m$u$esc[38;2;25;156;177m$esc[48;2;26;143;175m$u$esc[38;2;27;70;118m$esc[48;2;22;44;84m$u$esc[38;2;8;19;33m$esc[48;2;2;4;6m$u$esc[0m $esc[0m $esc[34m*$esc[0m $esc[1mForce Stop:$esc[0m System tray WFP recovery
$esc[0m $esc[38;2;0;0;0m$esc[49m$u$esc[38;2;16;36;65m$esc[48;2;10;23;40m$u$esc[38;2;27;106;154m$esc[48;2;17;60;109m$u$esc[38;2;48;151;151m$esc[48;2;21;111;130m$u$esc[38;2;102;46;27m$esc[48;2;47;38;31m$u$esc[38;2;98;59;44m$esc[48;2;47;25;16m$u$esc[38;2;77;68;64m$esc[48;2;74;70;68m$u$esc[38;2;70;71;72m$esc[48;2;82;84;84m$u$esc[38;2;72;72;72m$esc[48;2;79;79;79m$u$esc[38;2;93;93;93m$esc[48;2;78;78;78m$u$esc[38;2;52;52;52m$esc[48;2;59;59;59m$u$esc[38;2;215;215;215m$esc[48;2;116;116;116m$u$esc[38;2;255;255;255m$esc[48;2;182;182;182m$u$esc[38;2;93;93;93m$esc[48;2;102;103;103m$u$esc[38;2;93;93;93m$esc[48;2;103;103;103m$u$esc[38;2;255;255;255m$esc[48;2;184;184;184m$u$esc[38;2;214;214;214m$esc[48;2;107;107;107m$u$esc[38;2;65;65;65m$esc[48;2;87;87;87m$u$esc[38;2;116;116;116m$esc[48;2;181;181;181m$u$esc[38;2;107;108;108m$esc[48;2;177;177;178m$u$esc[38;2;107;105;104m$esc[48;2;176;175;175m$u$esc[38;2;92;61;48m$esc[48;2;105;66;51m$u$esc[38;2;100;58;41m$esc[48;2;77;38;23m$u$esc[38;2;63;25;17m$esc[48;2;16;16;15m$u$esc[38;2;20;138;151m$esc[48;2;14;97;119m$u$esc[38;2;32;107;151m$esc[48;2;20;63;111m$u$esc[38;2;15;36;65m$esc[48;2;10;24;41m$u$esc[38;2;0;0;0m$esc[49m$u$esc[0m $esc[0m
$esc[0m $esc[0m $esc[38;2;2;7;9m$esc[48;2;0;0;0m$u$esc[38;2;39;51;78m$esc[48;2;77;81;87m$u$esc[38;2;121;139;155m$esc[48;2;130;141;166m$u$esc[38;2;34;126;139m$esc[48;2;34;149;173m$u$esc[38;2;0;27;33m$esc[48;2;15;51;67m$u$esc[38;2;106;103;102m$esc[48;2;202;191;191m$u$esc[38;2;153;155;155m$esc[48;2;241;236;235m$u$esc[38;2;144;145;145m$esc[48;2;218;219;218m$u$esc[38;2;155;155;155m$esc[48;2;187;188;188m$u$esc[38;2;129;129;129m$esc[48;2;124;124;124m$u$esc[38;2;40;41;40m$esc[48;2;78;78;78m$u$esc[38;2;101;101;101m$esc[48;2;63;64;64m$u$esc[38;2;197;197;197m$esc[48;2;57;57;57m$u$esc[38;2;197;197;197m$esc[48;2;55;55;55m$u$esc[38;2;104;104;104m$esc[48;2;81;81;81m$u$esc[38;2;62;62;62m$esc[48;2;163;163;163m$u$esc[38;2;186;186;186m$esc[48;2;230;229;229m$u$esc[38;2;255;255;255m$esc[48;2;251;252;252m$u$esc[38;2;255;255;255m$esc[48;2;208;200;197m$u$esc[38;2;243;239;237m$esc[48;2;92;54;38m$u$esc[38;2;116;77;60m$esc[48;2;98;46;30m$u$esc[38;2;54;20;10m$esc[48;2;39;62;71m$u$esc[38;2;32;112;120m$esc[48;2;35;148;171m$u$esc[38;2;123;143;160m$esc[48;2;126;140;165m$u$esc[38;2;39;51;78m$esc[48;2;76;80;86m$u$esc[38;2;2;7;9m$esc[48;2;0;0;0m$u$esc[0m $esc[0m $esc[0m $esc[90mCrafted by FoxDen Software$esc[0m
$esc[0m $esc[0m $esc[0m $esc[38;2;0;0;2m$esc[49m$u$esc[38;2;13;35;67m$esc[48;2;3;8;13m$u$esc[38;2;22;79;129m$esc[48;2;23;71;105m$u$esc[38;2;25;126;145m$esc[48;2;23;162;185m$u$esc[38;2;80;144;155m$esc[48;2;6;139;152m$u$esc[38;2;94;190;200m$esc[48;2;0;106;122m$u$esc[38;2;236;229;233m$esc[48;2;84;205;210m$u$esc[38;2;205;204;203m$esc[48;2;236;229;232m$u$esc[38;2;156;157;157m$esc[48;2;247;243;242m$u$esc[38;2;114;114;114m$esc[48;2;223;226;225m$u$esc[38;2;103;103;103m$esc[48;2;220;220;220m$u$esc[38;2;106;107;106m$esc[48;2;222;222;222m$u$esc[38;2;99;99;99m$esc[48;2;220;220;220m$u$esc[38;2;142;142;142m$esc[48;2;233;234;234m$u$esc[38;2;242;242;242m$esc[48;2;254;255;255m$u$esc[38;2;254;255;255m$esc[48;2;255;255;255m$u$esc[38;2;255;255;255m$esc[48;2;240;241;243m$u$esc[38;2;224;199;194m$esc[48;2;114;183;182m$u$esc[38;2;87;45;26m$esc[48;2;53;41;41m$u$esc[38;2;40;67;76m$esc[48;2;18;154;167m$u$esc[38;2;15;122;143m$esc[48;2;25;162;186m$u$esc[38;2;25;80;130m$esc[48;2;23;71;105m$u$esc[38;2;13;35;67m$esc[48;2;4;8;13m$u$esc[38;2;0;0;2m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;5;26;30m$esc[48;2;0;0;0m$u$esc[38;2;21;76;109m$esc[48;2;3;4;14m$u$esc[38;2;22;80;113m$esc[48;2;18;40;82m$u$esc[38;2;23;102;125m$esc[48;2;26;80;130m$u$esc[38;2;0;125;138m$esc[48;2;25;97;126m$u$esc[38;2;58;198;204m$esc[48;2;6;113;127m$u$esc[38;2;213;230;234m$esc[48;2;16;164;173m$u$esc[38;2;255;255;255m$esc[48;2;138;205;211m$u$esc[38;2;255;255;255m$esc[48;2;243;237;239m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;255;255;255m$esc[48;2;244;238;240m$u$esc[38;2;255;250;250m$esc[48;2;139;206;212m$u$esc[38;2;210;226;230m$esc[48;2;16;165;174m$u$esc[38;2;56;196;202m$esc[48;2;5;112;127m$u$esc[38;2;0;122;135m$esc[48;2;25;98;126m$u$esc[38;2;16;101;127m$esc[48;2;27;79;128m$u$esc[38;2;20;78;112m$esc[48;2;19;38;80m$u$esc[38;2;20;73;107m$esc[48;2;2;4;13m$u$esc[38;2;5;26;30m$esc[48;2;0;0;0m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;4;12;22m$esc[49m$u$esc[38;2;16;35;68m$esc[48;2;1;3;4m$u$esc[38;2;27;72;126m$esc[48;2;16;36;67m$u$esc[38;2;23;103;134m$esc[48;2;28;69;123m$u$esc[38;2;13;134;144m$esc[48;2;24;107;147m$u$esc[38;2;0;139;150m$esc[48;2;23;119;141m$u$esc[38;2;62;188;195m$esc[48;2;3;127;140m$u$esc[38;2;174;217;223m$esc[48;2;1;149;161m$u$esc[38;2;174;217;222m$esc[48;2;0;149;161m$u$esc[38;2;63;189;196m$esc[48;2;3;129;141m$u$esc[38;2;0;139;150m$esc[48;2;22;118;140m$u$esc[38;2;15;136;146m$esc[48;2;25;106;145m$u$esc[38;2;23;103;134m$esc[48;2;28;70;123m$u$esc[38;2;27;72;126m$esc[48;2;16;36;67m$u$esc[38;2;17;35;69m$esc[48;2;1;3;4m$u$esc[38;2;5;12;22m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;1;1;2m$esc[49m$u$esc[38;2;11;26;45m$esc[48;2;0;0;0m$u$esc[38;2;23;50;97m$esc[48;2;4;11;17m$u$esc[38;2;26;76;127m$esc[48;2;16;32;59m$u$esc[38;2;26;144;171m$esc[48;2;11;42;87m$u$esc[38;2;30;94;118m$esc[48;2;92;127;154m$u$esc[38;2;30;95;118m$esc[48;2;93;127;154m$u$esc[38;2;26;144;171m$esc[48;2;12;42;87m$u$esc[38;2;27;76;127m$esc[48;2;16;32;59m$u$esc[38;2;24;49;95m$esc[48;2;4;10;17m$u$esc[38;2;11;25;44m$esc[48;2;0;0;0m$u$esc[38;2;1;2;3m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;1;0;0m$esc[49m$u$esc[38;2;0;4;8m$esc[49m$u$esc[38;2;68;77;95m$esc[48;2;0;0;1m$u$esc[38;2;68;78;95m$esc[48;2;0;1;1m$u$esc[38;2;0;4;8m$esc[49m$u$esc[38;2;1;0;0m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
"@
$upToDateBannerTemplate = @'
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;7;5;5m$esc[49m$d$esc[38;2;23;30;35m$esc[49m$d$esc[38;2;0;0;0m$esc[48;2;39;78;98m$u$esc[38;2;13;20;24m$esc[48;2;117;163;184m$u$esc[38;2;14;21;26m$esc[48;2;107;153;176m$u$esc[38;2;0;0;0m$esc[48;2;39;79;99m$u$esc[38;2;23;30;34m$esc[49m$d$esc[38;2;7;5;4m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;0;0;0m$esc[49m$d$esc[38;2;0;0;0m$esc[49m$d$esc[38;2;17;25;29m$esc[49m$d$esc[38;2;0;0;0m$esc[48;2;46;72;88m$u$esc[38;2;4;2;2m$esc[48;2;53;88;114m$u$esc[38;2;33;48;57m$esc[48;2;34;51;63m$u$esc[38;2;48;78;98m$esc[48;2;33;73;114m$u$esc[38;2;58;108;139m$esc[48;2;28;71;122m$u$esc[38;2;63;134;173m$esc[48;2;18;54;92m$u$esc[38;2;38;125;169m$esc[48;2;16;71;99m$u$esc[38;2;86;114;143m$esc[48;2;9;102;122m$u$esc[38;2;75;104;135m$esc[48;2;9;103;122m$u$esc[38;2;39;125;169m$esc[48;2;16;73;99m$u$esc[38;2;62;131;170m$esc[48;2;17;55;93m$u$esc[38;2;58;108;139m$esc[48;2;28;70;120m$u$esc[38;2;47;77;98m$esc[48;2;32;72;112m$u$esc[38;2;31;47;56m$esc[48;2;32;51;62m$u$esc[38;2;2;2;2m$esc[48;2;52;89;115m$u$esc[38;2;0;0;0m$esc[48;2;45;71;87m$u$esc[38;2;17;25;29m$esc[49m$d$esc[38;2;0;0;0m$esc[49m$d$esc[38;2;0;0;0m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $([char]::ConvertFromUtf32(0x1F98A)) $esc[1;36mWireFox$esc[0m $esc[1;34mv$currentVersion$esc[0m
$esc[38;2;9;12;14m$esc[49m$d$esc[38;2;0;0;0m$esc[48;2;52;83;104m$u$esc[38;2;12;15;15m$esc[48;2;61;109;145m$u$esc[38;2;30;44;51m$esc[48;2;51;104;149m$u$esc[38;2;45;74;94m$esc[48;2;39;88;139m$u$esc[38;2;55;97;126m$esc[48;2;25;59;111m$u$esc[38;2;54;107;148m$esc[48;2;18;40;84m$u$esc[38;2;43;92;143m$esc[48;2;10;48;84m$u$esc[38;2;14;32;56m$esc[48;2;11;26;33m$u$esc[38;2;26;23;19m$esc[48;2;75;69;69m$u$esc[38;2;13;17;26m$esc[48;2;40;35;32m$u$esc[38;2;11;74;95m$esc[48;2;8;88;98m$u$esc[38;2;13;138;151m$esc[48;2;14;110;136m$u$esc[38;2;12;133;148m$esc[48;2;11;68;96m$u$esc[38;2;14;126;145m$esc[48;2;11;74;101m$u$esc[38;2;16;102;127m$esc[48;2;17;43;79m$u$esc[38;2;15;116;136m$esc[48;2;18;36;74m$u$esc[38;2;13;134;148m$esc[48;2;20;79;114m$u$esc[38;2;11;74;95m$esc[48;2;9;76;88m$u$esc[38;2;14;17;26m$esc[48;2;39;37;34m$u$esc[38;2;26;23;19m$esc[48;2;74;69;68m$u$esc[38;2;14;33;58m$esc[48;2;11;27;33m$u$esc[38;2;42;92;143m$esc[48;2;10;48;84m$u$esc[38;2;54;107;147m$esc[48;2;18;39;84m$u$esc[38;2;55;97;126m$esc[48;2;26;60;111m$u$esc[38;2;46;75;94m$esc[48;2;39;88;140m$u$esc[38;2;30;43;51m$esc[48;2;51;103;149m$u$esc[38;2;12;14;16m$esc[48;2;61;109;146m$u$esc[38;2;0;0;0m$esc[48;2;52;83;104m$u$esc[38;2;9;12;15m$esc[49m$d$esc[0m $esc[90mWireGuard Companion for Windows$esc[0m
$esc[38;2;3;6;11m$esc[48;2;2;4;8m$u$esc[38;2;37;81;122m$esc[48;2;20;56;99m$u$esc[38;2;44;87;130m$esc[48;2;29;64;107m$u$esc[38;2;14;39;81m$esc[48;2;12;116;129m$u$esc[38;2;12;46;80m$esc[48;2;13;167;176m$u$esc[38;2;12;75;98m$esc[48;2;13;131;147m$u$esc[38;2;13;112;127m$esc[48;2;17;132;154m$u$esc[38;2;9;101;107m$esc[48;2;1;52;61m$u$esc[38;2;43;57;57m$esc[48;2;65;42;42m$u$esc[38;2;174;117;126m$esc[48;2;237;157;170m$u$esc[38;2;62;59;59m$esc[48;2;182;173;175m$u$esc[38;2;17;15;18m$esc[48;2;91;90;86m$u$esc[38;2;8;53;75m$esc[48;2;3;37;54m$u$esc[38;2;13;87;116m$esc[48;2;10;50;67m$u$esc[38;2;13;91;118m$esc[48;2;1;34;46m$u$esc[38;2;19;58;95m$esc[48;2;4;22;39m$u$esc[38;2;21;54;93m$esc[48;2;14;33;56m$u$esc[38;2;12;30;58m$esc[48;2;4;18;40m$u$esc[38;2;17;11;16m$esc[48;2;91;93;89m$u$esc[38;2;63;60;60m$esc[48;2;182;173;175m$u$esc[38;2;174;117;125m$esc[48;2;238;156;170m$u$esc[38;2;43;57;57m$esc[48;2;64;42;41m$u$esc[38;2;9;103;109m$esc[48;2;1;38;50m$u$esc[38;2;13;113;129m$esc[48;2;17;125;148m$u$esc[38;2;12;75;98m$esc[48;2;12;130;146m$u$esc[38;2;13;46;80m$esc[48;2;12;167;174m$u$esc[38;2;14;39;82m$esc[48;2;12;116;130m$u$esc[38;2;44;88;131m$esc[48;2;29;64;106m$u$esc[38;2;37;80;122m$esc[48;2;19;56;98m$u$esc[38;2;3;6;10m$esc[48;2;2;4;8m$u$esc[0m
$esc[38;2;3;5;10m$esc[48;2;1;2;4m$u$esc[38;2;25;61;104m$esc[48;2;13;42;84m$u$esc[38;2;26;78;121m$esc[48;2;25;77;121m$u$esc[38;2;12;145;159m$esc[48;2;12;130;144m$u$esc[38;2;12;111;132m$esc[48;2;13;117;137m$u$esc[38;2;12;125;144m$esc[48;2;13;155;169m$u$esc[38;2;16;97;124m$esc[48;2;17;138;158m$u$esc[38;2;1;50;59m$esc[48;2;1;45;54m$u$esc[38;2;148;92;98m$esc[48;2;174;106;114m$u$esc[38;2;255;155;173m$esc[48;2;255;158;174m$u$esc[38;2;255;233;238m$esc[48;2;234;158;170m$u$esc[38;2;145;151;150m$esc[48;2;163;155;150m$u$esc[38;2;0;6;12m$esc[48;2;36;14;5m$u$esc[38;2;34;22;17m$esc[48;2;77;45;32m$u$esc[38;2;67;32;19m$esc[48;2;103;60;42m$u$esc[38;2;59;25;10m$esc[48;2;136;103;89m$u$esc[38;2;28;16;12m$esc[48;2;97;70;58m$u$esc[38;2;0;1;9m$esc[48;2;34;13;4m$u$esc[38;2;145;151;150m$esc[48;2;163;155;150m$u$esc[38;2;255;233;239m$esc[48;2;232;155;169m$u$esc[38;2;255;155;173m$esc[48;2;255;157;172m$u$esc[38;2;147;86;92m$esc[48;2;174;108;117m$u$esc[38;2;0;65;73m$esc[48;2;0;20;23m$u$esc[38;2;19;144;166m$esc[48;2;8;47;54m$u$esc[38;2;13;126;145m$esc[48;2;9;53;74m$u$esc[38;2;12;114;136m$esc[48;2;12;84;113m$u$esc[38;2;14;146;159m$esc[48;2;14;136;150m$u$esc[38;2;26;78;122m$esc[48;2;25;75;118m$u$esc[38;2;25;61;104m$esc[48;2;12;42;82m$u$esc[38;2;2;5;9m$esc[48;2;1;2;5m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;255;255;255m$esc[49m$d$esc[38;2;255;255;255m$esc[48;2;0;229;255m$u$esc[38;2;255;255;255m$esc[48;2;0;229;255m$u$esc[38;2;5;16;26m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[1;32mAll Systems Nominal!$esc[0m
$esc[38;2;25;26;27m$esc[48;2;16;18;21m$u$esc[38;2;79;86;110m$esc[48;2;162;164;175m$u$esc[38;2;21;72;104m$esc[48;2;95;148;161m$u$esc[38;2;13;136;151m$esc[48;2;0;125;141m$u$esc[38;2;13;113;134m$esc[48;2;18;123;144m$u$esc[38;2;14;157;172m$esc[48;2;10;51;60m$u$esc[38;2;18;140;162m$esc[48;2;5;17;26m$u$esc[38;2;0;28;42m$esc[48;2;26;22;19m$u$esc[38;2;167;102;110m$esc[48;2;198;120;126m$u$esc[38;2;247;140;158m$esc[48;2;233;159;171m$u$esc[38;2;248;207;216m$esc[48;2;140;117;105m$u$esc[38;2;187;171;163m$esc[48;2;115;80;66m$u$esc[38;2;86;38;20m$esc[48;2;90;48;32m$u$esc[38;2;94;53;36m$esc[48;2;90;47;31m$u$esc[38;2;101;62;47m$esc[48;2;103;63;48m$u$esc[38;2;255;255;255m$esc[48;2;245;242;241m$u$esc[38;2;174;154;146m$esc[48;2;232;227;225m$u$esc[38;2;66;13;0m$esc[48;2;181;163;156m$u$esc[38;2;191;175;166m$esc[48;2;109;74;59m$u$esc[38;2;247;206;215m$esc[48;2;163;145;135m$u$esc[38;2;248;138;156m$esc[48;2;246;174;187m$u$esc[38;2;162;104;115m$esc[48;2;186;114;119m$u$esc[38;2;27;12;5m$esc[48;2;76;43;26m$u$esc[38;2;57;20;8m$esc[48;2;68;34;21m$u$esc[38;2;2;42;59m$esc[48;2;5;73;86m$u$esc[38;2;13;84;115m$esc[48;2;18;118;140m$u$esc[38;2;13;141;156m$esc[48;2;1;130;145m$u$esc[38;2;20;72;103m$esc[48;2;96;150;164m$u$esc[38;2;78;84;107m$esc[48;2;163;164;175m$u$esc[38;2;25;26;28m$esc[48;2;16;18;21m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;5;16;26m$esc[48;2;5;16;26m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[1;37mWireFox is already up to date.$esc[0m
$esc[38;2;2;3;8m$esc[48;2;1;3;8m$u$esc[38;2;89;109;134m$esc[48;2;27;80;119m$u$esc[38;2;84;175;186m$esc[48;2;25;152;177m$u$esc[38;2;2;147;159m$esc[48;2;9;94;99m$u$esc[38;2;11;120;140m$esc[48;2;24;17;16m$u$esc[38;2;7;36;38m$esc[48;2;53;32;26m$u$esc[38;2;72;32;18m$esc[48;2;97;53;35m$u$esc[38;2;85;44;27m$esc[48;2;202;188;183m$u$esc[38;2;209;186;183m$esc[48;2;251;253;253m$u$esc[38;2;248;247;247m$esc[48;2;245;242;240m$u$esc[38;2;90;47;31m$esc[48;2;106;65;50m$u$esc[38;2;88;44;27m$esc[48;2;95;51;37m$u$esc[38;2;95;54;37m$esc[48;2;83;39;22m$u$esc[38;2;93;51;35m$esc[48;2;163;139;129m$u$esc[38;2;109;73;58m$esc[48;2;238;235;233m$u$esc[38;2;242;238;237m$esc[48;2;254;253;253m$u$esc[38;2;255;255;255m$esc[48;2;241;236;234m$u$esc[38;2;225;218;215m$esc[48;2;108;73;58m$u$esc[38;2;83;38;21m$esc[48;2;91;49;30m$u$esc[38;2;93;52;36m$esc[48;2;100;57;41m$u$esc[38;2;236;232;230m$esc[48;2;108;69;54m$u$esc[38;2;139;99;88m$esc[48;2;222;219;215m$u$esc[38;2;98;54;36m$esc[48;2;178;156;147m$u$esc[38;2;61;23;13m$esc[48;2;54;15;5m$u$esc[38;2;5;76;87m$esc[48;2;9;67;84m$u$esc[38;2;17;124;145m$esc[48;2;15;116;142m$u$esc[38;2;1;129;144m$esc[48;2;10;160;168m$u$esc[38;2;95;184;194m$esc[48;2;27;150;172m$u$esc[38;2;91;110;134m$esc[48;2;27;80;119m$u$esc[38;2;2;3;8m$esc[48;2;1;3;7m$u$esc[0m $esc[0m $esc[38;2;255;255;255m$esc[49m$d$esc[38;2;255;255;255m$esc[48;2;0;229;255m$u$esc[38;2;5;16;26m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;5;16;26m$esc[48;2;5;16;26m$u$esc[38;2;5;16;26m$esc[49m$d$esc[38;2;5;16;26m$esc[49m$d$esc[38;2;5;16;26m$esc[49m$d$esc[38;2;5;16;26m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[0m $esc[90mActive Version:$esc[0m $esc[36mv$currentVersion$esc[0m
$esc[38;2;2;3;8m$esc[48;2;1;3;5m$u$esc[38;2;31;88;126m$esc[48;2;29;82;116m$u$esc[38;2;20;153;177m$esc[48;2;31;157;185m$u$esc[38;2;2;17;24m$esc[48;2;16;124;137m$u$esc[38;2;84;45;29m$esc[48;2;81;104;99m$u$esc[38;2;98;51;33m$esc[48;2;141;120;116m$u$esc[38;2;76;32;14m$esc[48;2;209;197;191m$u$esc[38;2;218;210;206m$esc[48;2;246;244;243m$u$esc[38;2;247;245;244m$esc[48;2;143;117;104m$u$esc[38;2;218;210;207m$esc[48;2;88;39;29m$u$esc[38;2;32;24;18m$esc[48;2;93;134;107m$u$esc[38;2;22;25;16m$esc[48;2;0;93;32m$u$esc[38;2;16;10;6m$esc[48;2;17;64;32m$u$esc[38;2;149;138;135m$esc[48;2;113;130;120m$u$esc[38;2;255;255;255m$esc[48;2;254;254;254m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;154;147;143m$esc[48;2;114;119;137m$u$esc[38;2;14;7;6m$esc[48;2;0;12;76m$u$esc[38;2;25;21;30m$esc[48;2;63;80;155m$u$esc[38;2;27;13;13m$esc[48;2;107;114;153m$u$esc[38;2;86;44;27m$esc[48;2;92;50;27m$u$esc[38;2;246;244;243m$esc[48;2;230;224;223m$u$esc[38;2;185;165;157m$esc[48;2;233;227;224m$u$esc[38;2;25;0;0m$esc[48;2;194;189;186m$u$esc[38;2;0;23;29m$esc[48;2;179;168;167m$u$esc[38;2;13;122;126m$esc[48;2;23;50;48m$u$esc[38;2;10;124;137m$esc[48;2;11;122;135m$u$esc[38;2;19;141;166m$esc[48;2;32;159;186m$u$esc[38;2;30;89;127m$esc[48;2;29;80;114m$u$esc[38;2;2;3;8m$esc[48;2;1;2;5m$u$esc[0m $esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;5;16;26m$esc[48;2;5;16;26m$u$esc[38;2;5;16;26m$esc[49m$d$esc[0m $esc[0m $esc[0m $esc[90mThe den is secure and protected.$esc[0m
$esc[38;2;0;0;0m$esc[48;2;0;0;0m$u$esc[38;2;18;42;68m$esc[48;2;13;26;53m$u$esc[38;2;34;128;165m$esc[48;2;27;107;149m$u$esc[38;2;18;140;152m$esc[48;2;17;150;163m$u$esc[38;2;78;101;103m$esc[48;2;55;44;49m$u$esc[38;2;114;111;112m$esc[48;2;79;83;82m$u$esc[38;2;220;223;224m$esc[48;2;92;92;92m$u$esc[38;2;247;248;248m$esc[48;2;224;224;224m$u$esc[38;2;163;141;132m$esc[48;2;255;255;255m$u$esc[38;2;126;91;80m$esc[48;2;255;255;255m$u$esc[38;2;222;233;224m$esc[48;2;255;255;255m$u$esc[38;2;100;184;129m$esc[48;2;255;255;255m$u$esc[38;2;67;163;98m$esc[48;2;255;255;255m$u$esc[38;2;184;201;189m$esc[48;2;255;255;255m$u$esc[38;2;252;252;252m$esc[48;2;255;255;255m$u$esc[38;2;252;252;252m$esc[48;2;255;255;255m$u$esc[38;2;189;192;208m$esc[48;2;255;255;255m$u$esc[38;2;94;116;201m$esc[48;2;255;255;255m$u$esc[38;2;128;148;221m$esc[48;2;255;255;255m$u$esc[38;2;223;223;233m$esc[48;2;255;255;254m$u$esc[38;2;135;105;91m$esc[48;2;255;255;255m$u$esc[38;2;232;227;225m$esc[48;2;252;252;252m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;237;238;238m$esc[48;2;104;104;103m$u$esc[38;2;205;198;198m$esc[48;2;0;0;0m$u$esc[38;2;30;79;82m$esc[48;2;17;135;148m$u$esc[38;2;13;144;154m$esc[48;2;17;158;171m$u$esc[38;2;34;125;163m$esc[48;2;27;104;146m$u$esc[38;2;18;41;68m$esc[48;2;13;26;52m$u$esc[38;2;0;0;0m$esc[48;2;0;0;0m$u$esc[0m $esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;0;168;204m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;168;204m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;168;204m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;168;204m$esc[48;2;0;85;128m$u$esc[38;2;0;229;255m$esc[48;2;0;229;255m$u$esc[38;2;5;16;26m$esc[48;2;5;16;26m$u$esc[0m $esc[0m $esc[0m
$esc[0m $esc[38;2;8;19;33m$esc[48;2;1;4;6m$u$esc[38;2;28;71;120m$esc[48;2;23;46;86m$u$esc[38;2;22;155;177m$esc[48;2;22;140;176m$u$esc[38;2;44;59;66m$esc[48;2;42;104;104m$u$esc[38;2;93;60;49m$esc[48;2;97;41;24m$u$esc[38;2;77;76;76m$esc[48;2;63;63;61m$u$esc[38;2;133;134;134m$esc[48;2;84;85;86m$u$esc[38;2;150;149;149m$esc[48;2;88;88;88m$u$esc[38;2;160;159;159m$esc[48;2;105;105;105m$u$esc[38;2;250;250;250m$esc[48;2;245;245;244m$u$esc[38;2;253;253;253m$esc[48;2;250;250;250m$u$esc[38;2;254;254;254m$esc[48;2;251;252;251m$u$esc[38;2;170;170;170m$esc[48;2;132;132;132m$u$esc[38;2;93;93;93m$esc[48;2;0;0;0m$u$esc[38;2;93;93;93m$esc[48;2;0;0;0m$u$esc[38;2;171;171;171m$esc[48;2;133;133;133m$u$esc[38;2;254;254;254m$esc[48;2;251;251;252m$u$esc[38;2;252;252;252m$esc[48;2;248;248;248m$u$esc[38;2;254;254;255m$esc[48;2;254;254;254m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;249;248;248m$esc[48;2;246;246;245m$u$esc[38;2;139;141;141m$esc[48;2;72;74;74m$u$esc[38;2;90;71;64m$esc[48;2;79;52;40m$u$esc[38;2;61;31;21m$esc[48;2;101;41;25m$u$esc[38;2;14;69;71m$esc[48;2;17;82;81m$u$esc[38;2;25;156;177m$esc[48;2;26;143;175m$u$esc[38;2;27;70;118m$esc[48;2;22;44;84m$u$esc[38;2;8;19;33m$esc[48;2;2;4;6m$u$esc[0m $esc[0m $esc[0m $esc[38;2;255;255;255m$esc[49m$u$esc[38;2;0;229;255m$esc[48;2;255;255;255m$u$esc[38;2;0;85;128m$esc[48;2;0;229;255m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;0;85;128m$esc[48;2;0;85;128m$u$esc[38;2;5;16;26m$esc[48;2;5;16;26m$u$esc[0m $esc[0m $esc[0m
$esc[0m $esc[38;2;0;0;0m$esc[49m$u$esc[38;2;16;36;65m$esc[48;2;10;23;40m$u$esc[38;2;27;106;154m$esc[48;2;17;60;109m$u$esc[38;2;48;151;151m$esc[48;2;21;111;130m$u$esc[38;2;102;46;27m$esc[48;2;47;38;31m$u$esc[38;2;98;59;44m$esc[48;2;47;25;16m$u$esc[38;2;77;68;64m$esc[48;2;74;70;68m$u$esc[38;2;70;71;72m$esc[48;2;82;84;84m$u$esc[38;2;72;72;72m$esc[48;2;79;79;79m$u$esc[38;2;93;93;93m$esc[48;2;78;78;78m$u$esc[38;2;52;52;52m$esc[48;2;59;59;59m$u$esc[38;2;215;215;215m$esc[48;2;116;116;116m$u$esc[38;2;255;255;255m$esc[48;2;182;182;182m$u$esc[38;2;93;93;93m$esc[48;2;102;103;103m$u$esc[38;2;93;93;93m$esc[48;2;103;103;103m$u$esc[38;2;255;255;255m$esc[48;2;184;184;184m$u$esc[38;2;214;214;214m$esc[48;2;107;107;107m$u$esc[38;2;65;65;65m$esc[48;2;87;87;87m$u$esc[38;2;116;116;116m$esc[48;2;181;181;181m$u$esc[38;2;107;108;108m$esc[48;2;177;177;178m$u$esc[38;2;107;105;104m$esc[48;2;176;175;175m$u$esc[38;2;92;61;48m$esc[48;2;105;66;51m$u$esc[38;2;100;58;41m$esc[48;2;77;38;23m$u$esc[38;2;63;25;17m$esc[48;2;16;16;15m$u$esc[38;2;20;138;151m$esc[48;2;14;97;119m$u$esc[38;2;32;107;151m$esc[48;2;20;63;111m$u$esc[38;2;15;36;65m$esc[48;2;10;24;41m$u$esc[38;2;0;0;0m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[38;2;5;16;26m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[38;2;2;7;9m$esc[48;2;0;0;0m$u$esc[38;2;39;51;78m$esc[48;2;77;81;87m$u$esc[38;2;121;139;155m$esc[48;2;130;141;166m$u$esc[38;2;34;126;139m$esc[48;2;34;149;173m$u$esc[38;2;0;27;33m$esc[48;2;15;51;67m$u$esc[38;2;106;103;102m$esc[48;2;202;191;191m$u$esc[38;2;153;155;155m$esc[48;2;241;236;235m$u$esc[38;2;144;145;145m$esc[48;2;218;219;218m$u$esc[38;2;155;155;155m$esc[48;2;187;188;188m$u$esc[38;2;129;129;129m$esc[48;2;124;124;124m$u$esc[38;2;40;41;40m$esc[48;2;78;78;78m$u$esc[38;2;101;101;101m$esc[48;2;63;64;64m$u$esc[38;2;197;197;197m$esc[48;2;57;57;57m$u$esc[38;2;197;197;197m$esc[48;2;55;55;55m$u$esc[38;2;104;104;104m$esc[48;2;81;81;81m$u$esc[38;2;62;62;62m$esc[48;2;163;163;163m$u$esc[38;2;186;186;186m$esc[48;2;230;229;229m$u$esc[38;2;255;255;255m$esc[48;2;251;252;252m$u$esc[38;2;255;255;255m$esc[48;2;208;200;197m$u$esc[38;2;243;239;237m$esc[48;2;92;54;38m$u$esc[38;2;116;77;60m$esc[48;2;98;46;30m$u$esc[38;2;54;20;10m$esc[48;2;39;62;71m$u$esc[38;2;32;112;120m$esc[48;2;35;148;171m$u$esc[38;2;123;143;160m$esc[48;2;126;140;165m$u$esc[38;2;39;51;78m$esc[48;2;76;80;86m$u$esc[38;2;2;7;9m$esc[48;2;0;0;0m$u$esc[0m $esc[0m $esc[0m $esc[90m-------------------------------------------$esc[0m
$esc[0m $esc[0m $esc[0m $esc[38;2;0;0;2m$esc[49m$u$esc[38;2;13;35;67m$esc[48;2;3;8;13m$u$esc[38;2;22;79;129m$esc[48;2;23;71;105m$u$esc[38;2;25;126;145m$esc[48;2;23;162;185m$u$esc[38;2;80;144;155m$esc[48;2;6;139;152m$u$esc[38;2;94;190;200m$esc[48;2;0;106;122m$u$esc[38;2;236;229;233m$esc[48;2;84;205;210m$u$esc[38;2;205;204;203m$esc[48;2;236;229;232m$u$esc[38;2;156;157;157m$esc[48;2;247;243;242m$u$esc[38;2;114;114;114m$esc[48;2;223;226;225m$u$esc[38;2;103;103;103m$esc[48;2;220;220;220m$u$esc[38;2;106;107;106m$esc[48;2;222;222;222m$u$esc[38;2;99;99;99m$esc[48;2;220;220;220m$u$esc[38;2;142;142;142m$esc[48;2;233;234;234m$u$esc[38;2;242;242;242m$esc[48;2;254;255;255m$u$esc[38;2;254;255;255m$esc[48;2;255;255;255m$u$esc[38;2;255;255;255m$esc[48;2;240;241;243m$u$esc[38;2;224;199;194m$esc[48;2;114;183;182m$u$esc[38;2;87;45;26m$esc[48;2;53;41;41m$u$esc[38;2;40;67;76m$esc[48;2;18;154;167m$u$esc[38;2;15;122;143m$esc[48;2;25;162;186m$u$esc[38;2;25;80;130m$esc[48;2;23;71;105m$u$esc[38;2;13;35;67m$esc[48;2;4;8;13m$u$esc[38;2;0;0;2m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[1;33m[Enter]$esc[0m to keep current, or $esc[1;36m[R]$esc[0m to force reinstall
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;5;26;30m$esc[48;2;0;0;0m$u$esc[38;2;21;76;109m$esc[48;2;3;4;14m$u$esc[38;2;22;80;113m$esc[48;2;18;40;82m$u$esc[38;2;23;102;125m$esc[48;2;26;80;130m$u$esc[38;2;0;125;138m$esc[48;2;25;97;126m$u$esc[38;2;58;198;204m$esc[48;2;6;113;127m$u$esc[38;2;213;230;234m$esc[48;2;16;164;173m$u$esc[38;2;255;255;255m$esc[48;2;138;205;211m$u$esc[38;2;255;255;255m$esc[48;2;243;237;239m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;255;255;255m$esc[48;2;255;255;255m$u$esc[38;2;255;255;255m$esc[48;2;244;238;240m$u$esc[38;2;255;250;250m$esc[48;2;139;206;212m$u$esc[38;2;210;226;230m$esc[48;2;16;165;174m$u$esc[38;2;56;196;202m$esc[48;2;5;112;127m$u$esc[38;2;0;122;135m$esc[48;2;25;98;126m$u$esc[38;2;16;101;127m$esc[48;2;27;79;128m$u$esc[38;2;20;78;112m$esc[48;2;19;38;80m$u$esc[38;2;20;73;107m$esc[48;2;2;4;13m$u$esc[38;2;5;26;30m$esc[48;2;0;0;0m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;4;12;22m$esc[49m$u$esc[38;2;16;35;68m$esc[48;2;1;3;4m$u$esc[38;2;27;72;126m$esc[48;2;16;36;67m$u$esc[38;2;23;103;134m$esc[48;2;28;69;123m$u$esc[38;2;13;134;144m$esc[48;2;24;107;147m$u$esc[38;2;0;139;150m$esc[48;2;23;119;141m$u$esc[38;2;62;188;195m$esc[48;2;3;127;140m$u$esc[38;2;174;217;223m$esc[48;2;1;149;161m$u$esc[38;2;174;217;222m$esc[48;2;0;149;161m$u$esc[38;2;63;189;196m$esc[48;2;3;129;141m$u$esc[38;2;0;139;150m$esc[48;2;22;118;140m$u$esc[38;2;15;136;146m$esc[48;2;25;106;145m$u$esc[38;2;23;103;134m$esc[48;2;28;70;123m$u$esc[38;2;27;72;126m$esc[48;2;16;36;67m$u$esc[38;2;17;35;69m$esc[48;2;1;3;4m$u$esc[38;2;5;12;22m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;1;1;2m$esc[49m$u$esc[38;2;11;26;45m$esc[48;2;0;0;0m$u$esc[38;2;23;50;97m$esc[48;2;4;11;17m$u$esc[38;2;26;76;127m$esc[48;2;16;32;59m$u$esc[38;2;26;144;171m$esc[48;2;11;42;87m$u$esc[38;2;30;94;118m$esc[48;2;92;127;154m$u$esc[38;2;30;95;118m$esc[48;2;93;127;154m$u$esc[38;2;26;144;171m$esc[48;2;12;42;87m$u$esc[38;2;27;76;127m$esc[48;2;16;32;59m$u$esc[38;2;24;49;95m$esc[48;2;4;10;17m$u$esc[38;2;11;25;44m$esc[48;2;0;0;0m$u$esc[38;2;1;2;3m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[38;2;1;0;0m$esc[49m$u$esc[38;2;0;4;8m$esc[49m$u$esc[38;2;68;77;95m$esc[48;2;0;0;1m$u$esc[38;2;68;78;95m$esc[48;2;0;1;1m$u$esc[38;2;0;4;8m$esc[49m$u$esc[38;2;1;0;0m$esc[49m$u$esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m $esc[0m
'@
$guardianBanner = $guardianBanner.Replace("$esc[49m", "$esc[48;2;0;0;0m")
$upToDateBannerTemplate = $upToDateBannerTemplate.Replace("$esc[49m", "$esc[48;2;0;0;0m")
# 1. Check for Administrator privileges (required for WireGuard NT service control)
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Host "`n[!] Administrator privileges are required to install WireFox and control WireGuard services." -ForegroundColor Yellow
Write-Host "[*] Requesting elevation..." -ForegroundColor Cyan
$elevateArgs = "-NoProfile -ExecutionPolicy Bypass"
if ($PSCommandPath -and (Test-Path $PSCommandPath)) {
$elevateArgs += " -File `"$PSCommandPath`""
}
else {
$tempStaging = Join-Path $env:TEMP "WireFox_Installer"
if (-not (Test-Path $tempStaging)) { New-Item -ItemType Directory -Path $tempStaging -Force | Out-Null }
$tempScript = Join-Path $tempStaging "install.ps1"
$installerUrl = "https://raw.githubusercontent.com/TalviFox/WireFox/main/install.ps1"
Invoke-WebRequest -Uri $installerUrl -OutFile $tempScript -UseBasicParsing
$elevateArgs += " -File `"$tempScript`""
}
if ($Path) {
$resolved = if (Test-Path $Path) { (Resolve-Path $Path).Path } else { $Path }
$elevateArgs += " -Path `"$resolved`""
}
if ($Force) { $elevateArgs += " -Force" }
if ($Build) { $elevateArgs += " -Build" }
Start-Process powershell -Verb RunAs -ArgumentList $elevateArgs
return
}
# 2. Check for WireGuard installation
$wireguardExe = "$env:ProgramFiles\WireGuard\wireguard.exe"
if (-not (Test-Path $wireguardExe)) {
Write-Host "`n[!] WireGuard for Windows was not detected at standard location ($wireguardExe)." -ForegroundColor Yellow
Write-Host " WireFox requires WireGuard to manage tunnels." -ForegroundColor Yellow
Write-Host " Download it from: https://www.wireguard.com/install/`n" -ForegroundColor DarkYellow
}
# 3. Setup install directory & temp staging
$installDir = "$env:ProgramFiles\WireFox"
if (-not (Test-Path $installDir)) {
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
}
$tempDir = Join-Path $env:TEMP "WireFox_Installer"
if (-not (Test-Path $tempDir)) {
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
}
$stagingExe = Join-Path $tempDir "WireFox.exe"
$targetExe = Join-Path $installDir "WireFox.exe"
# Check if already installed and query latest version for smart banner
$repo = "TalviFox/WireFox"
$isUpToDate = $false
$installedVer = $null
$latestTag = $null
if ((Test-Path $targetExe) -and -not $Force) {
try {
$fileInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($targetExe)
$installedVer = if ($fileInfo.ProductVersion) { $fileInfo.ProductVersion.Trim() } elseif ($fileInfo.FileVersion) { $fileInfo.FileVersion.Trim() } else { "1.0.0" }
$localExe = if ($PSScriptRoot -and (Test-Path (Join-Path $PSScriptRoot "publish\WireFox.exe"))) { Join-Path $PSScriptRoot "publish\WireFox.exe" } elseif ($PSScriptRoot -and (Test-Path (Join-Path $PSScriptRoot "WireFox.exe"))) { Join-Path $PSScriptRoot "WireFox.exe" } else { $null }
if ($localExe) {
$localInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($localExe)
$latestTag = if ($localInfo.ProductVersion) { $localInfo.ProductVersion.Trim() } elseif ($localInfo.FileVersion) { $localInfo.FileVersion.Trim() }
}
if (-not $latestTag) {
$headers = @{ "User-Agent" = "WireFox-Installer" }
$apiUrl = "https://api.github.com/repos/$repo/releases/latest"
$rel = Invoke-RestMethod -Uri $apiUrl -Headers $headers -UseBasicParsing -TimeoutSec 3 -ErrorAction SilentlyContinue
if ($rel -and $rel.tag_name) {
$latestTag = $rel.tag_name.TrimStart('v', 'V').Trim()
}
}
if ($latestTag -and ($installedVer -eq $latestTag -or $installedVer.StartsWith($latestTag))) {
$isUpToDate = $true
}
}
catch {}
}
if ($isUpToDate) {
$currentVersion = $installedVer
[void]$currentVersion # Suppress IDE warning (variable is dynamically used by ExpandString)
$upToDateBanner = $ExecutionContext.InvokeCommand.ExpandString($upToDateBannerTemplate)
Write-Host $upToDateBanner
$choice = Read-Host "`n Press [Enter] to keep current installation, or type 'R' to force reinstall"
if ($choice -notmatch "^[rR]") {
Write-Host "`n[*] WireFox is up to date. Stay safe!" -ForegroundColor Cyan
if (-not $Force) {
Read-Host "`n Press [Enter] to exit"
}
return
}
Write-Host "`n[*] Proceeding with forced reinstallation..." -ForegroundColor Yellow
}
else {
Write-Host $guardianBanner
if (-not $Force) {
$confirm = Read-Host "`n Press [Enter] to install WireFox, or type 'C' to cancel"
if ($confirm -match "^[cCqQ]") {
Write-Host "`n[*] Installation cancelled." -ForegroundColor Yellow
return
}
}
}
# 4. Check for Local Binary, Local Source Code, or Download Release
$repo = "TalviFox/WireFox"
$expectedHash = $null
$releaseTag = "v1.0.6"
$candidateExe = $null
if ($Path -and (Test-Path $Path)) {
$candidateExe = (Resolve-Path $Path).Path
}
elseif ($PSScriptRoot -and (Test-Path (Join-Path $PSScriptRoot "publish\WireFox.exe"))) {
$candidateExe = Join-Path $PSScriptRoot "publish\WireFox.exe"
}
elseif ($PSScriptRoot -and (Test-Path (Join-Path $PSScriptRoot "WireFox.exe"))) {
$candidateExe = Join-Path $PSScriptRoot "WireFox.exe"
}
if ($candidateExe -and -not $Build) {
Write-Host "[*] Pre-compiled local binary detected: $candidateExe" -ForegroundColor Cyan
Copy-Item -Path $candidateExe -Destination $stagingExe -Force
try {
$verInfo = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($candidateExe)
if ($verInfo.ProductVersion) { $releaseTag = "v$($verInfo.ProductVersion.Trim())" } elseif ($verInfo.FileVersion) { $releaseTag = "v$($verInfo.FileVersion.Trim())" }
}
catch {}
Write-Host "[+] Local binary verified and staged for installation ($releaseTag)." -ForegroundColor Green
}
elseif ($localProj -and (Test-Path $localProj)) {
Write-Host "[*] Local source code detected. Building locally instead of downloading..." -ForegroundColor Cyan
$publishDir = Join-Path $PSScriptRoot "publish"
$dotnet = "dotnet"
$dotnetDir = "$env:LOCALAPPDATA\Microsoft\dotnet"
if (Test-Path "$dotnetDir\dotnet.exe") {
$dotnet = "$dotnetDir\dotnet.exe"
}
$proc = Start-Process $dotnet -ArgumentList "publish `"$localProj`" -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o `"$publishDir`"" -Wait -NoNewWindow -PassThru
if ($proc.ExitCode -ne 0) {
Write-Host "`n[X] Local build failed with exit code $($proc.ExitCode)." -ForegroundColor Red
return
}
$builtExe = Join-Path $publishDir "WireFox.exe"
if (-not (Test-Path $builtExe)) {
Write-Host "`n[X] Local build succeeded but WireFox.exe not found at $builtExe." -ForegroundColor Red
return
}
Copy-Item -Path $builtExe -Destination $stagingExe -Force
Write-Host "[+] Local build compiled and verified." -ForegroundColor Green
}
else {
$apiUrl = "https://api.github.com/repos/$repo/releases/latest"
$headers = @{ "User-Agent" = "WireFox-Installer" }
Write-Host "[*] Querying latest release from $repo over TLS..." -ForegroundColor Cyan
try {
$release = Invoke-RestMethod -Uri $apiUrl -Headers $headers -UseBasicParsing
$releaseTag = $release.tag_name
# Try to find checksums in assets
$sumsAsset = $release.assets | Where-Object { $_.name -match "^(SHA256SUMS|checksums|WireFox.*)\.(txt|sha256)$" -or $_.name -eq "WireFox.exe.sha256" } | Select-Object -First 1
if ($sumsAsset) {
$checksumText = Invoke-RestMethod -Uri $sumsAsset.browser_download_url -Headers $headers -UseBasicParsing
if ($checksumText -match "([a-fA-F0-9]{64})\s+.*WireFox\.exe") {
$expectedHash = $matches[1].ToLowerInvariant()
}
elseif ($checksumText -match "\b([a-fA-F0-9]{64})\b") {
$expectedHash = $matches[1].ToLowerInvariant()
}
}
# Fallback to body regex if not in assets
if (-not $expectedHash -and $release.body -match "\b([a-fA-F0-9]{64})\b") {
$expectedHash = $matches[1].ToLowerInvariant()
}
}
catch {
Write-Host "[!] Could not query release API metadata. Proceeding with direct binary download..." -ForegroundColor Yellow
}
$downloadUrl = "https://github.com/$repo/releases/latest/download/WireFox.exe"
Write-Host "[*] Downloading WireFox ($releaseTag)..." -ForegroundColor Cyan
try {
Invoke-WebRequest -Uri $downloadUrl -OutFile $stagingExe -UseBasicParsing
}
catch {
Write-Host "`n[X] Failed to download WireFox.exe from GitHub Releases ($downloadUrl)." -ForegroundColor Red
Write-Host " Please ensure a Release containing 'WireFox.exe' exists at:" -ForegroundColor Yellow
Write-Host " https://github.com/$repo/releases" -ForegroundColor White
return
}
# 5. Enforce SHA-256 Integrity Check
Write-Host "[*] Verifying cryptographic SHA-256 integrity..." -ForegroundColor Cyan
$actualHash = (Get-FileHash -Path $stagingExe -Algorithm SHA256).Hash.ToLowerInvariant()
Write-Host " Downloaded SHA-256: $actualHash" -ForegroundColor White
if ($expectedHash) {
if ($actualHash -ne $expectedHash) {
Write-Host "`n[X] CRITICAL: SHA-256 CHECKSUM VERIFICATION FAILED!" -ForegroundColor Red
Write-Host " Expected: $expectedHash" -ForegroundColor Yellow
Write-Host " Actual: $actualHash" -ForegroundColor Yellow
Write-Host " The downloaded binary has been discarded to protect your system." -ForegroundColor Red
Remove-Item -Path $stagingExe -Force -ErrorAction SilentlyContinue
return
}
Write-Host "[+] SHA-256 integrity verified successfully! (100% Match with GitHub Release)" -ForegroundColor Green
}
else {
Write-Host "[!] Notice: No published checksum found in release metadata. Proceeding with caution." -ForegroundColor Yellow
}
}
# 6. Stop running instance if updating (Ask before killing)
$running = Get-Process -Name "WireFox" -ErrorAction SilentlyContinue
if ($running) {
Write-Host "`n[?] WireFox is currently running in the background." -ForegroundColor Yellow
$confirm = Read-Host " Do you want to close the running WireFox instance to proceed with installation? (Y/N)"
if ($confirm -notmatch "^[yY]") {
Write-Host "[*] Installation cancelled by user. The running WireFox instance was not closed." -ForegroundColor Cyan
return
}
Write-Host "[*] Stopping running WireFox process..." -ForegroundColor Cyan
$running | Stop-Process -Force
Start-Sleep -Seconds 1
}
# 7. Move verified binary into place
Copy-Item -Path $stagingExe -Destination $targetExe -Force
Remove-Item -Path $stagingExe -Force -ErrorAction SilentlyContinue
Write-Host "[+] Installed to: $targetExe" -ForegroundColor Green
# 8. Deploy companion scripts (uninstaller & integrity auditor)
$uninstallerTarget = Join-Path $installDir "uninstall.ps1"
$verifierTarget = Join-Path $installDir "verify.ps1"
$localUninstall = if ($PSScriptRoot) { Join-Path $PSScriptRoot "uninstall.ps1" } else { $null }
$localVerifier = if ($PSScriptRoot) { Join-Path $PSScriptRoot "verify.ps1" } else { $null }
if ($localUninstall -and (Test-Path $localUninstall)) {
Copy-Item -Path $localUninstall -Destination $uninstallerTarget -Force
Write-Host "[+] Local uninstaller script deployed: $uninstallerTarget" -ForegroundColor Green
}
else {
try {
$uninstallerUrl = "https://raw.githubusercontent.com/$repo/main/uninstall.ps1"
Invoke-WebRequest -Uri $uninstallerUrl -OutFile $uninstallerTarget -UseBasicParsing
Write-Host "[+] Uninstaller script deployed: $uninstallerTarget" -ForegroundColor Green
}
catch {
Write-Host "[!] Could not deploy uninstaller script: $_" -ForegroundColor Yellow
}
}
if ($localVerifier -and (Test-Path $localVerifier)) {
Copy-Item -Path $localVerifier -Destination $verifierTarget -Force
Write-Host "[+] Local integrity auditor deployed: $verifierTarget" -ForegroundColor Green
}
else {
try {
$verifierUrl = "https://raw.githubusercontent.com/$repo/main/verify.ps1"
Invoke-WebRequest -Uri $verifierUrl -OutFile $verifierTarget -UseBasicParsing
Write-Host "[+] Integrity auditor script deployed: $verifierTarget" -ForegroundColor Green
}
catch {
Write-Host "[!] Could not deploy integrity auditor script: $_" -ForegroundColor Yellow
}
}
# 9. Register in Windows "Installed Apps" (Add or Remove Programs)
try {
$regKey = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\WireFox"
if (-not (Test-Path $regKey)) {
New-Item -Path $regKey -Force | Out-Null
}
Set-ItemProperty -Path $regKey -Name "DisplayName" -Value "WireFox"
Set-ItemProperty -Path $regKey -Name "DisplayVersion" -Value $releaseTag.TrimStart('v', 'V')
Set-ItemProperty -Path $regKey -Name "Publisher" -Value "FoxDen Software"
Set-ItemProperty -Path $regKey -Name "DisplayIcon" -Value "$targetExe,0"
Set-ItemProperty -Path $regKey -Name "InstallLocation" -Value $installDir
Set-ItemProperty -Path $regKey -Name "UninstallString" -Value "powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"$uninstallerTarget`""
Set-ItemProperty -Path $regKey -Name "URLInfoAbout" -Value "https://github.com/TalviFox/WireFox"
Write-Host "[+] Registered in Windows Installed Apps (Add or Remove Programs)." -ForegroundColor Green
}
catch {
Write-Host "[!] Could not register in Windows Uninstall registry: $_" -ForegroundColor Yellow
}
# 10. Create Start Menu Shortcut
try {
$wsh = New-Object -ComObject WScript.Shell
$startMenuDir = "$env:ProgramData\Microsoft\Windows\Start Menu\Programs"
$shortcut = $wsh.CreateShortcut((Join-Path $startMenuDir "WireFox.lnk"))
$shortcut.TargetPath = $targetExe
$shortcut.WorkingDirectory = $installDir
$shortcut.IconLocation = "$targetExe,0"
$shortcut.Description = "Automated Roaming & Watchdog Manager for WireGuard on Windows"
$shortcut.Save()
Write-Host "[+] Start Menu shortcut created." -ForegroundColor Green
}
catch {
Write-Host "[!] Could not create Start Menu shortcut: $_" -ForegroundColor Yellow
}
# 11. Complete & Launch
$checkEmoji = [char]::ConvertFromUtf32(0x2705)
Write-Host @"
======================================================
$checkEmoji WireFox has been installed successfully!
======================================================
"@ -ForegroundColor Green
Write-Host "[*] Launching WireFox..." -ForegroundColor Cyan
Start-Process $targetExe
if (-not $Force) {
Read-Host "`n Press [Enter] to exit installer"
}