@@ -10,6 +10,12 @@ function RefreshDrives {
1010 $driveSelectBox.Items.Clear ()
1111 $driveSelectBox.Items.AddRange ($driveLetters )
1212}
13+ function OptimizeSettings {
14+ $processAmountSelector.Value = $coreCount * 2
15+ $noWaitOption.Checked = $true
16+ $waitOption.Checked = $false
17+ Write-Host " Optimized settings for speed."
18+ }
1319
1420$global :process = @ ()
1521function OnStartButtonClick {
@@ -19,12 +25,26 @@ function OnStartButtonClick {
1925 $driveLetter = $driveSelectBox.Text
2026 $adjustedCoreCount = $processAmountSelector.Value
2127 if ($randomRadio.Checked -eq $true ) {
22- $proc = Start-Process - FilePath pwsh - ArgumentList " -NoProfile -File .\Scripts\BitGuesserProcess.ps1 -driveLetter $driveLetter -saveLocation $saveLocation -coreCount $adjustedCoreCount " - Verb RunAs - WindowStyle Maximized - PassThru
23- $global :process += $proc
28+ if ($waitOption.Checked -eq $true ) {
29+ $proc = Start-Process - FilePath pwsh - ArgumentList " -NoProfile -File .\Scripts\BitGuesserProcess.ps1 -driveLetter $driveLetter -saveLocation $saveLocation -coreCount $adjustedCoreCount " - Verb RunAs - WindowStyle Maximized - PassThru
30+ $global :process += $proc
31+ $infoBox.Text = " Currently running with settings:`n Mode: Random Guesses`n Confirming Guesses: True`n Parallel Guesses: $ ( $adjustedCoreCount ) `n Drive Letter: $ ( $driveLetter ) "
32+ } elseif ($noWaitOption.Checked -eq $true ) {
33+ $proc = Start-Process - FilePath pwsh - ArgumentList " -NoProfile -File .\Scripts\BitGuesserProcess-NoWait.ps1 -driveLetter $driveLetter -saveLocation $saveLocation -coreCount $adjustedCoreCount " - Verb RunAs - WindowStyle Maximized - PassThru
34+ $global :process += $proc
35+ $infoBox.Text = " Currently running with settings:`n Mode: Random Guesses`n Confirming Guesses: False`n Parallel Guesses: $ ( $adjustedCoreCount ) `n Drive Letter: $ ( $driveLetter ) "
36+ }
2437 }
2538 elseif ($orderRadio.Checked -eq $true ) {
26- $proc = Start-Process - FilePath pwsh - ArgumentList " -NoProfile -File .\Scripts\BitGuesserProcess-InOrder.ps1 -driveLetter $driveLetter -saveLocation $saveLocation -coreCount $adjustedCoreCount " - Verb RunAs - WindowStyle Maximized - PassThru
27- $global :process += $proc
39+ if ($waitOption.Checked -eq $true ) {
40+ $proc = Start-Process - FilePath pwsh - ArgumentList " -NoProfile -File .\Scripts\BitGuesserProcess-InOrder.ps1 -driveLetter $driveLetter -saveLocation $saveLocation -coreCount $adjustedCoreCount " - Verb RunAs - WindowStyle Maximized - PassThru
41+ $global :process += $proc
42+ $infoBox.Text = " Currently running with settings:`n Mode: Ordered Guesses`n Confirming Guesses: True`n Parallel Guesses: $ ( $adjustedCoreCount ) `n Drive Letter: $ ( $driveLetter ) "
43+ } elseif ($noWaitOption.Checked -eq $true ) {
44+ $proc = Start-Process - FilePath pwsh - ArgumentList " -NoProfile -File .\Scripts\BitGuesserProcess-InOrder-NoWait.ps1 -driveLetter $driveLetter -saveLocation $saveLocation -coreCount $adjustedCoreCount " - Verb RunAs - WindowStyle Maximized - PassThru
45+ $global :process += $proc
46+ $infoBox.Text = " Currently running with settings:`n Mode: Ordered Guesses`n Confirming Guesses: False`n Parallel Guesses: $ ( $adjustedCoreCount ) `n Drive Letter: $ ( $driveLetter ) "
47+ }
2848 }
2949 $guesserProgressLabel.Text = " Generating keys..."
3050 $startButton.Enabled = $false
@@ -42,6 +62,7 @@ function OnStopButtonClick {
4262 $guesserProgressLabel.Text = " "
4363 $startButton.Enabled = $true
4464 $stopButton.Enabled = $false
65+ $infoBox.Text = " "
4566}
4667
4768# Loading external assemblies
@@ -62,8 +83,12 @@ $startButton = New-Object System.Windows.Forms.Button
6283$stopButton = New-Object System.Windows.Forms.Button
6384$infoBox = New-Object System.Windows.Forms.TextBox
6485$modeBox = New-Object System.Windows.Forms.GroupBox
65- $randomRadio = New-Object System.Windows.Forms.RadioButton
6686$orderRadio = New-Object System.Windows.Forms.RadioButton
87+ $randomRadio = New-Object System.Windows.Forms.RadioButton
88+ $advancedOptions = New-Object System.Windows.Forms.GroupBox
89+ $waitOption = New-Object System.Windows.Forms.RadioButton
90+ $noWaitOption = New-Object System.Windows.Forms.RadioButton
91+ $optimizeButton = New-Object System.Windows.Forms.Button
6792#
6893# guesserProgressBar
6994#
@@ -199,9 +224,54 @@ $orderRadio.TabIndex = 7
199224$orderRadio.Text = " Go in Order"
200225$orderRadio.UseVisualStyleBackColor = $true
201226#
227+ # advancedOptions
228+ #
229+ $advancedOptions.Controls.Add ($noWaitOption )
230+ $advancedOptions.Controls.Add ($waitOption )
231+ $advancedOptions.Location = New-Object System.Drawing.Point(158 , 67 )
232+ $advancedOptions.Name = " advancedOptions"
233+ $advancedOptions.Size = New-Object System.Drawing.Size(133 , 74 )
234+ $advancedOptions.TabIndex = 8
235+ $advancedOptions.TabStop = $false
236+ $advancedOptions.Text = " Advanced"
237+ #
238+ # waitOption
239+ #
240+ $waitOption.AutoSize = $true
241+ $waitOption.Checked = $true
242+ $waitOption.Location = New-Object System.Drawing.Point(7 , 20 )
243+ $waitOption.Name = " waitOption"
244+ $waitOption.Size = New-Object System.Drawing.Size(104 , 17 )
245+ $waitOption.TabIndex = 9
246+ $waitOption.TabStop = $true
247+ $waitOption.Text = " Confirm Guesses"
248+ $waitOption.UseVisualStyleBackColor = $true
249+ #
250+ # noWaitOption
251+ #
252+ $noWaitOption.AutoSize = $true
253+ $noWaitOption.Location = New-Object System.Drawing.Point(7 , 44 )
254+ $noWaitOption.Name = " noWaitOption"
255+ $noWaitOption.Size = New-Object System.Drawing.Size(88 , 17 )
256+ $noWaitOption.TabIndex = 10
257+ $noWaitOption.Text = " Don\'t Confirm"
258+ $noWaitOption.UseVisualStyleBackColor = $true
259+ #
260+ # optimizeButton
261+ #
262+ $optimizeButton.Location = New-Object System.Drawing.Point(298 , 67 )
263+ $optimizeButton.Name = " optimizeButton"
264+ $optimizeButton.Size = New-Object System.Drawing.Size(74 , 74 )
265+ $optimizeButton.TabIndex = 11
266+ $optimizeButton.Text = " Optimize Settings for Speed"
267+ $optimizeButton.UseVisualStyleBackColor = $true
268+ $optimizeButton.Add_Click ({OptimizeSettings})
269+ #
202270# BitGuesserGUI
203271#
204272$BitGuesserGUI.ClientSize = New-Object System.Drawing.Size(384 , 261 )
273+ $BitGuesserGUI.Controls.Add ($optimizeButton )
274+ $BitGuesserGUI.Controls.Add ($advancedOptions )
205275$BitGuesserGUI.Controls.Add ($modeBox )
206276$BitGuesserGUI.Controls.Add ($infoBox )
207277$BitGuesserGUI.Controls.Add ($stopButton )
0 commit comments