Skip to content

Commit

Permalink
Improve remote() documentation (#2427)
Browse files Browse the repository at this point in the history
* Improve remote() documentation

* changelog
  • Loading branch information
MrQubo committed Jul 9, 2024
1 parent a366e91 commit 4284c3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ The table below shows which release corresponds to each branch, and what date th
- [#2398][2398] Add support for generating multiple shellcodes at a time in shellcraft
- [#2415][2415] Add shellcraft template for IPv6 socket
- [#2405][2405] Add "none" ssh authentication method
- [#2427][2427] Document behaviour of remote()'s sni argument as string.

[2360]: https://github.com/Gallopsled/pwntools/pull/2360
[2356]: https://github.com/Gallopsled/pwntools/pull/2356
Expand All @@ -101,6 +102,7 @@ The table below shows which release corresponds to each branch, and what date th
[2398]: https://github.com/Gallopsled/pwntools/pull/2398
[2415]: https://github.com/Gallopsled/pwntools/pull/2415
[2405]: https://github.com/Gallopsled/pwntools/pull/2405
[2427]: https://github.com/Gallopsled/pwntools/pull/2405

## 4.13.0 (`beta`)

Expand Down
8 changes: 4 additions & 4 deletions pwnlib/tubes/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class remote(sock):
fam: The string "any", "ipv4" or "ipv6" or an integer to pass to :func:`socket.getaddrinfo`.
typ: The string "tcp" or "udp" or an integer to pass to :func:`socket.getaddrinfo`.
timeout: A positive number, None or the string "default".
sock(:class:`socket.socket`): Socket to inherit, rather than connecting
ssl(bool): Wrap the socket with SSL
ssl_context(ssl.SSLContext): Specify SSLContext used to wrap the socket.
sni: Set 'server_hostname' in ssl_args based on the host parameter.
sock(socket.socket): Socket to inherit, rather than connecting
ssl_args(dict): Pass ssl.wrap_socket named arguments in a dictionary.
ssl_args(dict): Pass :func:`ssl.wrap_socket` named arguments in a dictionary.
sni(str,bool): Set 'server_hostname' in ssl_args. Set to True to set it based on the host argument. Set to False to not provide any value. Default is True.
Examples:
Expand Down Expand Up @@ -57,7 +57,7 @@ class remote(sock):

def __init__(self, host, port,
fam = "any", typ = "tcp",
ssl=False, sock=None, ssl_context=None, ssl_args=None, sni=True,
sock=None, ssl=False, ssl_context=None, ssl_args=None, sni=True,
*args, **kwargs):
super(remote, self).__init__(*args, **kwargs)

Expand Down

0 comments on commit 4284c3f

Please sign in to comment.