forked from Ben0xA/nps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnps-test.cmd
45 lines (45 loc) · 1.12 KB
/
nps-test.cmd
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
@echo off
cls
echo -------------------
echo [ testing nps.exe ]
echo -------------------
echo.
echo.
echo [help argument]
echo.
set argument=-help
echo $ nps.exe %argument%
nps.exe %argument%
echo.
echo [single command]
echo.
set argument=Get-Date
echo $ nps.exe %argument%
nps.exe %argument%
echo.
echo [multiple commands]
echo.
set argument="Get-Date; Write-Output 'Ohai there'"
echo $ nps.exe %argument%
nps.exe %argument%
echo.
echo [encode]
set argument=-encode "& Get-Date; Write-Output 'Ohai there'"
echo $ nps.exe %argument%
nps.exe %argument%
echo.
echo [decode]
set argument=-decode JgAgAEcAZQB0AC0ARABhAHQAZQA7ACAAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAE8AaABhAGkAIAB0AGgAZQByAGUAJwA=
echo $ nps.exe %argument%
nps.exe %argument%
echo.
echo [encoded command (1)]
set argument=-encodedcommand JgAgAEcAZQB0AC0ARABhAHQAZQA7ACAAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAE8AaABhAGkAIAB0AGgAZQByAGUAJwA=
echo $ nps.exe %argument%
nps.exe %argument%
echo.
echo [encoded command (2)]
set argument=-enc JgAgAEcAZQB0AC0ARABhAHQAZQA7ACAAVwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAE8AaABhAGkAIAB0AGgAZQByAGUAJwA=
echo $ nps.exe %argument%
nps.exe %argument%
echo.