fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. static const char code[22] = "\x53\x31\xC0\x0F\xA2\x89\x1F\x89\x57\x04"
  5. "\x89\x4F\x08\x5B\x48\x8D\x05\0\0\0\0\xC3";
  6. static void (*get_vendor_string)(char(*)[12]) = (void(*)(char(*)[12]))code;
  7.  
  8. static void autocorrect(char(*str)[12]) {
  9. if (strcmp("GenuineIntel", *str) == 0) {
  10. memcpy(str, "shintel \xf0\x9f\x92\xa9", 12);
  11. } else if (strcmp("AuthenticAMD", *str) == 0) {
  12. memcpy(str, "AyyyyyyyyyMD", 12);
  13. }
  14. }
  15.  
  16. int main() {
  17. char s[12];
  18. get_vendor_string(&s);
  19. autocorrect(&s);
  20. printf("CPU made by %.12s\n", s);
  21. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
CPU made by shintel 💩