pwntools
. For that, pwntools has the pwntools.tubes
module, that will help us connect to a server.pwnlib.tubes.remote
remote
, at the ip address of the domain ftp.ubuntu.com
and port 21
. The first command receives a line that was sent by the server. It returns the line as a string format. In the code above the return is written as comments. Then, it send some information with send
, without the need to specify amount of bytes to be sent. Another method that's pretty useful is the recvuntil
, that will receive data until the string specified is found.l
and a client r
at the port 9999
, or l.lport
in this case.hello
, which is echoed by the server.