mirror of
https://github.com/The-Art-of-Hacking/h4cker
synced 2024-11-21 18:33:03 +00:00
Update powershell_commands.md
This commit is contained in:
parent
c9f6dd7554
commit
26d5cc2518
1 changed files with 15 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
| PowerShell Command | Description |
|
| PowerShell Command | Description |
|
||||||
|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
|
|----------------------------------------------|------------------------------------|
|
||||||
| `Get-ChildItem` | Lists directories |
|
| `Get-ChildItem` | Lists directories |
|
||||||
| `Copy-Item sourceFile.doc destinationFile.doc` | Copies a file (cp, copy, cpi) |
|
| `Copy-Item sourceFile.doc destinationFile.doc` | Copies a file (cp, copy, cpi) |
|
||||||
| `Move-Item sourceFile.doc destinationFile.doc` | Moves a file (mv, move, mi) |
|
| `Move-Item sourceFile.doc destinationFile.doc` | Moves a file (mv, move, mi) |
|
||||||
|
@ -9,10 +9,9 @@
|
||||||
| `Get-Process` | Gets a process listing |
|
| `Get-Process` | Gets a process listing |
|
||||||
| `Get-Service` | Gets a service listing |
|
| `Get-Service` | Gets a service listing |
|
||||||
| `Get-Process \| Export-Csvprocs.csv` | Exports output to a comma-separated values (CSV) file |
|
| `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..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) |
|
| `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 |
|
| `Get-HotFix` | Obtains a list of all installed hotfixes |
|
||||||
| ```cd HKLM: ls``` | Navigates the Windows registry |
|
| `cd HKLM:` and then `ls` | Navigates the Windows registry |
|
||||||
| ```Get-NetFirewallRule –all
|
| `Get-NetFirewallRule –all` or `New-NetFirewallRule -Action Allow -DisplayName LetMeIn-RemoteAddress 10.6.6.6` | Lists and modifies the Windows firewall rules |
|
||||||
New-NetFirewallRule -Action Allow -DisplayName LetMeIn-RemoteAddress 10.6.6.6 | Lists and modifies the Windows firewall rules``` |
|
|
||||||
| `Get-Command` | Gets a list of all available commands |
|
| `Get-Command` | Gets a list of all available commands |
|
||||||
|
|
Loading…
Reference in a new issue