Skip to content

Commit

Permalink
Merge 9c649c0 into dc4108d
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Oct 25, 2022
2 parents dc4108d + 9c649c0 commit ecb159d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pwnlib/tubes/listen.py
Expand Up @@ -13,7 +13,8 @@

class listen(sock):
r"""Creates an TCP or UDP-socket to receive data on. It supports
both IPv4 and IPv6.
both IPv4 and IPv6. You need to call :meth:`wait_for_connection`
before using the listen socket.
The returned object supports all the methods from
:class:`pwnlib.tubes.sock` and :class:`pwnlib.tubes.tube`.
Expand Down Expand Up @@ -46,6 +47,7 @@ class listen(sock):
>>> # and it works with ipv6 by defaut, too!
>>> l = listen()
>>> r = remote('::1', l.lport)
>>> _ = l.wait_for_connection()
>>> r.sendline(b'Bye-bye')
>>> l.recvline()
b'Bye-bye\n'
Expand Down

0 comments on commit ecb159d

Please sign in to comment.