-
Notifications
You must be signed in to change notification settings - Fork 257
/
TestViewer.ps1
126 lines (95 loc) · 4.13 KB
/
TestViewer.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
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
# cd .\Projects\PowerRemoteDesktop\; IEX (Get-Content .\TestViewer.ps1 -Raw -Encoding UTF8)
Write-Output "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
Write-Output "⚠️ Only use this script for testing the application NOT in production ⚠️"
Write-Output "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
Invoke-Expression -Command (Get-Content "PowerRemoteDesktop_Viewer\PowerRemoteDesktop_Viewer.psm1" -Raw)
# Different Scenarios
$remoteHost = "127.0.0.1"
$password = "Jade@123@Pwd"
Write-Host "Scenarios"
Write-Host "---------------"
Write-Host "1. Classic (Secure Password)"
Write-Host "2. Classic (Plain-text password) + LogonUI"
Write-Host "3. Always On Top, Disable Verbosity"
Write-Host "4. TLS v1.3"
Write-Host "5. Clipboard Receive"
Write-Host "6. Clipboard Send"
Write-Host "7. Clipboard Disabled"
Write-Host "8. Image Quality Really Bad"
Write-Host "9. Image Quality Bad"
Write-Host "10. Image Quality High"
Write-Host "11. Resize 10%"
Write-Host "12. Resize 80%, Packet Size 16KiB, BlockSize 128x128"
Write-Host "13. Bad Password"
Write-Host ""
[int]$scenario = Read-Host "Please choose scenario (default: 1)"
switch ($scenario)
{
2
{
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -LogonUI
}
3
{
Write-Host "⚡Check that verbosity is not shown."
Write-Host "⚡Check that virtual desktop form is above all windows."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -DisableVerbosity -AlwaysOnTop
}
4
{
Write-Host "⚡Check that TLSv1.3 is working."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -UseTLSv1_3
}
5
{
Write-Host "⚡Check if viewer is only authorized to receive remote clipboard."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -Clipboard "Receive"
}
6
{
Write-Host "⚡Check if viewer is only authorized to send local clipboard."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -Clipboard "Send"
}
7
{
Write-Host "⚡Check if clipboard synchronization is completely disabled."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -Clipboard "Disabled"
}
8
{
Write-Host "⚡Check if image quality is really low."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -ImageCompressionQuality 0
}
9
{
Write-Host "⚡Check if image quality is not really good."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -ImageCompressionQuality 30
}
10
{
Write-Host "⚡Check if image quality is really good."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -ImageCompressionQuality 100
}
11
{
Write-Host "⚡Check if desktop image is reduced by 10%."
Write-Host "⚡Check if resize quality is bad."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -Resize -ResizeRatio 90
}
12
{
Write-Host "⚡Check if desktop image is reduced by 20%."
Write-Host "⚡Control block size."
Write-Host "⚡Control packet size."
Invoke-RemoteDesktopViewer -Password $password -ServerAddress $remoteHost -Resize -ResizeRatio 80 -PacketSize "Size16384" -BlockSize "Size128"
}
13
{
Write-Host "⚡Be sure that authentication fails with remote server."
Invoke-RemoteDesktopViewer -Password "bad@Bad123!Bad" -ServerAddress $remoteHost
}
default
{
Invoke-RemoteDesktopViewer -SecurePassword (ConvertTo-SecureString -String $password -AsPlainText -Force) -ServerAddress $remoteHost
}
}