Generic interface that represent a tube. Tube definition (process, remote) are OS-specific.
More...
#include <Tube.hpp>
|
| PWNAPI Result< usize > | send (std::vector< u8 > const &str) |
| | Move data given as argument to the send buffer, tries to send. More...
|
| |
| PWNAPI Result< usize > | send (std::string const &str) |
| | Move data given as argument to the send buffer, tries to send. More...
|
| |
| Result< std::vector< u8 > > | recv (_In_ usize size=Tube::PIPE_DEFAULT_SIZE) |
| | Read bytes from the tube, moves the read bytes to the receive buffer. More...
|
| |
| Result< usize > | sendline (_In_ std::vector< u8 > const &data) |
| | Send the data (as byte vector) followed by a line separator. More...
|
| |
| PWNAPI Result< usize > | sendline (_In_ std::string const &str) |
| | Send the data (as str) followed by a line separator. More...
|
| |
|
PWNAPI Result< std::vector< u8 > > | recvuntil (_In_ std::vector< u8 > const &pattern) |
| | Read from tube until receiving the given pattern, and return that data.
|
| |
| PWNAPI Result< std::vector< u8 > > | recvuntil (_In_ std::string const &pattern) |
| |
|
PWNAPI Result< std::vector< u8 > > | recvline () |
| | Read from tube until receiving a line separator and return it.
|
| |
| PWNAPI Result< usize > | sendafter (_In_ std::string const &pattern, _In_ std::string const &data) |
| | function combining in one call recvuntil() + send() More...
|
| |
| PWNAPI Result< usize > | sendafter (_In_ std::vector< u8 > const &pattern, _In_ std::vector< u8 > const &data) |
| |
| PWNAPI Result< usize > | sendlineafter (_In_ std::string const &pattern, _In_ std::string const &data) |
| | Convenience function combining in one call recvuntil() + sendline() More...
|
| |
| PWNAPI Result< usize > | sendlineafter (_In_ std::vector< u8 > const &pattern, _In_ std::vector< u8 > const &data) |
| |
|
PWNAPI Result< usize > | peek () |
| | Peek into the tube to see if any data is available.
|
| |
|
PWNAPI void | interactive () |
| | Basic REPL.
|
| |
|
|
virtual Result< usize > | send_internal (_In_ std::vector< u8 > const &data)=0 |
| |
|
virtual Result< std::vector< u8 > > | recv_internal (_In_ usize size)=0 |
| |
|
virtual Result< usize > | peek_internal ()=0 |
| |
|
|
std::vector< u8 > | m_receive_buffer |
| |
|
std::vector< u8 > | m_send_buffer |
| |
Generic interface that represent a tube. Tube definition (process, remote) are OS-specific.
◆ recv()
Read bytes from the tube, moves the read bytes to the receive buffer.
- Parameters
-
- Returns
- Result<std::vector<u8>>
◆ recvuntil()
| PWNAPI Result<std::vector<u8> > pwn::Net::Tube::recvuntil |
( |
_In_ std::string const & |
pattern | ) |
|
- Parameters
-
- Returns
- Result<std::vector<u8>>
◆ send() [1/2]
| PWNAPI Result<usize> pwn::Net::Tube::send |
( |
std::string const & |
str | ) |
|
Move data given as argument to the send buffer, tries to send.
- Parameters
-
- Returns
- A Result object with the number of bytes sent
◆ send() [2/2]
| PWNAPI Result<usize> pwn::Net::Tube::send |
( |
std::vector< u8 > const & |
str | ) |
|
Move data given as argument to the send buffer, tries to send.
- Parameters
-
- Returns
- A Result object with the number of bytes sent
◆ sendafter() [1/2]
| PWNAPI Result<usize> pwn::Net::Tube::sendafter |
( |
_In_ std::string const & |
pattern, |
|
|
_In_ std::string const & |
data |
|
) |
| |
◆ sendafter() [2/2]
| PWNAPI Result<usize> pwn::Net::Tube::sendafter |
( |
_In_ std::vector< u8 > const & |
pattern, |
|
|
_In_ std::vector< u8 > const & |
data |
|
) |
| |
- Parameters
-
- Returns
- Result<usize>
◆ sendline() [1/2]
| PWNAPI Result<usize> pwn::Net::Tube::sendline |
( |
_In_ std::string const & |
str | ) |
|
Send the data (as str) followed by a line separator.
- Parameters
-
- Returns
- Result<usize> A Result object with the number of bytes sent
◆ sendline() [2/2]
| Result<usize> pwn::Net::Tube::sendline |
( |
_In_ std::vector< u8 > const & |
data | ) |
|
Send the data (as byte vector) followed by a line separator.
- Parameters
-
- Returns
- Result<usize> A Result object with the number of bytes sent
◆ sendlineafter() [1/2]
| PWNAPI Result<usize> pwn::Net::Tube::sendlineafter |
( |
_In_ std::string const & |
pattern, |
|
|
_In_ std::string const & |
data |
|
) |
| |
◆ sendlineafter() [2/2]
| PWNAPI Result<usize> pwn::Net::Tube::sendlineafter |
( |
_In_ std::vector< u8 > const & |
pattern, |
|
|
_In_ std::vector< u8 > const & |
data |
|
) |
| |
The documentation for this class was generated from the following file:
- /home/runner/work/pwn--/pwn--/Modules/Network/Include/Tube.hpp