From cac83b3447df0cb7d2bdd8589a24c4e8f6c561bb Mon Sep 17 00:00:00 2001 From: Jonathan Salwan Date: Mon, 25 Jun 2012 20:45:26 +0200 Subject: [PATCH] bug fix - push v3.3.4 --- AUTHORS | 3 + INSTALL | 8 +- Makefile | 4 +- README.md | 18 ++++ includes/ropgadget.h | 4 +- src/check_allheader_mode.c | 4 +- src/check_arch_supported.c | 4 +- src/check_asm_mode.c | 4 +- src/check_bind_mode.c | 4 +- src/check_elf_format.c | 4 +- src/check_elfheader_mode.c | 4 +- src/check_exec_maps.c | 4 +- src/check_file_mode.c | 4 +- src/check_filter_mode.c | 4 +- src/check_g_mode.c | 4 +- src/check_importsc_mode.c | 4 +- src/check_limit_mode.c | 4 +- src/check_map_mode.c | 4 +- src/check_only_mode.c | 4 +- src/check_opcode_mode.c | 4 +- src/check_option.c | 4 +- src/check_progheader_mode.c | 4 +- src/check_read_maps.c | 4 +- src/check_sectheader_mode.c | 4 +- src/check_string_mode.c | 4 +- src/check_symtab_mode.c | 4 +- src/check_syntax_mode.c | 4 +- src/check_v_mode.c | 6 +- src/combo_ropmaker1.c | 4 +- src/combo_ropmaker2.c | 4 +- src/combo_ropmaker_importsc.c | 4 +- src/gadget_x8632.c | 178 +++++++++++++++++----------------- src/get_addr_section.c | 4 +- src/get_entsize_section.c | 4 +- src/get_flags.c | 4 +- src/get_offset_section.c | 4 +- src/get_seg.c | 4 +- src/get_size_section.c | 4 +- src/how_many_found.c | 4 +- src/main.c | 4 +- src/makecode.c | 4 +- src/makecode_importsc.c | 4 +- src/no_filtered.c | 4 +- src/onlymode.c | 4 +- src/real_string_stringmode.c | 4 +- src/return_maps_exec.c | 4 +- src/return_maps_read.c | 4 +- src/ropmaker.c | 12 +-- src/save_octet.c | 4 +- src/save_section.c | 4 +- src/save_symbols.c | 4 +- src/search_gadgets.c | 4 +- src/search_opcode.c | 4 +- src/syntax.c | 4 +- src/varop.c | 14 +-- src/xfunc.c | 4 +- 56 files changed, 228 insertions(+), 207 deletions(-) diff --git a/AUTHORS b/AUTHORS index ff58ec0..f3b016e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,3 +4,6 @@ Authors: Contributors: * Hellman (Bug Fix) * Axel "0vercl0k" Souchet (Bug Fix) +* k3rensk1 (Bug repport) +* brianairb (Bug Fix) + diff --git a/INSTALL b/INSTALL index 22260bd..73fab33 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ ## -## RopGadget - Release v3.3.3 +## RopGadget - Release v3.3.4 ## Jonathan Salwan - http://twitter.com/JonathanSalwan ## http://shell-storm.org -## 2012-02-19 +## 2012-06-25 ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -20,8 +20,8 @@ ## -$> tar -xf ROPgadget-v3.3.3.tar.gz -$> cd ROPgadget-v3.3.3 +$> tar -xf ROPgadget-v3.3.4.tar.gz +$> cd ROPgadget-v3.3.4 $> make $> su $> make install diff --git a/Makefile b/Makefile index 468870e..d11b50c 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ ## -## RopGadget - Release v3.3.3 +## RopGadget - Release v3.3.4 ## Jonathan Salwan - http://twitter.com/JonathanSalwan ## http://shell-storm.org -## 2012-02-19 +## 2012-06-25 ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by diff --git a/README.md b/README.md index 598c118..42f2754 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,18 @@ Since version 3.0, ROPgadget has a auto-roper for build your payload automatical * [Web Site Project](http://shell-storm.org/project/ROPgadget/) +Authors / Contributors +---------------------- + + Authors: + - Jonathan Salwan + + Contributors: + - Hellman (Bug Fix) + - Axel "0vercl0k" Souchet (Bug Fix) + - k3rensk1 (Bug repport) + - brianairb (Bug Fix) + Installation ------------ @@ -66,6 +78,12 @@ Usage ./ROPgadget -file ./smashme.bin -g -string "main" ./ROPgadget -file ./smashme.bin -g -string "m?in" + +Demo +---- +* [Demo exploitation on youtube](http://www.youtube.com/watch?v=cdZ32O1_3KE) + + Memo ---- diff --git a/includes/ropgadget.h b/includes/ropgadget.h index 13b0924..131cb5d 100644 --- a/includes/ropgadget.h +++ b/includes/ropgadget.h @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_allheader_mode.c b/src/check_allheader_mode.c index cdf1476..5bac22d 100644 --- a/src/check_allheader_mode.c +++ b/src/check_allheader_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_arch_supported.c b/src/check_arch_supported.c index 59952f6..2bdf327 100644 --- a/src/check_arch_supported.c +++ b/src/check_arch_supported.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_asm_mode.c b/src/check_asm_mode.c index bb7eb1a..b2df2a0 100644 --- a/src/check_asm_mode.c +++ b/src/check_asm_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_bind_mode.c b/src/check_bind_mode.c index 96e54e3..3e72261 100644 --- a/src/check_bind_mode.c +++ b/src/check_bind_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_elf_format.c b/src/check_elf_format.c index 2153d3f..344e442 100644 --- a/src/check_elf_format.c +++ b/src/check_elf_format.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_elfheader_mode.c b/src/check_elfheader_mode.c index f663418..7f670f3 100644 --- a/src/check_elfheader_mode.c +++ b/src/check_elfheader_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_exec_maps.c b/src/check_exec_maps.c index 936f79b..cce6bbb 100644 --- a/src/check_exec_maps.c +++ b/src/check_exec_maps.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_file_mode.c b/src/check_file_mode.c index eb02253..091c0d8 100644 --- a/src/check_file_mode.c +++ b/src/check_file_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_filter_mode.c b/src/check_filter_mode.c index 50d3eaa..42c53f9 100644 --- a/src/check_filter_mode.c +++ b/src/check_filter_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_g_mode.c b/src/check_g_mode.c index 9211e9e..27ea97d 100644 --- a/src/check_g_mode.c +++ b/src/check_g_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_importsc_mode.c b/src/check_importsc_mode.c index 4fc24b5..5411201 100644 --- a/src/check_importsc_mode.c +++ b/src/check_importsc_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_limit_mode.c b/src/check_limit_mode.c index 56d70a6..be71998 100644 --- a/src/check_limit_mode.c +++ b/src/check_limit_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_map_mode.c b/src/check_map_mode.c index 47091be..51e9ff6 100644 --- a/src/check_map_mode.c +++ b/src/check_map_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_only_mode.c b/src/check_only_mode.c index ec8d166..7b3072a 100644 --- a/src/check_only_mode.c +++ b/src/check_only_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_opcode_mode.c b/src/check_opcode_mode.c index e629bf4..e002532 100644 --- a/src/check_opcode_mode.c +++ b/src/check_opcode_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_option.c b/src/check_option.c index 5649e07..5157717 100644 --- a/src/check_option.c +++ b/src/check_option.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_progheader_mode.c b/src/check_progheader_mode.c index ffc8612..c99918f 100644 --- a/src/check_progheader_mode.c +++ b/src/check_progheader_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_read_maps.c b/src/check_read_maps.c index 400fd0f..3f23182 100644 --- a/src/check_read_maps.c +++ b/src/check_read_maps.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_sectheader_mode.c b/src/check_sectheader_mode.c index c85347d..b097c2c 100644 --- a/src/check_sectheader_mode.c +++ b/src/check_sectheader_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_string_mode.c b/src/check_string_mode.c index 0fbb932..a8a76df 100644 --- a/src/check_string_mode.c +++ b/src/check_string_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_symtab_mode.c b/src/check_symtab_mode.c index a77dae1..32793db 100644 --- a/src/check_symtab_mode.c +++ b/src/check_symtab_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_syntax_mode.c b/src/check_syntax_mode.c index e85fda2..4da8028 100644 --- a/src/check_syntax_mode.c +++ b/src/check_syntax_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/check_v_mode.c b/src/check_v_mode.c index 1606375..6a5c14e 100644 --- a/src/check_v_mode.c +++ b/src/check_v_mode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ void check_v_mode(char **argv) { if (!strcmp(argv[i], "-v")) { - fprintf(stdout, "%sRopGadget%s - Release v3.3.3\n", RED, ENDC); + fprintf(stdout, "%sRopGadget%s - Release v3.3.4\n", RED, ENDC); fprintf(stdout, "Jonathan Salwan - twitter @JonathanSalwan\n"); fprintf(stdout, "http://www.shell-storm.org\n"); exit(EXIT_SUCCESS); diff --git a/src/combo_ropmaker1.c b/src/combo_ropmaker1.c index a878e1e..71d2f42 100644 --- a/src/combo_ropmaker1.c +++ b/src/combo_ropmaker1.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/combo_ropmaker2.c b/src/combo_ropmaker2.c index 02056fa..aa1576f 100644 --- a/src/combo_ropmaker2.c +++ b/src/combo_ropmaker2.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/combo_ropmaker_importsc.c b/src/combo_ropmaker_importsc.c index 554bd7a..0dc0920 100644 --- a/src/combo_ropmaker_importsc.c +++ b/src/combo_ropmaker_importsc.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/gadget_x8632.c b/src/gadget_x8632.c index f9c3175..443dc7c 100644 --- a/src/gadget_x8632.c +++ b/src/gadget_x8632.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -125,48 +125,48 @@ t_asm tab_x8632[] = {0, 0, "mul %edx | ret", "\xf7\xe2\xc3", 3}, {0, 0, "mul %esi | ret", "\xf7\xe6\xc3", 3}, {0, 0, "mul %edi | ret", "\xf7\xe7\xc3", 3}, - {0, 0, "mul %eax | pop %ebp | ret", "\xf7\xe0\x5d\xc3", 3}, - {0, 0, "mul %ebx | pop %ebp | ret", "\xf7\xe3\x5d\xc3", 3}, - {0, 0, "mul %ecx | pop %ebp | ret", "\xf7\xe1\x5d\xc3", 3}, - {0, 0, "mul %edx | pop %ebp | ret", "\xf7\xe2\x5d\xc3", 3}, - {0, 0, "mul %esi | pop %ebp | ret", "\xf7\xe6\x5d\xc3", 3}, - {0, 0, "mul %edi | pop %ebp | ret", "\xf7\xe7\x5d\xc3", 3}, + {0, 0, "mul %eax | pop %ebp | ret", "\xf7\xe0\x5d\xc3", 4}, + {0, 0, "mul %ebx | pop %ebp | ret", "\xf7\xe3\x5d\xc3", 4}, + {0, 0, "mul %ecx | pop %ebp | ret", "\xf7\xe1\x5d\xc3", 4}, + {0, 0, "mul %edx | pop %ebp | ret", "\xf7\xe2\x5d\xc3", 4}, + {0, 0, "mul %esi | pop %ebp | ret", "\xf7\xe6\x5d\xc3", 4}, + {0, 0, "mul %edi | pop %ebp | ret", "\xf7\xe7\x5d\xc3", 4}, {0, 0, "div %eax | ret", "\xf7\xf0\xc3", 3}, {0, 0, "div %ebx | ret", "\xf7\xf3\xc3", 3}, {0, 0, "div %ecx | ret", "\xf7\xf1\xc3", 3}, {0, 0, "div %edx | ret", "\xf7\xf2\xc3", 3}, {0, 0, "div %esi | ret", "\xf7\xf6\xc3", 3}, {0, 0, "div %edi | ret", "\xf7\xf7\xc3", 3}, - {0, 0, "div %eax | pop %ebp | ret", "\xf7\xf0\x5d\xc3", 3}, - {0, 0, "div %ebx | pop %ebp | ret", "\xf7\xf3\x5d\xc3", 3}, - {0, 0, "div %ecx | pop %ebp | ret", "\xf7\xf1\x5d\xc3", 3}, - {0, 0, "div %edx | pop %ebp | ret", "\xf7\xf2\x5d\xc3", 3}, - {0, 0, "div %esi | pop %ebp | ret", "\xf7\xf6\x5d\xc3", 3}, - {0, 0, "div %edi | pop %ebp | ret", "\xf7\xf7\x5d\xc3", 3}, + {0, 0, "div %eax | pop %ebp | ret", "\xf7\xf0\x5d\xc3", 4}, + {0, 0, "div %ebx | pop %ebp | ret", "\xf7\xf3\x5d\xc3", 4}, + {0, 0, "div %ecx | pop %ebp | ret", "\xf7\xf1\x5d\xc3", 4}, + {0, 0, "div %edx | pop %ebp | ret", "\xf7\xf2\x5d\xc3", 4}, + {0, 0, "div %esi | pop %ebp | ret", "\xf7\xf6\x5d\xc3", 4}, + {0, 0, "div %edi | pop %ebp | ret", "\xf7\xf7\x5d\xc3", 4}, {0, 0, "neg %eax | ret", "\xf7\xd8\xc3", 3}, {0, 0, "neg %ebx | ret", "\xf7\xdb\xc3", 3}, {0, 0, "neg %ecx | ret", "\xf7\xd9\xc3", 3}, {0, 0, "neg %edx | ret", "\xf7\xda\xc3", 3}, {0, 0, "neg %esi | ret", "\xf7\xde\xc3", 3}, {0, 0, "neg %edi | ret", "\xf7\xdf\xc3", 3}, - {0, 0, "neg %eax | pop %ebp | ret", "\xf7\xd8\x5d\xc3", 3}, - {0, 0, "neg %ebx | pop %ebp | ret", "\xf7\xdb\x5d\xc3", 3}, - {0, 0, "neg %ecx | pop %ebp | ret", "\xf7\xd9\x5d\xc3", 3}, - {0, 0, "neg %edx | pop %ebp | ret", "\xf7\xda\x5d\xc3", 3}, - {0, 0, "neg %esi | pop %ebp | ret", "\xf7\xde\x5d\xc3", 3}, - {0, 0, "neg %edi | pop %ebp | ret", "\xf7\xdf\x5d\xc3", 3}, + {0, 0, "neg %eax | pop %ebp | ret", "\xf7\xd8\x5d\xc3", 4}, + {0, 0, "neg %ebx | pop %ebp | ret", "\xf7\xdb\x5d\xc3", 4}, + {0, 0, "neg %ecx | pop %ebp | ret", "\xf7\xd9\x5d\xc3", 4}, + {0, 0, "neg %edx | pop %ebp | ret", "\xf7\xda\x5d\xc3", 4}, + {0, 0, "neg %esi | pop %ebp | ret", "\xf7\xde\x5d\xc3", 4}, + {0, 0, "neg %edi | pop %ebp | ret", "\xf7\xdf\x5d\xc3", 4}, {0, 0, "not %eax | ret", "\xf7\xd0\xc3", 3}, {0, 0, "not %ebx | ret", "\xf7\xd3\xc3", 3}, {0, 0, "not %ecx | ret", "\xf7\xd1\xc3", 3}, {0, 0, "not %edx | ret", "\xf7\xd2\xc3", 3}, {0, 0, "not %esi | ret", "\xf7\xd6\xc3", 3}, {0, 0, "not %edi | ret", "\xf7\xd7\xc3", 3}, - {0, 0, "not %eax | pop %ebp | ret", "\xf7\xd0\x5d\xc3", 3}, - {0, 0, "not %ebx | pop %ebp | ret", "\xf7\xd3\x5d\xc3", 3}, - {0, 0, "not %ecx | pop %ebp | ret", "\xf7\xd1\x5d\xc3", 3}, - {0, 0, "not %edx | pop %ebp | ret", "\xf7\xd2\x5d\xc3", 3}, - {0, 0, "not %esi | pop %ebp | ret", "\xf7\xd6\x5d\xc3", 3}, - {0, 0, "not %edi | pop %ebp | ret", "\xf7\xd7\x5d\xc3", 3}, + {0, 0, "not %eax | pop %ebp | ret", "\xf7\xd0\x5d\xc3", 4}, + {0, 0, "not %ebx | pop %ebp | ret", "\xf7\xd3\x5d\xc3", 4}, + {0, 0, "not %ecx | pop %ebp | ret", "\xf7\xd1\x5d\xc3", 4}, + {0, 0, "not %edx | pop %ebp | ret", "\xf7\xd2\x5d\xc3", 4}, + {0, 0, "not %esi | pop %ebp | ret", "\xf7\xd6\x5d\xc3", 4}, + {0, 0, "not %edi | pop %ebp | ret", "\xf7\xd7\x5d\xc3", 4}, {0, 0, "shr %eax | ret", "\xd1\xe8\xc3", 3}, {0, 0, "shr %ebx | ret", "\xd1\xeb\xc3", 3}, {0, 0, "shr %ecx | ret", "\xd1\xe9\xc3", 3}, @@ -198,13 +198,13 @@ t_asm tab_x8632[] = {0, 0, "xchg %eax,%esi | ret", "\x96\xc3", 2}, {0, 0, "xchg %eax,%edi | ret", "\x97\xc3", 2}, {0, 0, "xchg %eax,%ebp | ret", "\x95\xc3", 2}, - {0, 0, "xchg %eax,%esp | pop %ebp | ret", "\x94\x5d\xc3", 2}, - {0, 0, "xchg %eax,%ebx | pop %ebp | ret", "\x93\x5d\xc3", 2}, - {0, 0, "xchg %eax,%ecx | pop %ebp | ret", "\x91\x5d\xc3", 2}, - {0, 0, "xchg %eax,%edx | pop %ebp | ret", "\x92\x5d\xc3", 2}, - {0, 0, "xchg %eax,%esi | pop %ebp | ret", "\x96\x5d\xc3", 2}, - {0, 0, "xchg %eax,%edi | pop %ebp | ret", "\x97\x5d\xc3", 2}, - {0, 0, "xchg %eax,%ebp | pop %ebp | ret", "\x95\x5d\xc3", 2}, + {0, 0, "xchg %eax,%esp | pop %ebp | ret", "\x94\x5d\xc3", 3}, + {0, 0, "xchg %eax,%ebx | pop %ebp | ret", "\x93\x5d\xc3", 3}, + {0, 0, "xchg %eax,%ecx | pop %ebp | ret", "\x91\x5d\xc3", 3}, + {0, 0, "xchg %eax,%edx | pop %ebp | ret", "\x92\x5d\xc3", 3}, + {0, 0, "xchg %eax,%esi | pop %ebp | ret", "\x96\x5d\xc3", 3}, + {0, 0, "xchg %eax,%edi | pop %ebp | ret", "\x97\x5d\xc3", 3}, + {0, 0, "xchg %eax,%ebp | pop %ebp | ret", "\x95\x5d\xc3", 3}, {0, 0, "bswap %eax | ret", "\x0f\xc8\xc3", 3}, {0, 0, "bswap %ebx | ret", "\x0f\xcb\xc3", 3}, {0, 0, "bswap %ecx | ret", "\x0f\xc9\xc3", 3}, @@ -428,7 +428,7 @@ t_asm tab_x8632[] = ** --------------- ** ** '?' is for 1 any byte direct value - ** '_' if for 4 any bytes direct value + ** '#' if for 4 any bytes direct value */ {0, 0, "add $0x?,%al | ret", "\x04?\xc3", 3}, {0, 0, "add $0x?,%bl | ret", "\x80\xc3?\xc3", 4}, @@ -484,58 +484,58 @@ t_asm tab_x8632[] = {0, 0, "xor $0x?,%edi | pop %ebp | ret", "\x83\xf7?\x5d\xc3", 4}, /* 4 any bytes */ - {0, 0, "mov $0x_,%eax | ret", "\xb8____\xc3", 6}, - {0, 0, "mov $0x_,%ebx | ret", "\xbb____\xc3", 6}, - {0, 0, "mov $0x_,%ecx | ret", "\xb9____\xc3", 6}, - {0, 0, "mov $0x_,%edx | ret", "\xba____\xc3", 6}, - {0, 0, "mov $0x_,%esi | ret", "\xbe____\xc3", 6}, - {0, 0, "mov $0x_,%edi | ret", "\xbf____\xc3", 6}, - {0, 0, "mov $0x_,%ebp | ret", "\xbd____\xc3", 6}, - {0, 0, "mov $0x_,%esp | ret", "\xbc____\xc3", 6}, - {0, 0, "mov $0x_,%eax | pop %ebp | ret", "\xb8____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%ebx | pop %ebp | ret", "\xbb____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%ecx | pop %ebp | ret", "\xb9____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%edx | pop %ebp | ret", "\xba____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%esi | pop %ebp | ret", "\xbe____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%edi | pop %ebp | ret", "\xbf____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%ebp | pop %ebp | ret", "\xbd____\x5d\xc3", 7}, - {0, 0, "mov $0x_,%esp | pop %ebp | ret", "\xbc____\x5d\xc3", 7}, - {0, 0, "xor $0x_,%eax | ret", "\x35____\xc3", 6}, - {0, 0, "xor $0x_,%ebx | ret", "\x81\xf3____\xc3", 7}, - {0, 0, "xor $0x_,%ecx | ret", "\x81\xf1____\xc3", 7}, - {0, 0, "xor $0x_,%edx | ret", "\x81\xf2____\xc3", 7}, - {0, 0, "xor $0x_,%esi | ret", "\x81\xf6____\xc3", 7}, - {0, 0, "xor $0x_,%edi | ret", "\x81\xf7____\xc3", 7}, - {0, 0, "xor $0x_,%eax | pop %ebp | ret", "\x35____\x5d\xc3", 7}, - {0, 0, "xor $0x_,%ebx | pop %ebp | ret", "\x81\xf3____\x5d\xc3", 8}, - {0, 0, "xor $0x_,%ecx | pop %ebp | ret", "\x81\xf1____\x5d\xc3", 8}, - {0, 0, "xor $0x_,%edx | pop %ebp | ret", "\x81\xf2____\x5d\xc3", 8}, - {0, 0, "xor $0x_,%esi | pop %ebp | ret", "\x81\xf6____\x5d\xc3", 8}, - {0, 0, "xor $0x_,%edi | pop %ebp | ret", "\x81\xf7____\x5d\xc3", 8}, - {0, 0, "add $0x_,%eax | ret", "\x05____\xc3", 6}, - {0, 0, "add $0x_,%ebx | ret", "\x81\xc3____\xc3", 7}, - {0, 0, "add $0x_,%ecx | ret", "\x81\xc1____\xc3", 7}, - {0, 0, "add $0x_,%edx | ret", "\x81\xc2____\xc3", 7}, - {0, 0, "add $0x_,%esi | ret", "\x81\xc6____\xc3", 7}, - {0, 0, "add $0x_,%edi | ret", "\x81\xc7____\xc3", 7}, - {0, 0, "add $0x_,%eax | pop %ebp | ret", "\x05____\x5d\xc3", 7}, - {0, 0, "add $0x_,%ebx | pop %ebp | ret", "\x81\xc3____\x5d\xc3", 8}, - {0, 0, "add $0x_,%ecx | pop %ebp | ret", "\x81\xc1____\x5d\xc3", 8}, - {0, 0, "add $0x_,%edx | pop %ebp | ret", "\x81\xc2____\x5d\xc3", 8}, - {0, 0, "add $0x_,%esi | pop %ebp | ret", "\x81\xc6____\x5d\xc3", 8}, - {0, 0, "add $0x_,%edi | pop %ebp | ret", "\x81\xc7____\x5d\xc3", 8}, - {0, 0, "sub $0x_,%eax | ret", "\x2d____\xc3", 6}, - {0, 0, "sub $0x_,%ebx | ret", "\x81\xeb____\xc3", 7}, - {0, 0, "sub $0x_,%ecx | ret", "\x81\xe9____\xc3", 7}, - {0, 0, "sub $0x_,%edx | ret", "\x81\xea____\xc3", 7}, - {0, 0, "sub $0x_,%esi | ret", "\x81\xee____\xc3", 7}, - {0, 0, "sub $0x_,%edi | ret", "\x81\xef____\xc3", 7}, - {0, 0, "sub $0x_,%eax | pop %ebp | ret", "\x2d____\x5d\xc3", 7}, - {0, 0, "sub $0x_,%ebx | pop %ebp | ret", "\x81\xeb____\x5d\xc3", 8}, - {0, 0, "sub $0x_,%ecx | pop %ebp | ret", "\x81\xe9____\x5d\xc3", 8}, - {0, 0, "sub $0x_,%edx | pop %ebp | ret", "\x81\xea____\x5d\xc3", 8}, - {0, 0, "sub $0x_,%esi | pop %ebp | ret", "\x81\xee____\x5d\xc3", 8}, - {0, 0, "sub $0x_,%edi | pop %ebp | ret", "\x81\xef____\x5d\xc3", 8}, + {0, 0, "mov $0x#,%eax | ret", "\xb8####\xc3", 6}, + {0, 0, "mov $0x#,%ebx | ret", "\xbb####\xc3", 6}, + {0, 0, "mov $0x#,%ecx | ret", "\xb9####\xc3", 6}, + {0, 0, "mov $0x#,%edx | ret", "\xba####\xc3", 6}, + {0, 0, "mov $0x#,%esi | ret", "\xbe####\xc3", 6}, + {0, 0, "mov $0x#,%edi | ret", "\xbf####\xc3", 6}, + {0, 0, "mov $0x#,%ebp | ret", "\xbd####\xc3", 6}, + {0, 0, "mov $0x#,%esp | ret", "\xbc####\xc3", 6}, + {0, 0, "mov $0x#,%eax | pop %ebp | ret", "\xb8####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%ebx | pop %ebp | ret", "\xbb####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%ecx | pop %ebp | ret", "\xb9####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%edx | pop %ebp | ret", "\xba####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%esi | pop %ebp | ret", "\xbe####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%edi | pop %ebp | ret", "\xbf####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%ebp | pop %ebp | ret", "\xbd####\x5d\xc3", 7}, + {0, 0, "mov $0x#,%esp | pop %ebp | ret", "\xbc####\x5d\xc3", 7}, + {0, 0, "xor $0x#,%eax | ret", "\x35####\xc3", 6}, + {0, 0, "xor $0x#,%ebx | ret", "\x81\xf3####\xc3", 7}, + {0, 0, "xor $0x#,%ecx | ret", "\x81\xf1####\xc3", 7}, + {0, 0, "xor $0x#,%edx | ret", "\x81\xf2####\xc3", 7}, + {0, 0, "xor $0x#,%esi | ret", "\x81\xf6####\xc3", 7}, + {0, 0, "xor $0x#,%edi | ret", "\x81\xf7####\xc3", 7}, + {0, 0, "xor $0x#,%eax | pop %ebp | ret", "\x35####\x5d\xc3", 7}, + {0, 0, "xor $0x#,%ebx | pop %ebp | ret", "\x81\xf3####\x5d\xc3", 8}, + {0, 0, "xor $0x#,%ecx | pop %ebp | ret", "\x81\xf1####\x5d\xc3", 8}, + {0, 0, "xor $0x#,%edx | pop %ebp | ret", "\x81\xf2####\x5d\xc3", 8}, + {0, 0, "xor $0x#,%esi | pop %ebp | ret", "\x81\xf6####\x5d\xc3", 8}, + {0, 0, "xor $0x#,%edi | pop %ebp | ret", "\x81\xf7####\x5d\xc3", 8}, + {0, 0, "add $0x#,%eax | ret", "\x05####\xc3", 6}, + {0, 0, "add $0x#,%ebx | ret", "\x81\xc3####\xc3", 7}, + {0, 0, "add $0x#,%ecx | ret", "\x81\xc1####\xc3", 7}, + {0, 0, "add $0x#,%edx | ret", "\x81\xc2####\xc3", 7}, + {0, 0, "add $0x#,%esi | ret", "\x81\xc6####\xc3", 7}, + {0, 0, "add $0x#,%edi | ret", "\x81\xc7####\xc3", 7}, + {0, 0, "add $0x#,%eax | pop %ebp | ret", "\x05####\x5d\xc3", 7}, + {0, 0, "add $0x#,%ebx | pop %ebp | ret", "\x81\xc3####\x5d\xc3", 8}, + {0, 0, "add $0x#,%ecx | pop %ebp | ret", "\x81\xc1####\x5d\xc3", 8}, + {0, 0, "add $0x#,%edx | pop %ebp | ret", "\x81\xc2####\x5d\xc3", 8}, + {0, 0, "add $0x#,%esi | pop %ebp | ret", "\x81\xc6####\x5d\xc3", 8}, + {0, 0, "add $0x#,%edi | pop %ebp | ret", "\x81\xc7####\x5d\xc3", 8}, + {0, 0, "sub $0x#,%eax | ret", "\x2d####\xc3", 6}, + {0, 0, "sub $0x#,%ebx | ret", "\x81\xeb####\xc3", 7}, + {0, 0, "sub $0x#,%ecx | ret", "\x81\xe9####\xc3", 7}, + {0, 0, "sub $0x#,%edx | ret", "\x81\xea####\xc3", 7}, + {0, 0, "sub $0x#,%esi | ret", "\x81\xee####\xc3", 7}, + {0, 0, "sub $0x#,%edi | ret", "\x81\xef####\xc3", 7}, + {0, 0, "sub $0x#,%eax | pop %ebp | ret", "\x2d####\x5d\xc3", 7}, + {0, 0, "sub $0x#,%ebx | pop %ebp | ret", "\x81\xeb####\x5d\xc3", 8}, + {0, 0, "sub $0x#,%ecx | pop %ebp | ret", "\x81\xe9####\x5d\xc3", 8}, + {0, 0, "sub $0x#,%edx | pop %ebp | ret", "\x81\xea####\x5d\xc3", 8}, + {0, 0, "sub $0x#,%esi | pop %ebp | ret", "\x81\xee####\x5d\xc3", 8}, + {0, 0, "sub $0x#,%edi | pop %ebp | ret", "\x81\xef####\x5d\xc3", 8}, /* EOF variable opcode */ {0, 0, NULL, NULL, 0} @@ -543,7 +543,7 @@ t_asm tab_x8632[] = void gadget_x8632(unsigned char *data, unsigned int cpt, Elf32_Addr offset, int i, t_maps_exec *maps_exec) { - char *varopins; + char *varopins = NULL; if (importsc_mode.flag == 1 && !check_exec_maps(maps_exec, (Elf32_Addr)(cpt + offset))) save_octet(data, (Elf32_Addr)(cpt + offset)); @@ -551,7 +551,7 @@ void gadget_x8632(unsigned char *data, unsigned int cpt, Elf32_Addr offset, int if(!match2((const char *)data, tab_x8632[i].value, tab_x8632[i].size) && !check_exec_maps(maps_exec, (Elf32_Addr)(cpt + offset))) { - /* no '?' & no '_' */ + /* no '?' & no '#' */ if (!check_interrogation(tab_x8632[i].instruction)) fprintf(stdout, "%s0x%.8x%s: %s%s%s\n", RED, (cpt + offset), ENDC, GREEN, tab_x8632[i].instruction, ENDC); /* if '?' */ @@ -569,7 +569,7 @@ void gadget_x8632(unsigned char *data, unsigned int cpt, Elf32_Addr offset, int NbGadFound--; } } - /* if '_' */ + /* if '#' */ else if (interrogation_or_diese(tab_x8632[i].instruction) == 2) { varopins = ret_instruction_diese((pMapElf + cpt), tab_x8632[i].instruction, tab_x8632[i].value, tab_x8632[i].size); diff --git a/src/get_addr_section.c b/src/get_addr_section.c index f2d7768..4acb2be 100644 --- a/src/get_addr_section.c +++ b/src/get_addr_section.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/get_entsize_section.c b/src/get_entsize_section.c index 14fbd0f..2ba85f6 100644 --- a/src/get_entsize_section.c +++ b/src/get_entsize_section.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/get_flags.c b/src/get_flags.c index f5cb31e..8626170 100644 --- a/src/get_flags.c +++ b/src/get_flags.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/get_offset_section.c b/src/get_offset_section.c index 704e759..4a0d7c6 100644 --- a/src/get_offset_section.c +++ b/src/get_offset_section.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/get_seg.c b/src/get_seg.c index 2b22aae..c427cac 100644 --- a/src/get_seg.c +++ b/src/get_seg.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/get_size_section.c b/src/get_size_section.c index 60b19a4..aec173c 100644 --- a/src/get_size_section.c +++ b/src/get_size_section.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/how_many_found.c b/src/how_many_found.c index 21725bd..36d1302 100644 --- a/src/how_many_found.c +++ b/src/how_many_found.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/main.c b/src/main.c index 33ccc7a..59f49aa 100644 --- a/src/main.c +++ b/src/main.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/makecode.c b/src/makecode.c index 8387d51..45c10b7 100644 --- a/src/makecode.c +++ b/src/makecode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/makecode_importsc.c b/src/makecode_importsc.c index fabaad2..198f1b5 100644 --- a/src/makecode_importsc.c +++ b/src/makecode_importsc.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/no_filtered.c b/src/no_filtered.c index 6526fdc..b7fdc43 100644 --- a/src/no_filtered.c +++ b/src/no_filtered.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/onlymode.c b/src/onlymode.c index 47a26c8..a2c4659 100644 --- a/src/onlymode.c +++ b/src/onlymode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/real_string_stringmode.c b/src/real_string_stringmode.c index 82a4745..c73f315 100644 --- a/src/real_string_stringmode.c +++ b/src/real_string_stringmode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/return_maps_exec.c b/src/return_maps_exec.c index 3073bc6..b7ad380 100644 --- a/src/return_maps_exec.c +++ b/src/return_maps_exec.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/return_maps_read.c b/src/return_maps_read.c index 07bd1d0..c1a26aa 100644 --- a/src/return_maps_read.c +++ b/src/return_maps_read.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/ropmaker.c b/src/ropmaker.c index edfd851..ad584eb 100644 --- a/src/ropmaker.c +++ b/src/ropmaker.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -34,13 +34,13 @@ int match(const char *s1, const char *s2, size_t n) start: while (s1[i] != '\0' && s2[i] != '\0' && n != 0) { - if (s2[i] == '?' || s2[i] == '_') + if (s2[i] == '?' || s2[i] == '#') { i++; n--; goto start; } - if (s1[i] != s2[i]) + if ((unsigned char)s1[i] != (unsigned char)s2[i]) return (1); i++; n--; @@ -55,13 +55,13 @@ int match2(const char *s1, const char *s2, size_t n) start: while (n != 0) { - if (s2[i] == '?' || s2[i] == '_') + if (s2[i] == '?' || s2[i] == '#') { i++; n--; goto start; } - if (s1[i] != s2[i]) + if ((unsigned char)s1[i] != (unsigned char)s2[i]) return (1); i++; n--; diff --git a/src/save_octet.c b/src/save_octet.c index 44a1831..c0cbeca 100644 --- a/src/save_octet.c +++ b/src/save_octet.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/save_section.c b/src/save_section.c index f3e0208..5964cd7 100644 --- a/src/save_section.c +++ b/src/save_section.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/save_symbols.c b/src/save_symbols.c index 221482e..9091c76 100644 --- a/src/save_symbols.c +++ b/src/save_symbols.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/search_gadgets.c b/src/search_gadgets.c index d7ef89f..e0ed075 100644 --- a/src/search_gadgets.c +++ b/src/search_gadgets.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/search_opcode.c b/src/search_opcode.c index fd456ba..507d0c6 100644 --- a/src/search_opcode.c +++ b/src/search_opcode.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/syntax.c b/src/syntax.c index e47fce4..f5f0c8d 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by diff --git a/src/varop.c b/src/varop.c index 3f345dc..78cc9d7 100644 --- a/src/varop.c +++ b/src/varop.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -52,7 +52,7 @@ int check_interrogation(char *str) { while (*str != '\0') { - if (*str == '?' || *str == '_') + if (*str == '?' || *str == '#') return (1); str++; } @@ -65,7 +65,7 @@ int calc_pos_charany(char *value, int size) while (i < size) { - if (*value == '?' || *value == '_') + if (*value == '?' || *value == '#') return (i); i++; value++; @@ -115,14 +115,14 @@ char *ret_instruction_diese(char *offset, char *instruction, char *value, int si ret = calc_pos_charany(value, size); if (ret == -1) - return ("Error instruction with '_'\n"); + return ("Error instruction with '#'\n"); gad = xmalloc((strlen(instruction) + 64) * sizeof(char)); memset(gad, 0x00, (strlen(instruction) + 64) * sizeof(char)); offset_diese = (unsigned char *)(offset + ret); while (*instruction != '\0') { - if (*instruction == '_') + if (*instruction == '#') { operande[0] = *(offset_diese + 0); operande[1] = *(offset_diese + 1); @@ -160,7 +160,7 @@ int interrogation_or_diese(char *instruction) { if (*instruction == '?') return (1); - else if (*instruction == '_') + else if (*instruction == '#') return (2); instruction++; } diff --git a/src/xfunc.c b/src/xfunc.c index 5de9093..81b92ca 100644 --- a/src/xfunc.c +++ b/src/xfunc.c @@ -1,8 +1,8 @@ /* -** RopGadget - Release v3.3.3 +** RopGadget - Release v3.3.4 ** Jonathan Salwan - http://twitter.com/JonathanSalwan ** http://shell-storm.org -** 2012-02-19 +** 2012-06-25 ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by