Bond697

Wondershiny.cs

Jul 17th, 2011
432
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.77 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace RNGPID
  11. {
  12.     public partial class wondershiny : Form
  13.     {
  14.         private static bool open;
  15.         private readonly char[] accepted = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
  16.  
  17.         public wondershiny()
  18.         {
  19.             InitializeComponent();
  20.             open = true;
  21.             hacktidText.MaxLength = 5;
  22.             hacksidText.MaxLength = 5;
  23.             checkPIDText.MaxLength = 10;
  24.         }
  25.  
  26.         public static bool isOpen()
  27.         {
  28.             return open;
  29.         }
  30.  
  31.         private void hackCheck_KeyPress(object sender, KeyPressEventArgs e)//stop all keystrokes but the allowed list for tid/sid/pid
  32.         {
  33.             if (char.IsControl(e.KeyChar))
  34.                 return;
  35.             for (int i = 0; i < accepted.Length; i++)
  36.             {
  37.                 if (e.KeyChar == accepted[i])
  38.                 {
  39.                     return;
  40.                 }
  41.             }
  42.             e.Handled = true;
  43.         }
  44.  
  45.         private void Wondershiny_Load(object sender, EventArgs e)
  46.         {
  47.  
  48.         }
  49.  
  50.         private void checkPoke_FormClosed(object sender, FormClosedEventArgs e)
  51.         {
  52.             open = false;
  53.         }
  54.  
  55.         private void hackRun_Click(object sender, EventArgs e)
  56.         {
  57.             uint pid;
  58.             byte pid1, pid2, pid3, pid4;
  59.             ushort highPID, xid, tid, sid, xorPID;
  60.  
  61.             ushort.TryParse(hacktidText.Text, System.Globalization.NumberStyles.Number, null, out tid);
  62.             ushort.TryParse(hacksidText.Text, System.Globalization.NumberStyles.Number, null, out sid);
  63.             uint.TryParse(checkPIDText.Text, System.Globalization.NumberStyles.Number, null, out pid);
  64.  
  65.             pid1 = (byte)(pid >> 24);
  66.             pid2 = (byte)((pid & 0x00FF0000) >> 16);
  67.             pid3 = (byte)((pid & 0x0000FF00) >> 8);
  68.             pid4 = (byte) (pid & 0x000000FF);
  69.             highPID = (ushort)(pid >> 16);
  70.             xid = (ushort)(tid ^ sid);
  71.             xorPID = (ushort)((xid ^ pid4) ^ 0001);
  72.  
  73.             seedText.Text = pid4.ToString("X2");
  74.  
  75.             if (xorPID == highPID)
  76.             {
  77.                 idTest.Text = "Yes";
  78.             }
  79.             else
  80.             {
  81.                 idTest.Text = "No";
  82.             }
  83.  
  84.  
  85.             if (xorPID == highPID && pid3 == 00 && ((highPID ^ 0001) ^ xid) == pid4)
  86.             {
  87.                 pidText.Text = "Legal";
  88.             }
  89.             else
  90.             {
  91.                 pidText.Text = "Illegal";
  92.             }
  93.  
  94.  
  95.             //MessageBox.Show(pid4.ToString("X2"));
  96.              
  97.        }
  98.     }
  99. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment