Updated Basic Usage (markdown)

AlessandroZ 2018-11-16 17:22:48 +01:00
parent 971b39d698
commit 4b728a3f2d
1 changed files with 24 additions and 6 deletions

@ -19,7 +19,7 @@ This is even true for modules !
For example if you want to know how to use the pyexec module type :
```code
>> run pyexec -h
>> pyexec -h
usage: pyexec [-h] [--file <path>] [-c <code string>]
execute python code on a remote system
@ -40,13 +40,13 @@ download interactive_shell memory_exec persistence
exit keylogger migrate port_scan pyshell socks5proxy
get_info linux_pers mimikatz portfwd screenshot upload
getprivs linux_stealth mouselogger process_kill search webcamsnap
>> run load_package
>> load_package
_sqlite3 linux_stealth psutil pupyimporter pyshell sqlite3
interactive_shell netcreds ptyshell pupymemexec pywintypes27.dll vidcap
linux_pers portscan pupwinutils pupyutils scapy
```
```code
>> run pyexec -
>> pyexec -
--code --file --help -c -h
>> run pyexec --file /
/bin/ /etc/ /lib/ /libx32/ /media/ /proc/ /sbin/ /sys/ /var/
@ -56,15 +56,15 @@ linux_pers portscan pupwinutils pupyutils scap
## Escape your arguments
Every command in pupy shell uses a unix-like escaping syntax. If you need a space in one of your arguments you need to put your argument between quotes.
```code
>> run shell_exec 'tasklist /V'
>> shell_exec 'tasklist /V'
```
If you send a Windows path, you need to double the backquotes or put everything between quotes.
```code
>> run download 'C:\Windows\System32\cmd.exe'
>> download 'C:\Windows\System32\cmd.exe'
```
or
```code
>> run download C:\\Windows\\System32\\cmd.exe
>> download C:\\Windows\\System32\\cmd.exe
```
@ -125,6 +125,24 @@ To interact with one client, use the `sessions -i` command.
You can find all the available filtering parameters using the `get_info` module.
## Run commands after getting a new session
These commands should be specify on the [pupy.conf](https://github.com/n1nj4sec/pupy/blob/unstable/pupy/pupy.conf.default) file after the [on_connect](https://github.com/n1nj4sec/pupy/blob/unstable/pupy/pupy.conf.default#L135) statement.
To run these modules for each new sessions, all commands should start by **any** (or by *) and should have different names.
```
[on_connect]
any_1 = beroot
any_2 = lazagne
```
Another way should be to include an entire category like so
```
[on_connect]
* = include:default_commands
[default_commands]
any_1 = beroot
any_2 = lazagne
```
## Run local commands
Start your command with a `!`
```