Skip to content

Commit fe89b68

Browse files
committed
Modified executor source
1 parent d06451c commit fe89b68

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

executor.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ int main(int argc, char *argv[]) {
1515
perror("[-] mmap");
1616
exit(1);
1717
}
18+
19+
read(0, shellcode, SHELLCODE_SIZE);
1820

19-
if(argc == 1) {
20-
read(0, shellcode, SHELLCODE_SIZE);
21-
} else if(argc == 2) {
22-
strncpy((char *) shellcode, argv[1], SHELLCODE_SIZE - 1);
21+
if(argc == 2) {
22+
shellcode += atoi(argv[1]);
2323
}
24-
24+
2525
shellcode();
2626

2727
return 0;
2828
}
29-

0 commit comments

Comments
 (0)