mirror of
https://github.com/GTFOBins/GTFOBins.github.io.git
synced 2024-11-08 07:49:17 +01:00
Fix dosbox file-read and comment line termination in file-write
This supersedes and closes #300.
This commit is contained in:
parent
89e2aa180e
commit
51d6848786
@ -9,20 +9,20 @@ functions:
|
|||||||
- description: The file is copied to a readable location.
|
- description: The file is copied to a readable location.
|
||||||
code: |
|
code: |
|
||||||
LFILE='\path\to\file_to_read'
|
LFILE='\path\to\file_to_read'
|
||||||
dosbox -c 'mount c /' -c "copy c:$LFILE >c:\tmp\output" -c exit
|
dosbox -c 'mount c /' -c "copy c:$LFILE c:\tmp\output" -c exit
|
||||||
cat '/tmp/OUTPUT'
|
cat '/tmp/OUTPUT'
|
||||||
file-write:
|
file-write:
|
||||||
- description: Note that the name of the written file in the following example will be `FILE_TO_`.
|
- description: Note that the name of the written file in the following example will be `FILE_TO_`. Also note that `echo` terminates the string with a DOS-style line terminator (`\r\n`), if that's a problem and your scenario allows it, you can create the file outside `dosbox`, then use `copy` to do the actual write.
|
||||||
code: |
|
code: |
|
||||||
LFILE='\path\to\file_to_write'
|
LFILE='\path\to\file_to_write'
|
||||||
dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit
|
dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit
|
||||||
suid:
|
suid:
|
||||||
- description: Note that the name of the written file in the following example will be `FILE_TO_`.
|
- description: Note that the name of the written file in the following example will be `FILE_TO_`. Also note that `echo` terminates the string with a DOS-style line terminator (`\r\n`), if that's a problem and your scenario allows it, you can create the file outside `dosbox`, then use `copy` to do the actual write.
|
||||||
code: |
|
code: |
|
||||||
LFILE='\path\to\file_to_write'
|
LFILE='\path\to\file_to_write'
|
||||||
./dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit
|
./dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit
|
||||||
sudo:
|
sudo:
|
||||||
- description: Note that the name of the written file in the following example will be `FILE_TO_`.
|
- description: Note that the name of the written file in the following example will be `FILE_TO_`. Also note that `echo` terminates the string with a DOS-style line terminator (`\r\n`), if that's a problem and your scenario allows it, you can create the file outside `dosbox`, then use `copy` to do the actual write.
|
||||||
code: |
|
code: |
|
||||||
LFILE='\path\to\file_to_write'
|
LFILE='\path\to\file_to_write'
|
||||||
sudo dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit
|
sudo dosbox -c 'mount c /' -c "echo DATA >c:$LFILE" -c exit
|
||||||
|
Loading…
Reference in New Issue
Block a user