libchm

small ELF64

Feb 12th, 2024
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.88 KB | Source Code | 0 0
  1. void *syscall5(void *num, void *a1, void *a2, void *a3, void *a4, void *a5);
  2.  
  3. typedef unsigned long int uintptr;
  4. typedef long int intptr;
  5.  
  6. static intptr write(int fd, void const *string, uintptr len) {
  7.   return (intptr)syscall5((void *)1, // SYS_write
  8.                           (void *)(intptr)fd, (void *)string, (void *)len, 0,
  9.                           0);
  10. }
  11.  
  12. int main(int argc, char **argv) {
  13.   write(1, "nigger\n", 7);
  14.   return 0;
  15. }
  16. void *syscall5(void *num, void *a1, void *a2, void *a3, void *a4, void *a5);
  17.  
  18. typedef unsigned long int uintptr;
  19. typedef long int intptr;
  20.  
  21. static intptr write(int fd, void const *string, uintptr len) {
  22.   return (intptr)syscall5((void *)1, // SYS_write
  23.                           (void *)(intptr)fd, (void *)string, (void *)len, 0,
  24.                           0);
  25. }
  26.  
  27. int main(int argc, char **argv) {
  28.   write(1, "nigger\n", 7);
  29.   return 0;
  30. }
  31.  
Add Comment
Please, Sign In to add comment