Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace RNGPID
- {
- public partial class wondershiny : Form
- {
- private static bool open;
- private readonly char[] accepted = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
- public wondershiny()
- {
- InitializeComponent();
- open = true;
- hacktidText.MaxLength = 5;
- hacksidText.MaxLength = 5;
- checkPIDText.MaxLength = 10;
- }
- public static bool isOpen()
- {
- return open;
- }
- private void hackCheck_KeyPress(object sender, KeyPressEventArgs e)//stop all keystrokes but the allowed list for tid/sid/pid
- {
- if (char.IsControl(e.KeyChar))
- return;
- for (int i = 0; i < accepted.Length; i++)
- {
- if (e.KeyChar == accepted[i])
- {
- return;
- }
- }
- e.Handled = true;
- }
- private void Wondershiny_Load(object sender, EventArgs e)
- {
- }
- private void checkPoke_FormClosed(object sender, FormClosedEventArgs e)
- {
- open = false;
- }
- private void hackRun_Click(object sender, EventArgs e)
- {
- uint pid;
- byte pid1, pid2, pid3, pid4;
- ushort highPID, xid, tid, sid, xorPID;
- ushort.TryParse(hacktidText.Text, System.Globalization.NumberStyles.Number, null, out tid);
- ushort.TryParse(hacksidText.Text, System.Globalization.NumberStyles.Number, null, out sid);
- uint.TryParse(checkPIDText.Text, System.Globalization.NumberStyles.Number, null, out pid);
- pid1 = (byte)(pid >> 24);
- pid2 = (byte)((pid & 0x00FF0000) >> 16);
- pid3 = (byte)((pid & 0x0000FF00) >> 8);
- pid4 = (byte) (pid & 0x000000FF);
- highPID = (ushort)(pid >> 16);
- xid = (ushort)(tid ^ sid);
- xorPID = (ushort)((xid ^ pid4) ^ 0001);
- seedText.Text = pid4.ToString("X2");
- if (xorPID == highPID)
- {
- idTest.Text = "Yes";
- }
- else
- {
- idTest.Text = "No";
- }
- if (xorPID == highPID && pid3 == 00 && ((highPID ^ 0001) ^ xid) == pid4)
- {
- pidText.Text = "Legal";
- }
- else
- {
- pidText.Text = "Illegal";
- }
- //MessageBox.Show(pid4.ToString("X2"));
- }
- }
- }
Advertisement