From b87afb96a3922b130f4643e89d50d717930f6301 Mon Sep 17 00:00:00 2001 From: Omar Santos Date: Thu, 26 Dec 2019 21:10:27 -0500 Subject: [PATCH] Update powershell_commands.md --- post_exploitation/powershell_commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/post_exploitation/powershell_commands.md b/post_exploitation/powershell_commands.md index 4c2422e..19ec69d 100644 --- a/post_exploitation/powershell_commands.md +++ b/post_exploitation/powershell_commands.md @@ -8,9 +8,9 @@ | `Get-Location` | Gets the present directory | | `Get-Process` | Gets a process listing | | `Get-Service` | Gets a service listing | -| `Get-Process | Export-Csvprocs.csv` | Exports output to a comma-separated values (CSV) file | -| `1..255 | % {echo "10.1.2.$_"; ping -n 1 -w 100 10.1.2.$_ | SelectString ttl}` | Launches a ping sweep to the 10.1.2.0/24 network | -| `1..1024 | % {echo ((new-object Net.Sockets.TcpClient).Connect("10.1.2.3",$_))"Port $_ is open!"} 2>$null` | Launches a port scan to the 10.1.2.3 host (scans for ports 1 through 1024) | +| `Get-Process \| Export-Csvprocs.csv` | Exports output to a comma-separated values (CSV) file | +| `1..255 \| % {echo "10.1.2.$_"; ping -n 1 -w 100 10.1.2.$_ | SelectString ttl}` | Launches a ping sweep to the 10.1.2.0/24 network | +| `1..1024 \| % {echo ((new-object Net.Sockets.TcpClient).Connect("10.1.2.3",$_))"Port $_ is open!"} 2>$null` | Launches a port scan to the 10.1.2.3 host (scans for ports 1 through 1024) | | `Get-HotFix` | Obtains a list of all installed hotfixes | | ```cd HKLM: \ls``` | Navigates the Windows registry |