private void loadInfo() { game = ShittyFunc.ser.Deserialize <data.Rootobject>(ShittyFunc.res2); dat = ShittyFunc.ser.Deserialize <data>(ShittyFunc.res); rtbLog.Text = "Status"; rtbLog.Text += "\n========================="; lblUsername.Text = dat.username; lblName.Text = dat.nama; lblLevel.Text = dat.level; if (dat.expiry >= 0) { lblExpiry.Text = "Remaining " + dat.expiry + " day(s)"; } else if (dat.expiry >= -98 && dat.expiry <= -1) { lblExpiry.Text = "Expired"; logs("Expired license. Please contact admin."); } else if (dat.expiry == -99) { lblExpiry.Text = "-"; logs("Not registered PC. Please contact admin."); } if (dat.aktif == 99) { lblHWIDStatus.Text = "Not Registered"; logs("Your HWID : " + ShittyFunc.GetHDSN() + ". Please contact admin."); } else if (dat.aktif == 0) { lblHWIDStatus.Text = "Not Active"; } else if (dat.aktif == 1) { lblHWIDStatus.Text = "Active"; logs("Welcome :)"); } lblSaldo.Text = "$" + dat.saldo; lblPoint.Text = dat.point; // lblIPAddress.Text = PCInfo.IP(); lblMacAddress.Text = PCInfo.MAC(); lblHWID.Text = PCInfo.HDSN(); }
private void btnLogin_Click(object sender, EventArgs e) { btnLogin.Enabled = false; string jsonAcc = Fnc.PHP(InjectData.JSonData, "POST", "username="******"&password="******"&hdsn=" + ShittyFunc.GetHDSN()); data dat = new data(); dat = ShittyFunc.ser.Deserialize <data>(jsonAcc); if (txtUsername.Text == "" && txtPassword.Text == "") { MessageBox.Show("Please fill username & password!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Error); btnLogin.Enabled = true; } else { if (dat.available == 1) { MessageBox.Show("Login Success!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); // ShittyFunc.username = txtUsername.Text; ShittyFunc.password = txtPassword.Text; string jsonGame = Fnc.PHP(InjectData.JSonGame, "POST", "username="******"&password="******"Wrong Username / Password!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning); btnLogin.Enabled = true; } } }
public static string HDSN() { string res = ShittyFunc.GetHDSN(); return(res); }