mirror of https://github.com/pwndbg/pwndbg.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.3 KiB
Markdown
48 lines
1.3 KiB
Markdown
<!-- THIS PART OF THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT. See scripts/generate_docs.sh -->
|
|
|
|
|
|
|
|
|
|
# hijack-fd
|
|
|
|
## Description
|
|
|
|
|
|
Replace a file descriptor of a debugged process.
|
|
|
|
The new file descriptor can point to:
|
|
- a file
|
|
- a pipe
|
|
- a socket
|
|
- a device, etc.
|
|
|
|
Examples:
|
|
1. Redirect STDOUT to a file:
|
|
`hijack-fd 1 /dev/null`
|
|
|
|
2. Redirect STDERR to a socket:
|
|
`hijack-fd 2 tcp://localhost:8888`
|
|
|
|
## Usage:
|
|
|
|
|
|
```bash
|
|
usage: hijack-fd [-h] fdnum newfile
|
|
|
|
```
|
|
## Positional Arguments
|
|
|
|
|Positional Argument|Help|
|
|
| :--- | :--- |
|
|
|`fdnum`|File descriptor (FD) number to be replaced with the specified new socket or file.|
|
|
|`newfile`|Specify a file or a socket. For files, the filename must start with `/` (e.g., `/etc/passwd`). For sockets, the following formats are allowed: - `127.0.0.1:80` (default is TCP) - `tcp://[::1]:80` - `udp://example.com:80` - `tcp+ipv6://example.com:80` |
|
|
|
|
## Optional Arguments
|
|
|
|
|Short|Long|Default|Help|
|
|
| :--- | :--- | :--- | :--- |
|
|
|`-h`|`--help`||show this help message and exit|
|
|
|
|
<!-- END OF AUTOGENERATED PART. Do not modify this line or the line below, they mark the end of the auto-generated part of the file. If you want to extend the documentation in a way which cannot easily be done by adding to the command help description, write below the following line. -->
|
|
<!-- ------------\>8---- ----\>8---- ----\>8------------ -->
|