The use of pwntools in the common Python Library of CTF

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.