diff --git a/README.md b/README.md index 8c3715c84..882f20663 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,13 @@ Pwndbg is an open-source project, written and maintained by [many contributors]( Want to help with development? Read [CONTRIBUTING](.github/CONTRIBUTING.md) or [join our Discord server](https://discord.gg/x47DssnGwm)! +## How to develop? +To run tests locally you can do this in docker image, after cloning repo run simply +```shell +docker-compose run main ./tests.sh +``` +Disclaimer - this won't work on apple silicon macs. + ## Contact If you have any questions not worthy of a [bug report](https://github.com/pwndbg/pwndbg/issues), feel free to ping anybody on [Discord](https://discord.gg/x47DssnGwm) and ask away. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..0f5de64c6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3.8" +services: + main: + build: . + volumes: + - .:/pwndbg + platform: linux/amd64 + cap_add: + - SYS_PTRACE diff --git a/tests/test_windbg.py b/tests/test_windbg.py index f86abdac5..fabb8d8f6 100644 --- a/tests/test_windbg.py +++ b/tests/test_windbg.py @@ -262,10 +262,9 @@ def test_windbg_eX_commands(start_binary): # Last possible address on stack where we can perform an 8-byte write stack_last_qword_ea = stack_page.end - 8 - assert gdb.execute('eq %#x 0xCAFEBABEdeadbeef 0xABCD' % stack_last_qword_ea, to_string=True) == ( - 'Cannot access memory at address 0x7fffffffeff8\n' - '(Made 1 writes to memory; skipping further writes)\n' - ) + gdb_result = gdb.execute('eq %#x 0xCAFEBABEdeadbeef 0xABCD' % stack_last_qword_ea, to_string=True).split("\n") + assert "Cannot access memory at address" in gdb_result[0] + assert gdb_result[1] == '(Made 1 writes to memory; skipping further writes)' # Check if the write actually occurred assert pwndbg.memory.read(stack_last_qword_ea, 8) == b'\xef\xbe\xad\xde\xbe\xba\xfe\xca'