I have this code that is supose to just display "Hello Hacker!". But when ever I run it it gives a segmentation fault error
#include <stdio.h>
char code[] = "\xba\x0e\x00\x00\x00\xb9\x4\x90\x04\x08\xbb\x01\x00\x00\x00\xb8\x04\x00\x00\x00\xcd\x80\xbb\x00\x00\x00\x00\xb8\x01\x00\x00\x00\xcd\x80";
int main()
{
void(*func) (void);
func = (void*) code;
func();
}
I am trying to run it on linux btw.
Thanks