diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 0c3612d1e..9d62fbf3e 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -31,4 +31,6 @@ jobs: git fetch origin git checkout origin/"$GITHUB_BASE_REF" pylint --exit-zero --errors-only pwnlib > base.txt - diff base.txt current.txt \ No newline at end of file + if diff base.txt current.txt | grep '>'; then + false + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 68ea2ce6a..7864e94ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,12 +63,14 @@ The table below shows which release corresponds to each branch, and what date th - [#1632][1632] Enable usage of Pwntools in jupyter - [#1633][1633] Open a shell if `pwn template` cannot download the remote file - [#1644][1644] Enable and support SNI for SSL-wrapped tubes +- [#1651][1651] Make `pwn shellcraft` faster [1602]: https://github.com/Gallopsled/pwntools/pull/1602 [1606]: https://github.com/Gallopsled/pwntools/pull/1606 [1616]: https://github.com/Gallopsled/pwntools/pull/1616 [1632]: https://github.com/Gallopsled/pwntools/pull/1632 [1633]: https://github.com/Gallopsled/pwntools/pull/1633 +[1651]: https://github.com/Gallopsled/pwntools/pull/1651 ## 4.3.0 (`beta`) diff --git a/pwnlib/commandline/shellcraft.py b/pwnlib/commandline/shellcraft.py index 7def3de55..26d0376f2 100644 --- a/pwnlib/commandline/shellcraft.py +++ b/pwnlib/commandline/shellcraft.py @@ -198,11 +198,11 @@ def main(args): common.parser.print_usage() exit() - if args.shellcode not in shellcraft.templates: + try: + func = get_template(args.shellcode) + except AttributeError: log.error("Unknown shellcraft template %r. Use --list to see available shellcodes." % args.shellcode) - func = get_template(args.shellcode) - if args.show: # remove doctests doc = []