From 3926d1d47b09912dcc6b447b8fa97d59b649b72f Mon Sep 17 00:00:00 2001 From: Ikkxeer <137718457+ikkxeer@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:21:44 +0200 Subject: [PATCH 1/4] Add files via upload --- Scripts/Network/Verify-IPConnections.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Scripts/Network/Verify-IPConnections.ps1 diff --git a/Scripts/Network/Verify-IPConnections.ps1 b/Scripts/Network/Verify-IPConnections.ps1 new file mode 100644 index 0000000..19db71d --- /dev/null +++ b/Scripts/Network/Verify-IPConnections.ps1 @@ -0,0 +1,10 @@ +$iplist = @("192.168.1.1", "google.com", "8.8.8.8", "1.1.1.1", "192.168.224.222") + +foreach ($ip in $iplist) { + $result = Test-Connection -ComputerName $ip -Count 1 -Quiet + if ($result) { + Write-Host "$ip - CONNECTED" -ForegroundColor Green + } else { + Write-Host "$ip - NO CONNECTION" -ForegroundColor Red + } +} From 269014be6f0cc360d6f7dce995c8183787f71891 Mon Sep 17 00:00:00 2001 From: Ikkxeer <137718457+ikkxeer@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:22:59 +0200 Subject: [PATCH 2/4] Add files via upload --- Scripts/Network/Get-IPInfo.ps1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 Scripts/Network/Get-IPInfo.ps1 diff --git a/Scripts/Network/Get-IPInfo.ps1 b/Scripts/Network/Get-IPInfo.ps1 new file mode 100644 index 0000000..1525d55 --- /dev/null +++ b/Scripts/Network/Get-IPInfo.ps1 @@ -0,0 +1 @@ +Get-NetIPAddress | Format-Table -Property InterfaceAlias,IPAddress,AddressFamily,PrefixLength -AutoSize From 49d08c87810a59b651ebb99753d174a43da93e01 Mon Sep 17 00:00:00 2001 From: Ikkxeer <137718457+ikkxeer@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:24:59 +0200 Subject: [PATCH 3/4] Add files via upload --- Scripts/Network/Monitor-Networking.ps1 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Scripts/Network/Monitor-Networking.ps1 diff --git a/Scripts/Network/Monitor-Networking.ps1 b/Scripts/Network/Monitor-Networking.ps1 new file mode 100644 index 0000000..a8d3383 --- /dev/null +++ b/Scripts/Network/Monitor-Networking.ps1 @@ -0,0 +1,5 @@ +while ($true) { + Clear-Host + Get-NetAdapterStatistics | Format-Table -AutoSize + Start-Sleep -Seconds 1 +} From d284b0e5e346e6537519ceff26b0207c6a9cb77e Mon Sep 17 00:00:00 2001 From: Ikkxeer <137718457+ikkxeer@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:29:07 +0200 Subject: [PATCH 4/4] Add files via upload --- Scripts/Network/Scan-IPPorts.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Scripts/Network/Scan-IPPorts.ps1 diff --git a/Scripts/Network/Scan-IPPorts.ps1 b/Scripts/Network/Scan-IPPorts.ps1 new file mode 100644 index 0000000..8b03081 --- /dev/null +++ b/Scripts/Network/Scan-IPPorts.ps1 @@ -0,0 +1,13 @@ +param ( + [string]$IPAddress = "192.168.1.1", + [int[]]$Ports = @(22, 80, 443) +) + +foreach ($port in $Ports) { + $tcpConnection = Test-NetConnection -ComputerName $IPAddress -Port $port + if ($tcpConnection.TcpTestSucceeded) { + Write-Output "Port $port in $IPAddress is open." + } else { + Write-Output "Port $port in $IPAddress is closed." + } +} \ No newline at end of file