piffy

pipe C++

Jul 23rd, 2024 (edited)
12,710
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.07 KB | Source Code | 0 0
  1. #include <sys/types.h>
  2. #include <unistd.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. void  leggi_dalla_pipe (int file)
  7. {
  8.   FILE *f;
  9.   int c;
  10.   f = fdopen (file, "r");
  11.   while ((c = fgetc (f)) != EOF)
  12.     putchar (c);
  13.   fclose (f);
  14. }
  15.  
  16. /* Scrittura di un testo qualsiasi nella pipe */
  17.  
  18. void scrivi_nella_pipe (int file)
  19. {
  20.   FILE *f;
  21.   f = fdopen (file, "w");
  22.   fprintf (f, "Messaggio!\n");
  23.   fclose (f);
  24. }
  25.  
  26. int  main (void)
  27. {
  28.   pid_t pid;
  29.   int mypipe[2];
  30.  
  31.   /* Crea la pipe. */
  32.   if (pipe (mypipe))
  33.     {
  34.  fprintf (stderr, "Pipe non creata.\n");
  35.  return EXIT_FAILURE;
  36.     }
  37.    
  38.   pid = fork ();
  39.   if (pid < 0)
  40.     {
  41.  fprintf (stderr, "Fork fallita.\n");
  42.  return EXIT_FAILURE;
  43.     }
  44.  
  45.   if (pid == 0)
  46.     {
  47.  /* Processo figlio: chiudere la parte di scrittura */
  48.  close (mypipe[1]);
  49.  leggi_dalla_pipe (mypipe[0]);
  50.  return EXIT_SUCCESS;
  51.     }
  52.   else
  53.     {
  54.  /* Processo padre: chiudere la parte di lettura */
  55.  close (mypipe[0]);
  56.  scrivi_nella_pipe (mypipe[1]);
  57.  return EXIT_SUCCESS;
  58.     }
  59. }
Advertisement
Comments
  • Borfidorn
    227 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
Add Comment
Please, Sign In to add comment