Before mainly using the Zio Library, the understanding of Pwntools is limited to dynelf, Zio can replace Pwntools. Later found that Pwntools has a lot of high-level usage has not heard, this time to learn how to use, I hope that in the future exp writing can provide efficiency.
Pwntools's official website is as follows: http://pwntools.com/
The installation method is to use the PIP command, pip install PWN. This will allow you to install the PWN library. Used with the From PWN Import * to make the call. The main IO functions in Pwntools are given below. This is more easy to confuse with Zio, remember Zio is read, Write,pwn is recv, send on it.
Interactive (): direct interaction, equivalent to return to the shell mode, after the shell was obtained using recv (numb=4096, timeout=default): Receives the specified byte Recvall (): Receives until Eofrecvline (keepends=True): Receives a row, keepends the \nrecvuntil of whether to keep the end of the line (delims, drop= False): Read until the delims pattern appears recvrepeat (timeout=default): Continue to accept until EOF or Timeoutsend (data): Send data sendline: Sends a row of data, which is equivalent to adding \ n At the end of the data
The use of pwntools in the common Python Library of CTF