Skip to content

Commit 5c93d89

Browse files
committed
corrected folder tree
1 parent 4229ea3 commit 5c93d89

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ This command create a new .asm file inside folder, open and develop!
9090
It generates:
9191

9292
| ~/ASM/
93-
|- HelloWorld/
94-
|- HelloWorld.asm
93+
|- src/
94+
|- projects/
95+
|- HelloWorld/
96+
|- HelloWorld.asm
9597

9698
**Warning**: Do not change the .asm file name!. If you need change it, **you need to change folder name**
9799

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include<stdio.h>
2+
#include<string.h>
3+
4+
char code[] ="\x31\xc0\x31\xdb\x31\xd2\x31\xc9\xb0\x04\xb3\x01\xb9\xa0\x90\x04\x08\xba\x1c\x00\x00\x00\xcd\x80\x31\xc0\xb0\x01\x31\xdb\xcd\x80";
5+
6+
int main(int argc, char *argv[])
7+
{
8+
printf("Shellcode Length: %d\n", (int)strlen(code));
9+
10+
int (*func)(); // is a pointer to a function that returns an int
11+
func = (int (*)()) code; // calls the function pointed to
12+
(int)(*func)(); // is a nasty type cast telling the compiler that code is pointing to such a function
13+
14+
/// Or even (same code)
15+
//int (*ret)() = (int(*)())code;
16+
//ret();
17+
}

0 commit comments

Comments
 (0)