Skip to content
Snippets Groups Projects
Select Git revision
  • f711c40df9372620369e6e38514ffbe59a2987ce
  • 2023ss default protected
  • 2022ss
  • 2021ss
  • 2020ss
  • 2019ss
  • 2018ss
  • 2017ss
  • 2016ss
  • 2015ss
  • 2014ss
11 results

server-3.c

Blame
  • Forked from Peter Gerwinski / bs
    101 commits behind the upstream repository.
    server-3.c 528 B
    #include <stdio.h>
    #include <stdlib.h>
    
    void stuff (void)
    {
      asm ("mov $0, %eax");
      asm ("add $0x28, %rsp");
      asm ("ret");
      asm ("nop");
      asm ("nop");
      asm ("nop");
      asm ("mov %rsp, %rdi");
      asm ("ret");
      asm ("nop");
      asm ("nop");
      asm ("nop");
      asm ("add $0x20, %rdi");
      asm ("ret");
      asm ("nop");
      asm ("nop");
      asm ("nop");
      system ("clear");
      exit (0);
    }
    
    int main (void)
    {
      char buffer[20];
      printf ("Your name, please: ");
      fgets (buffer, 20, stdin);
      printf ("Hello, %s!\n", buffer);
      return 0;
    }