diff options
| author | serpilliere <fabrice.desclaux@cea.fr> | 2015-04-06 00:46:32 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-04-22 11:31:28 +0200 |
| commit | 49343533ce23277187d526f1b86f84307b77200a (patch) | |
| tree | ce6f445650d90a79a76db132c1383e1df7c50cca | |
| parent | 65feb2335c3fd525efde115932b512e7bbc720d1 (diff) | |
| download | miasm-49343533ce23277187d526f1b86f84307b77200a.tar.gz miasm-49343533ce23277187d526f1b86f84307b77200a.zip | |
Test: add regression test for automod code
| -rw-r--r-- | example/samples/x86_32_automod.S | 40 | ||||
| -rw-r--r-- | test/test_all.py | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/example/samples/x86_32_automod.S b/example/samples/x86_32_automod.S new file mode 100644 index 00000000..ea61a772 --- /dev/null +++ b/example/samples/x86_32_automod.S @@ -0,0 +1,40 @@ +main: + XOR EDX, EDX + JZ lbl_start + +lbl_start: + INC EDX + INC EDX + INC EDX + JZ dum + + INC EDX + INC EDX + INC EDX + JZ dum + + INC EDX + INC EDX + INC EDX + JZ dum + +lbl_stop: + + MOV ESI, exit_code + MOV EDI, lbl_start + MOV AL, 0x90 + MOV ECX, 24 + REPE MOVSB + JMP lbl_start + +exit_code: + MOV EAX, 0x11223344 + MOV EAX, 0x11223344 + MOV EAX, 0x11223344 + CMP EDX, 0x12 + JZ dum + RET + +dum: + INT 0x3 + RET diff --git a/test/test_all.py b/test/test_all.py index fd8d5ad7..52f2238b 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -195,7 +195,7 @@ class ExampleShellcode(ExampleAssembler): testset += ExampleShellcode(['x86_32', 'x86_32_manip_ptr.S', "demo_x86_32.bin"]) test_box = {} -test_box_names = ["mod", "mod_self", "repmod", "simple", "enc", "pop_esp"] +test_box_names = ["mod", "mod_self", "repmod", "simple", "enc", "pop_esp", "automod"] for source in test_box_names: sample_base = "x86_32_" + source args = ["x86_32", sample_base + ".S", sample_base + ".bin", "--PE"] |