-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.ps1
28 lines (27 loc) · 980 Bytes
/
setup.ps1
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
Write-Host "[!] This script will fail if you are not running from a elevated prompt" -ForegroundColor Yellow
$action = $args[0]
switch ($action) {
"install" {
"[*] Setting up and starting services"
"[*] BoxDrv"
sc.exe create BoxDrv binpath= $(Resolve-Path ".\BoxDrv\BoxDrv.sys") type= kernel
sc.exe start BoxDrv
#"[*] BoxBroker"
#sc.exe create BoxBroker binpath= $(Resolve-Path ".\box_broker.exe") obj= "$($env:USERDOMAIN)\$($env:USERNAME)"
#sc.exe start BoxBroker
"[+] You can now start the $(Resolve-Path ".\box_ui.exe") binary to start interacting"
}
"remove" {
"[*] Removing all services"
"[*] BoxDrv"
sc.exe stop BoxDrv
sc.exe delete BoxDrv
#"[*] BoxBroker"
#sc.exe stop BoxBroker
#sc.exe delete BoxBroker
"[+] All services cleaned up"
}
Default {
"[!] Usage: $($MyInvocation.MyCommand.Name) {install|remove}"
}
}