Fhernd

ServidorBlog.cs

Jul 9th, 2014
2,682
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.92 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3.  
  4. namespace Recetas.CSharp.Cap04.R0407
  5. {
  6.     public class BlogxCSw
  7.     {
  8.         // Representa el número de threads máximos
  9.         // soportados por el servidor:
  10.         private const int threads = 3;
  11.        
  12.         // Representa la cantidad de usuarios que
  13.         // se van a conectar al blog:
  14.         private const int usuarios = 20;
  15.        
  16.         // Representa el locker que se encarga de
  17.         // controlar el acceso al blog:
  18.         private static Object locker = new Object();
  19.        
  20.         // Permite a un usuario ingresar al usuario:
  21.         public static void IngresarAlBlog()
  22.         {
  23.             while (true)
  24.             {
  25.                 lock (locker)
  26.                 {
  27.                     Monitor.Wait (locker);
  28.                 }
  29.                
  30.                 Console.WriteLine ("{0} accedió al Blog xCSw",
  31.                     Thread.CurrentThread.Name
  32.                 );
  33.                
  34.                 Thread.Sleep (150);
  35.             }
  36.         }
  37.        
  38.         public static void Main()
  39.         {
  40.             // Creación del pool de threads:
  41.             Thread[] pool = new Thread[threads];
  42.            
  43.             // Creación de cada uno de los threads:
  44.             for (int i = 0; i < threads; ++i)
  45.             {
  46.                 pool[i] = new Thread (new ThreadStart (IngresarAlBlog));
  47.                 pool[i].Name = String.Format ("Usuario {0}", (i + 1).ToString() );
  48.                 pool[i].IsBackground = true;
  49.                 pool[i].Start();
  50.             }
  51.            
  52.             // Atienda las visitas al blog:
  53.             for (int i = 1; i <= usuarios; ++i)
  54.             {
  55.                 Thread.Sleep (1000);
  56.                
  57.                 lock (locker)
  58.                 {
  59.                     Monitor.Pulse (locker);
  60.                 }
  61.             }
  62.            
  63.             Console.WriteLine ();
  64.         }
  65.     }
  66. }
Advertisement
Comments
  • tradyjay
    93 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 38% — 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 any verification from Swapzone — instant swap).
Add Comment
Please, Sign In to add comment