Skip to content

Commit deeb377

Browse files
committed
Update docs about runps
1 parent 4748c20 commit deeb377

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Menu:
137137
[+] upload <local_path> <remote_path> - Upload a file
138138
[+] download <remote_path> <local_path> - Download a file
139139
[+] loadps <local_path>.ps1 - Load PowerShell functions from a local script
140+
[+] runps <local_path>.ps1 - Run a local PowerShell script on the remote host
140141
[+] menu - Show this menu
141142
[+] clear, cls - Clear the screen
142143
[+] exit - Exit the shell

docs/usage.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ evil-winrm-py PS C:\Users\Administrator\Documents> upload <local_path> <remote_p
169169
evil-winrm-py PS C:\Users\Administrator\Documents> download <remote_path> <local_path>
170170
```
171171
172-
### Loading PowerShell Scripts
172+
### Loading PowerShell Scripts (Dot Sourcing)
173173
174-
You can load PowerShell functions from a local script file into the interactive shell using the `loadps` command. This allows you to use custom PowerShell functions defined in your script.
174+
You can load PowerShell functions from a local script file into the interactive shell using the `loadps` command. This allows you to use custom PowerShell functions defined in your script. This method is known as "dot sourcing".
175175
176176
This can be helpful when using tools like `PowerView` or `PowerUp` that provide a set of PowerShell functions for post-exploitation tasks.
177177
@@ -187,6 +187,14 @@ The help command can be used to get more information about the available command
187187
evil-winrm-py PS C:\Users\Administrator\Documents> Get-Help <LoadedFunctionName> # or help <LoadedFunctionName>
188188
```
189189
190+
### Running Local PowerShell Scripts
191+
192+
You can run a local PowerShell script on the remote host using the `runps` command. This will read the contents of the specified PowerShell script file and execute it on the remote machine.
193+
194+
```bash
195+
evil-winrm-py PS C:\Users\Administrator\Documents> runps <local_path>.ps1
196+
```
197+
190198
## Additional Options
191199
192200
### Using No Colors

evil_winrm_py/evil_winrm_py.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def show_menu() -> None:
141141
("upload <local_path> <remote_path>", "Upload a file"),
142142
("download <remote_path> <local_path>", "Download a file"),
143143
("loadps <local_path>.ps1", "Load PowerShell functions from a local script"),
144+
("runps <local_path>.ps1", "Run a local PowerShell script on the remote host"),
144145
("menu", "Show this menu"),
145146
("clear, cls", "Clear the screen"),
146147
("exit", "Exit the shell"),

0 commit comments

Comments
 (0)