mirror of
https://github.com/Thumbscrew/PSWinFW.git
synced 2025-01-18 09:35:47 +00:00
Adjusted Table width, added labels. Removed Include switches as no longer required.
This commit is contained in:
parent
c7d81b75a1
commit
4419df1e5b
BIN
PSWinFW.psd1
BIN
PSWinFW.psd1
Binary file not shown.
@ -15,17 +15,20 @@
|
|||||||
<Width>8</Width>
|
<Width>8</Width>
|
||||||
</TableColumnHeader>
|
</TableColumnHeader>
|
||||||
<TableColumnHeader> <!-- Action -->
|
<TableColumnHeader> <!-- Action -->
|
||||||
<Width>5</Width>
|
<Width>6</Width>
|
||||||
</TableColumnHeader>
|
</TableColumnHeader>
|
||||||
<TableColumnHeader> <!-- Protocol -->
|
<TableColumnHeader> <!-- Protocol -->
|
||||||
|
<Label>Prot</Label>
|
||||||
<Width>4</Width>
|
<Width>4</Width>
|
||||||
</TableColumnHeader>
|
</TableColumnHeader>
|
||||||
<TableColumnHeader/> <!-- SourceIP -->
|
<TableColumnHeader/> <!-- SourceIP -->
|
||||||
<TableColumnHeader/> <!-- Destination IP -->
|
<TableColumnHeader/> <!-- Destination IP -->
|
||||||
<TableColumnHeader> <!-- SourcePort -->
|
<TableColumnHeader> <!-- SourcePort -->
|
||||||
|
<Label>SrcPt</Label>
|
||||||
<Width>5</Width>
|
<Width>5</Width>
|
||||||
</TableColumnHeader>
|
</TableColumnHeader>
|
||||||
<TableColumnHeader> <!-- DestinationPort -->
|
<TableColumnHeader> <!-- DestinationPort -->
|
||||||
|
<Label>DstPt</Label>
|
||||||
<Width>5</Width>
|
<Width>5</Width>
|
||||||
</TableColumnHeader>
|
</TableColumnHeader>
|
||||||
<TableColumnHeader/> <!-- Size -->
|
<TableColumnHeader/> <!-- Size -->
|
||||||
|
@ -28,21 +28,6 @@ function Get-PSFirewallLog {
|
|||||||
[int]
|
[int]
|
||||||
$Tail = 0,
|
$Tail = 0,
|
||||||
|
|
||||||
# Include extended TCP information (TCP Flags, TCP Sequence Number, TCP ACK Number, TCP Window Size). Defaults to false.
|
|
||||||
[Parameter(Mandatory = $false)]
|
|
||||||
[switch]
|
|
||||||
$IncludeTcpInfo,
|
|
||||||
|
|
||||||
# Include extended ICMP information (ICMP Type and Code). Defaults to false.
|
|
||||||
[Parameter(Mandatory = $false)]
|
|
||||||
[switch]
|
|
||||||
$IncludeIcmpInfo,
|
|
||||||
|
|
||||||
# Include Info field. Defaults to false.
|
|
||||||
[Parameter(Mandatory = $false)]
|
|
||||||
[switch]
|
|
||||||
$IncludeInfo,
|
|
||||||
|
|
||||||
# ComputerName to retrieve log from
|
# ComputerName to retrieve log from
|
||||||
[Parameter(Mandatory = $false, ParameterSetName = 'remote')]
|
[Parameter(Mandatory = $false, ParameterSetName = 'remote')]
|
||||||
[string]
|
[string]
|
||||||
@ -96,34 +81,16 @@ function Get-PSFirewallLog {
|
|||||||
"SourcePort" = 6
|
"SourcePort" = 6
|
||||||
"DestinationPort" = 7
|
"DestinationPort" = 7
|
||||||
"Size" = 8
|
"Size" = 8
|
||||||
|
"TcpFlags" = 9
|
||||||
|
"TcpSyn" = 10
|
||||||
|
"TcpAck" = 11
|
||||||
|
"TcpWin" = 12
|
||||||
|
"IcmpType" = 13
|
||||||
|
"IcmpCode" = 14
|
||||||
|
"Info" = 15
|
||||||
|
"Path" = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
if($IncludeTcpInfo) {
|
|
||||||
$tcpMembers = @{
|
|
||||||
"TcpFlags" = 9
|
|
||||||
"TcpSyn" = 10
|
|
||||||
"TcpAck" = 11
|
|
||||||
"TcpWin" = 12
|
|
||||||
}
|
|
||||||
|
|
||||||
$members += $tcpMembers
|
|
||||||
}
|
|
||||||
|
|
||||||
if($IncludeIcmpInfo) {
|
|
||||||
$icmpMembers = @{
|
|
||||||
"IcmpType" = 13
|
|
||||||
"IcmpCode" = 14
|
|
||||||
}
|
|
||||||
|
|
||||||
$members += $icmpMembers
|
|
||||||
}
|
|
||||||
|
|
||||||
if($IncludeInfo) {
|
|
||||||
$members += @{ "Info" = 15 }
|
|
||||||
}
|
|
||||||
|
|
||||||
$members += @{ "Path" = 16 }
|
|
||||||
|
|
||||||
$log | ForEach-Object {
|
$log | ForEach-Object {
|
||||||
$line = $_
|
$line = $_
|
||||||
$split = $line -split ('\s')
|
$split = $line -split ('\s')
|
||||||
|
Loading…
Reference in New Issue
Block a user