Advertisement
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 checkPoke : Form
- {
- private static bool open;
- private readonly char[] accepted = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
- public checkPoke()
- {
- 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 checkPoke_Load(object sender, EventArgs e)
- {
- }
- private void hackRun_Click(object sender, EventArgs e)
- {
- uint pid, high, low, abil, tid, sid, pidTest;
- byte xorTest;
- uint.TryParse(hacktidText.Text, System.Globalization.NumberStyles.Number, null, out tid);
- uint.TryParse(hacksidText.Text, System.Globalization.NumberStyles.Number, null, out sid);
- uint.TryParse(checkPIDText.Text, System.Globalization.NumberStyles.Number, null, out pid);
- abil = (pid >> 0x10) & 1;
- abilityText.Text = abil.ToString();
- xorTest = (byte)((tid & 1) ^ (sid & 1) ^ (pid >> 31) ^ (pid & 1));
- if (xorTest == 1)
- {
- pidText.Text = "Illegal";
- }
- else
- {
- pidText.Text = "Legal";
- }
- high = pid >> 0x10;
- low = pid << 0x10 >> 0x10;
- pidTest = (tid ^ sid) ^ low;
- if ((pidTest & 1) == 1)
- {
- orTest.Text = "Yes";
- }
- else
- {
- orTest.Text = "No";
- }
- }
- private void checkPoke_FormClosed(object sender, FormClosedEventArgs e)
- {
- open = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement