Skip to content

Commit a4ebc1d

Browse files
committed
Fixed scripts
1 parent ed9786e commit a4ebc1d

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

CoverShell-ita.ps1

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $main_form.Controls.Add($LabelC)
4646

4747
# Create Label for "version"
4848
$LabelV = New-Object System.Windows.Forms.Label
49-
$LabelV.Text = "v. 1.0.1"
49+
$LabelV.Text = "v. 1.0.2"
5050
$LabelV.Font = "Verdana, 9"
5151
$LabelV.Location = New-Object System.Drawing.Point(850,625)
5252
$LabelV.ForeColor = "#ffffff"
@@ -1212,13 +1212,14 @@ $ButtonST3b.Add_Click({
12121212
$textBox232a.Text = "Seleziona durata"
12131213
return
12141214
}
1215-
if ($textBox232b.Text -match "^[0-2]?[0-9][1-9]?$" -and $textBox232b.Text -ne 0,00,000) {
1216-
netsh trace start capture=yes report=yes correlation=yes capturetype=both tracefile=C:\NetTrace.etl
1217-
$textBox232a.Text = "Attendere il messaggio 'cattura completata'..." | Out-String ; sleep $textBox232b.Text
1218-
netsh trace stop ; tracerpt C:\NetTrace.etl -o C:\captlogs.csv -of csv
1219-
$textBox232a.Text = "CATTURA COMPLETATA. `r`n Se eseguito da admin, in C:\ ora ci sono: `r`n - il file compresso 'NetTrace.cab' contenente 'report.html' `r`n - il file 'NetTrace.etl' (da aprire in EventViewer, o ancor meglio usando Networkminer o NetwokMonitor, se installati) con i pacchetti catturati `r`n - il file 'captlogs.csv' (NetTrace.etl in formato differente)" | Out-String
1215+
if ($textBox232b.Text -match "^-?\d+$" -and [int16]$textBox232b.Text -gt 1 -and [int16]$textBox232b.Text -le 300) {
1216+
netsh trace start capture=yes report=yes correlation=yes capturetype=both tracefile=C:\NetTrace.etl
1217+
$textBox232a.Text = "Attendere il messaggio 'cattura completata'..." | Out-String ; sleep $textBox232b.Text
1218+
netsh trace stop ; tracerpt C:\NetTrace.etl -o C:\captlogs.csv -of csv
1219+
$textBox232a.Text = "CATTURA COMPLETATA. `r`n Se eseguito da admin, in C:\ ora ci sono: `r`n - il file compresso 'NetTrace.cab' contenente 'report.html' `r`n - il file 'NetTrace.etl' (da aprire in EventViewer, o ancor meglio usando Networkminer o NetwokMonitor, se installati) con i pacchetti catturati `r`n - il file 'captlogs.csv' (NetTrace.etl in formato differente)" | Out-String
12201220
} else {
1221-
$textBox232a.Text = "Inserirer solo numeri da 1 a 300" | Out-String ; break
1221+
$textBox232a.Text = "Inserire solo numeri da 1 a 300" | Out-String
1222+
return
12221223
}
12231224
})
12241225

CoverShell.ps1

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $main_form.Controls.Add($LabelC)
4646

4747
# Create Label for "version"
4848
$LabelV = New-Object System.Windows.Forms.Label
49-
$LabelV.Text = "v. 1.0.1"
49+
$LabelV.Text = "v. 1.0.2"
5050
$LabelV.Font = "Verdana, 9"
5151
$LabelV.Location = New-Object System.Drawing.Point(850,625)
5252
$LabelV.ForeColor = "#ffffff"
@@ -1211,13 +1211,14 @@ $ButtonST3b.Add_Click({
12111211
$textBox232a.Text = "Select capture duration"
12121212
return
12131213
}
1214-
if ($textBox232b.Text -match "^[0-2]?[0-9][1-9]?$" -and $textBox232b.Text -ne 0,00,000) {
1215-
netsh trace start capture=yes report=yes correlation=yes capturetype=both tracefile=C:\NetTrace.etl
1216-
$textBox232a.Text = "Please wait for the 'capture completed' message..." | Out-String ; sleep $textBox232b.Text
1217-
netsh trace stop ; tracerpt C:\NetTrace.etl -o C:\captlogs.csv -of csv
1218-
$textBox232a.Text = "CAPTURE COMPLETED. `r`n If run as admin, in C:\ now there are: `r`n - the compressed file 'NetTrace.cab' containing 'report.html' `r`n - the file 'NetTrace.etl' (to be opened in EventViewer, or even better using Networkminer or NetwokMonitor, if installed) with captured packets `r`n - the file 'captlogs.csv' (NetTrace.etl in different format)" | Out-String
1214+
if ($textBox232b.Text -match "^-?\d+$" -and [int16]$textBox232b.Text -gt 1 -and [int16]$textBox232b.Text -le 300) {
1215+
netsh trace start capture=yes report=yes correlation=yes capturetype=both tracefile=C:\NetTrace.etl
1216+
$textBox232a.Text = "Please wait for the 'capture completed' message..." | Out-String ; sleep $textBox232b.Text
1217+
netsh trace stop ; tracerpt C:\NetTrace.etl -o C:\captlogs.csv -of csv
1218+
$textBox232a.Text = "CAPTURE COMPLETED. `r`n If run as admin, in C:\ now there are: `r`n - the compressed file 'NetTrace.cab' containing 'report.html' `r`n - the file 'NetTrace.etl' (to be opened in EventViewer, or even better using Networkminer or NetwokMonitor, if installed) with captured packets `r`n - the file 'captlogs.csv' (NetTrace.etl in different format)" | Out-String
12191219
} else {
1220-
$textBox232a.Text = "Insert only numbers from 1 to 300" | Out-String ; break
1220+
$textBox232a.Text = "Insert only numbers from 1 to 300" | Out-String
1221+
return
12211222
}
12221223
})
12231224

0 commit comments

Comments
 (0)