Skip to content

Commit

Permalink
Merge e9c9f85 into 4ddb702
Browse files Browse the repository at this point in the history
  • Loading branch information
ghsi10 committed Nov 4, 2022
2 parents 4ddb702 + e9c9f85 commit 323d521
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -70,11 +70,15 @@ The table below shows which release corresponds to each branch, and what date th
- [#2092][2092] shellcraft: dup() is now called dupio() consistently across all supported arches
- [#2093][2093] setresuid() in shellcraft uses current euid by default
- [#2125][2125] Allow tube.recvregex to return capture groups
- [#2082][2082] add libc flag to pwn template


[2062]: https://github.com/Gallopsled/pwntools/pull/2062
[2092]: https://github.com/Gallopsled/pwntools/pull/2092
[2093]: https://github.com/Gallopsled/pwntools/pull/2093
[2125]: https://github.com/Gallopsled/pwntools/pull/2125
[2082]: https://github.com/Gallopsled/pwntools/pull/2082


## 4.9.0 (`beta`)

Expand Down
2 changes: 2 additions & 0 deletions pwnlib/commandline/template.py
Expand Up @@ -14,6 +14,7 @@
)

parser.add_argument('exe', nargs='?', help='Target binary')
parser.add_argument('--libc', help='Target libc')
parser.add_argument('--host', help='Remote host / SSH server')
parser.add_argument('--port', help='Remote port / SSH port', type=int)
parser.add_argument('--user', help='SSH Username')
Expand Down Expand Up @@ -49,6 +50,7 @@ def main(args):

template = lookup.get_template('pwnup.mako')
output = template.render(args.exe,
args.libc,
args.host,
args.port,
args.user,
Expand Down
5 changes: 4 additions & 1 deletion pwnlib/data/templates/pwnup.mako
@@ -1,4 +1,4 @@
<%page args="binary, host=None, port=None, user=None, password=None, remote_path=None, quiet=False"/>\
<%page args="binary, libc=None, host=None, port=None, user=None, password=None, remote_path=None, quiet=False"/>\
<%
import os
import sys
Expand Down Expand Up @@ -51,6 +51,9 @@ context.update(arch='i386')
exe = ${binary_repr}
<% binary_repr = 'exe' %>
%endif
%if libc:
libc = ELF('${libc}')
%endif

%if not quiet:
# Many built-in settings can be controlled on the command-line and show up
Expand Down

0 comments on commit 323d521

Please sign in to comment.