From b241cd8508bcbc0b3c97f54ff077a5914f77161c Mon Sep 17 00:00:00 2001 From: 152334H <54623771+152334H@users.noreply.github.com> Date: Sun, 10 Jan 2021 17:55:07 +0800 Subject: [PATCH 1/3] Remove eval from cli --- pwnlib/commandline/shellcraft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnlib/commandline/shellcraft.py b/pwnlib/commandline/shellcraft.py index 26d0376f2..248946c11 100644 --- a/pwnlib/commandline/shellcraft.py +++ b/pwnlib/commandline/shellcraft.py @@ -295,7 +295,7 @@ def main(args): vma = args.address if vma: - vma = eval(vma) + vma = util.safeeval.expr(vma) if args.format in ['e','elf']: args.format = 'default' From 51d94ebe5ef429f1016069a60aaefd4f92677516 Mon Sep 17 00:00:00 2001 From: 152334H <54623771+152334H@users.noreply.github.com> Date: Sun, 10 Jan 2021 18:18:04 +0800 Subject: [PATCH 2/3] fix changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 652a4835f..eb94958f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,12 +65,15 @@ The table below shows which release corresponds to each branch, and what date th - process also looks now at `env['PATH']` to find the path for the executable - [#1742][1742] New `baremetal` os to debug binaries executed with qemu-system-$(arch) - [#1757][1757] update cache directories +- [#1758][1758] Remove eval from cli [1261]: https://github.com/Gallopsled/pwntools/pull/1261 [1695]: https://github.com/Gallopsled/pwntools/pull/1695 [1735]: https://github.com/Gallopsled/pwntools/pull/1735 [1738]: https://github.com/Gallopsled/pwntools/pull/1738 [1742]: https://github.com/Gallopsled/pwntools/pull/1742 +[1757]: https://github.com/Gallopsled/pwntools/pull/1757 +[1758]: https://github.com/Gallopsled/pwntools/pull/1758 ## 4.4.0 (`beta`) From a061fbc40d20163e58d058b867e4679eb944707c Mon Sep 17 00:00:00 2001 From: 152334H <54623771+152334H@users.noreply.github.com> Date: Sun, 10 Jan 2021 22:35:48 +0800 Subject: [PATCH 3/3] shut up pylint --- pwnlib/commandline/shellcraft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnlib/commandline/shellcraft.py b/pwnlib/commandline/shellcraft.py index 248946c11..243afba42 100644 --- a/pwnlib/commandline/shellcraft.py +++ b/pwnlib/commandline/shellcraft.py @@ -295,7 +295,7 @@ def main(args): vma = args.address if vma: - vma = util.safeeval.expr(vma) + vma = pwnlib.util.safeeval.expr(vma) if args.format in ['e','elf']: args.format = 'default'