ExclamationAdd a login system to your hack!

Posts 1–4 of 4 · Page 1 of 1
Add a login system to your hack!
There's a couple ways you can use this. I'm giving you the C# source, so if your hacks are in C# you can just C+P the source into your program.

If not you'd have to use the binary and read the memory for the activation code *which you'd have to define yourself*


Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Windows.Forms;

namespace Digital_Prodigy_Validator
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string password = passTxt.Text;
            string username = userTxt.Text;
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://mpgh.net/forum/login.php?do=login");
            string values = "vb_login_username=" + username + "&vb_login_password=" + password
                                + "&securitytoken=guest&"
                                + "cookieuser=checked&"
                                + "do=login";

            req.Method = "POST";
            req.ContentType = "application/x-www-form-urlencoded";
            req.ContentLength = values.Length;
            byte[] byteArray = Encoding.UTF8.GetBytes(values);
            CookieContainer a = new CookieContainer();
            req.CookieContainer = a;
            ServicePointManager.Expect100Continue = false; // prevents 417 error
            Stream dataStream = req.GetRequestStream();
            dataStream.Write(byteArray, 0, byteArray.Length);
            HttpWebResponse response = (HttpWebResponse)req.GetResponse();
            
            dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();
            reader.Close();
            dataStream.Close();
            response.Close();
            bool activated;
            if (!responseFromServer.Contains("You have entered an invalid username or password")&&!responseFromServer.Contains("Quota"))
            {
                MessageBox.Show("Login Successful!");
                label3.Text = "Authorized";
                label3.ForeColor = Color.LimeGreen;
                button1.Enabled = false;
                activated = true;
            }
            else
            {
                MessageBox.Show("Login Failed");
                activated = false;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
have fun!
Again, wrong section, in case you have missed it, you have a C# section. and isn't mpgh already full of login stuff? and form named form1.. button named button1... labels named labelX... -_-
Sorry for wrong section
and I'm just trying to be a good member by posting things and helping out as much ad I cano
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?