We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 834cae8 commit 2e55528Copy full SHA for 2e55528
_gtfobins/cp.md
@@ -4,14 +4,24 @@ functions:
4
- code: |
5
LFILE=file_to_read
6
cp "$LFILE" /dev/stdout
7
+ file-write:
8
+ - code: |
9
+ LFILE=file_to_write
10
+ echo "DATA" | cp /dev/stdin "$LFILE"
11
suid:
12
13
14
+ echo "DATA" | ./cp /dev/stdin "$LFILE"
15
- description: This can be used to copy and then read or write files from a restricted file systems or with elevated privileges.
16
code: |
17
LFILE=file_to_write
18
TF=$(mktemp)
19
echo "DATA" > $TF
20
./cp $TF $LFILE
21
sudo:
22
23
24
+ echo "DATA" | sudo cp /dev/stdin "$LFILE"
25
26
27
0 commit comments