From aa28c00bee48a5f03d431cec00b45f63a5745022 Mon Sep 17 00:00:00 2001 From: AlessandroZ Date: Wed, 10 Oct 2018 17:57:42 +0200 Subject: [PATCH] Updated Basic Usage (markdown) --- Basic-Usage.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Basic-Usage.md b/Basic-Usage.md index 1cc749b..68eb333 100644 --- a/Basic-Usage.md +++ b/Basic-Usage.md @@ -1,5 +1,5 @@ ## Find commands and modules help -First of all it is important to know that nearly all commands in pupy have a help builtin. So if at any moment you are wondering what a command does you can type your command followed by -h or --help. +First of all it is important to know that nearly all commands in pupy have a help builtin. So if at any moment you are wondering what a command does you can type your command followed by `-h` or `--help`. ```code >> sessions -h >> jobs -h @@ -59,11 +59,11 @@ or ## Create Aliases -Modules aliases can be defined in the pupy.conf file. If you define the following alias : +Modules aliases can be defined in the `pupy.conf` file. If you define the following alias : ```code shell=interactive_shell ``` -running the command "shell" will be equivalent as running "run interactive_shell". +running the command `shell` will be equivalent as running `run interactive_shell`. As an example, defining the following alias will add a command to kill the pupy client's process with signal 9: ```code @@ -72,13 +72,13 @@ killme = pyexec -c 'import os;os.kill(os.getpid(),9)' ## Jobs Jobs are commands running in the background. -Some modules like socks5proxy or portfwd automatically start as jobs, but all modules can be run as jobs when used with the --bg argument. +Some modules like `socks5proxy` or `portfwd` automatically start as jobs, but all modules can be run as jobs when used with the `--bg` argument. ```code >> run --bg shell_exec 'tasklist /V' [%] job < shell_exec ['tasklist /V'] > started in background ! ``` -The --bg switch is typically used when you want to execute a long command/module and want the result later while having the shell still functioning. -The jobs output can be retrieved at any moment by using the jobs -p command. From the "jobs" command you can also list jobs status and kill jobs. +The `--bg` switch is typically used when you want to execute a long command/module and want the result later while having the shell still functioning. +The jobs output can be retrieved at any moment by using the `jobs -p` command. From the `jobs` command you can also list jobs status and kill jobs. ```code >> jobs usage: jobs [-h] [-k ] [-l] [-p ] @@ -93,7 +93,7 @@ print the job current output before killing it -p , --print-output print a job output ``` -Regular jobs can be set in Linux/Unix environments by running your pupysh.py script inside the Screen utility. You can then setup cronjobs to run the below command at whatever intervals you require, this essentially pastes the input after the word 'stuff' into the screen session. Replace 1674 with the ID of your screen session, the echo command is the Enter key being pressed. +Regular jobs can be set in Linux/Unix environments by running your `pupysh.py` script inside the Screen utility. You can then setup cronjobs to run the below command at whatever intervals you require, this essentially pastes the input after the word 'stuff' into the screen session. Replace 1674 with the ID of your screen session, the echo command is the Enter key being pressed. ```code screen -S 1674 -X stuff 'this is an example command'$(echo -ne '\015') ``` @@ -113,7 +113,7 @@ To interact with one client, use the `sessions -i` command. >> sessions -i 'platform:Windows release:7' ``` -You can find all the available filtering parameters using the get_info module. +You can find all the available filtering parameters using the `get_info` module. ## Run local commands Start your command with a `!`