ChrisTheCoolHut / Zeratool

Automatic Exploit Generation (AEG) and remote flag capture for exploitable CTF problems
GNU General Public License v3.0
1.11k stars 147 forks source link

change type of shell commands to bytes #21

Closed sourcekris closed 2 years ago

sourcekris commented 2 years ago

We should call sendline() with byte arguments to prevent warning nags from pwntools on the console.

ChrisTheCoolHut commented 2 years ago

Looks good and tests are happy. Thanks for contributing!

 pytest . -v                   
========================================================= test session starts ==========================================================
platform linux -- Python 3.6.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/chris/.virtualenvs/zeratool_test/bin/python3
cachedir: .pytest_cache
rootdir: /home/chris/projects/Zeratool
collected 20 items                                                                                                                     

tests/bof_test.py::test_detect_32 PASSED                                                                                         [  5%]
tests/bof_test.py::test_detect_64 PASSED                                                                                         [ 10%]
tests/bof_test.py::test_get_win_func PASSED                                                                                      [ 15%]
tests/bof_test.py::test_pwn_win_func_32 PASSED                                                                                   [ 20%]
tests/bof_test.py::test_pwn_win_func_64 PASSED                                                                                   [ 25%]
tests/bof_test.py::test_pwn_win_sc_32 PASSED                                                                                     [ 30%]
tests/bof_test.py::test_pwn_win_sc_64 PASSED                                                                                     [ 35%]
tests/bof_test.py::test_send_exploit PASSED                                                                                      [ 40%]
tests/bof_test.py::test_leak_rop_32 PASSED                                                                                       [ 45%]
tests/bof_test.py::test_leak_rop_64 PASSED                                                                                       [ 50%]
tests/bof_test.py::test_pwn_rop_32 PASSED                                                                                        [ 55%]
tests/bof_test.py::test_pwn_rop_64 PASSED                                                                                        [ 60%]
tests/bof_test.py::test_pwn_libc_rop_32 SKIPPED (Not yet finished)                                                               [ 65%]
tests/bof_test.py::test_pwn_libc_rop_64 PASSED                                                                                   [ 70%]
tests/format_test.py::test_detect_32 PASSED                                                                                      [ 75%]
tests/format_test.py::test_detect_64 PASSED                                                                                      [ 80%]
tests/format_test.py::test_leak_32 PASSED                                                                                        [ 85%]
tests/format_test.py::test_leak_64 PASSED                                                                                        [ 90%]
tests/format_test.py::test_win_32 PASSED                                                                                         [ 95%]
tests/format_test.py::test_win_64 PASSED                                                                                         [100%]