-
Notifications
You must be signed in to change notification settings - Fork 0
/
DC-Tool.ps1
180 lines (143 loc) · 20.4 KB
/
DC-Tool.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
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
<#
.NAME
Disconnect-Tool
#>
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
$Form = New-Object system.Windows.Forms.Form
$Form.ClientSize = New-Object System.Drawing.Point(400,400)
$Form.text = "Disconnect-Tool"
$Form.TopMost = $false
$Form.FormBorderStyle = "FixedDialog"
$Form.MaximizeBox = $false
$Form.MinimizeBox = $false
$Form.StartPosition = "CenterScreen"
$iconBase64 = 'AAABAAEAAAAAAAEAIAC4KAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAKH9JREFUeNrt3Xl8lNd18PHffWZG+4YQkhCbQIAxxgbjLd6NjeO9ado0TdLF3dI0Sd04iW2cOLHBaWzj2Emc1O2bNmnfpE2bN2vt4B2M93hHGIzBBiyQQCAh0L7O3PP+8cxIArNomZk7Mzrfzwd7YEYzV3fmOXOf+5x7LiillFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSanSM6wbEW+DWdQgGRMbUEYJBIPrf2D/K0CMMh/Waib2WGfbYY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Rqc5+HlStdt3dE/KoEt6zHMxGQwyrg5gNTgZlAVfR2KVAE5AGh6B9v2HMFjnhuj8Nr6h7tfo5x//HanMxgZIl/roREn9eFFJ6SOqZEvAfDRYb9GQC68VfvdQGHgGZgH9AY/dOC0Dv4yY62zOZ5sNJ9nb/R+EBZEu/WdYgIR9tu0gA2GMH0GiNBf48cL/rbi//HjOa1/Mxov0KfX6lfRlImxQDJ2Z5HYlUDE/HhM2IY+5Zlo341RtXHKSZxfWUQib7RsacXEUQGum0gKx851qsaAQs2L5B2B/3hv/9IfG09eEFMX//QUmZz+BOM5c2RD3yRj/BLMVkFPAeP/zgzRI/DZB+LCYplCZfIvpJjhhZBEPr9z9s9V7nuBKWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKpYT/DyWnKnh+bg3pAAAAAElFTkSuQmCC'
$iconBytes = [Convert]::FromBase64String($iconBase64)
$stream = New-Object IO.MemoryStream($iconBytes, 0, $iconBytes.Length)
$stream.Write($iconBytes, 0, $iconBytes.Length);
$iconImage = [System.Drawing.Image]::FromStream($stream, $true)
$Form.Icon = [System.Drawing.Icon]::FromHandle((New-Object System.Drawing.Bitmap -Argument $stream).GetHIcon())
$Staus_Label = New-Object system.Windows.Forms.Label
$Staus_Label.text = "Status:"
$Staus_Label.AutoSize = $true
$Staus_Label.width = 25
$Staus_Label.height = 10
$Staus_Label.location = New-Object System.Drawing.Point(80,59)
$Staus_Label.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$Staus_Indicator_Label = New-Object system.Windows.Forms.Label
$Staus_Indicator_Label.text = "Online"
$Staus_Indicator_Label.AutoSize = $true
$Staus_Indicator_Label.width = 25
$Staus_Indicator_Label.height = 10
$Staus_Indicator_Label.location = New-Object System.Drawing.Point(252,59)
$Staus_Indicator_Label.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$Staus_Indicator_Label.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#00ff00")
$Adapter_CB = New-Object system.Windows.Forms.ComboBox
$Adapter_CB.width = 100
$Adapter_CB.height = 20
$Adapter_CB.location = New-Object System.Drawing.Point(56,161)
$Adapter_CB.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$Time_TB = New-Object system.Windows.Forms.TextBox
$Time_TB.multiline = $false
$Time_TB.text = "0"
$Time_TB.width = 100
$Time_TB.height = 20
$Time_TB.location = New-Object System.Drawing.Point(228,161)
$Time_TB.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$UP_BT = New-Object system.Windows.Forms.Button
$UP_BT.text = "UP"
$UP_BT.width = 60
$UP_BT.height = 30
$UP_BT.location = New-Object System.Drawing.Point(247,125)
$UP_BT.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$UP_BT.Add_Click{ Set-Time-UP }
$DOWN_BT = New-Object system.Windows.Forms.Button
$DOWN_BT.text = "DOWN"
$DOWN_BT.width = 60
$DOWN_BT.height = 30
$DOWN_BT.location = New-Object System.Drawing.Point(247,185)
$DOWN_BT.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$DOWN_BT.Add_Click{ Set-Time-DOWN }
$EXIT_BT = New-Object system.Windows.Forms.Button
$EXIT_BT.text = "EXIT"
$EXIT_BT.width = 60
$EXIT_BT.height = 30
$EXIT_BT.location = New-Object System.Drawing.Point(247,255)
$EXIT_BT.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$EXIT_BT.Add_Click{ $Form.Close() }
$GO_BT = New-Object system.Windows.Forms.Button
$GO_BT.text = "GO"
$GO_BT.width = 60
$GO_BT.height = 30
$GO_BT.location = New-Object System.Drawing.Point(77,255)
$GO_BT.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$GO_BT.Add_Click{ Disconnect-Sleep }
$ProgressBar = New-Object system.Windows.Forms.ProgressBar
$ProgressBar.width = 369
$ProgressBar.height = 60
$ProgressBar.location = New-Object System.Drawing.Point(15,324)
$Adapter_Label = New-Object system.Windows.Forms.Label
$Adapter_Label.text = "Adapter"
$Adapter_Label.AutoSize = $true
$Adapter_Label.width = 25
$Adapter_Label.height = 10
$Adapter_Label.location = New-Object System.Drawing.Point(83,138)
$Adapter_Label.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$Time_Label = New-Object system.Windows.Forms.Label
$Time_Label.text = "Time:"
$Time_Label.AutoSize = $true
$Time_Label.width = 25
$Time_Label.height = 10
$Time_Label.location = New-Object System.Drawing.Point(193,163)
$Time_Label.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10)
$Form.controls.AddRange(@($Staus_Label,$Staus_Indicator_Label,$Adapter_CB,$Time_TB,$UP_BT,$DOWN_BT,$EXIT_BT,$GO_BT,$ProgressBar,$Adapter_Label,$Time_Label))
#vars
Set-Variable -Name RunStatus -Value $false -Scope Global
#region Logic
## Get and list adapter
$Adapter = (Get-NetAdapter).Name
foreach($A in $Adapter){
$Adapter_CB.Items.Add($A)
}
function Set-Time-UP {
[Int]$Time = $Time_TB.text
[Int]$NewTime = $time + 1
$Time_TB.text = $NewTime
}
function Set-Time-DOWN {
[Int]$Time = $Time_TB.text
[Int]$NewTime = $time - 1
$Time_TB.text = $NewTime
}
function Set-Status {
if ($RunStatus -eq $true) {
$Staus_Indicator_Label.text = "Offline"
$Staus_Indicator_Label.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#FF0000")
}
else {
$Staus_Indicator_Label.text = "Online"
$Staus_Indicator_Label.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#00ff00")
}
}
function Disconnect-Sleep {
$ProgressBar.Maximum = [Int]$Time_TB.text
$ProgressBar.Step = 1
$ProgressBar.Value = 1
Set-Variable -Name RunStatus -Value $true -Scope Global
Set-Status
Disable-NetAdapter -Name $Adapter_CB.Text -Confirm:$false
$i = 1
while($i -le [Int]$Time_TB.text){
Start-Sleep -Seconds 1
$ProgressBar.PerformStep()
$i++
}
Enable-NetAdapter -Name $Adapter_CB.Text -Confirm:$false
Set-Variable -Name RunStatus -Value $false -Scope Global
Start-Sleep -Seconds 1
$ProgressBar.Value = 0
Set-Status
}
#endregion
[void]$Form.ShowDialog()