[C#][Help] MPGH Login

Posts 16–20 of 20 · Page 2 of 2
Quote Originally Posted by Rakuuza View Post
Really probably is easier using a web scraping method!!
Lol, easier than simply adding a new user to the database and restricting their access?

Anyways, login via Web Requests for MPGH is pretty straightforward. Examine what MPGH sends to the server by checking the data sent by the post request when you login and see how you should replicate it. Protip: Open up the pagesource of the page before you actually press the login button, half the values are are in hidden fields.
As Jason said. There is no reason to hook into anything deeper then HTTP requests. That would expose a security that no site would allow. Plus it needs some sort of an API. Purchase VB and search through its source.

Here is a working example for MPGH.

-- This is only the source. I don't want to disrespect forum rules and post straight executable. I use VS 2011 Beta.

I developed Forums.exe which is a form you can type in your credentials and it will send the request, save the cookie, and add it to the WebClients objects header. To show that you are logged in it will also show another form with just a richtextbox that has MPGH - MultiPlayer Game Hacking - Hacks, Cheats, Trainers, Downloads, Combat Arms Hacks, CrossFire Hacks, Call of Duty Hacks, Battlefield Hacks, Blacklight Retribution Hacks, Vindictus Hacks, Battlefield 3 Hacks, Project Blackout Hacks, WarRock Hacks source. Read through the source and you'll find out if your successfully logged in. Took less then 30 mins to create. Enjoy.

Credits: [C#] vBulletin Login function - Classes and Code Snippets - CODECALL Programming Forum -- Initial function (don't use it has a bug in it and won't work, mine is same function but fixed, so still cred required)

https://www.virustotal.com/file/73b6...is/1336635096/
http://virusscan.jotti.org/en-gb/sca...2aadba7728e926
Forums.rar17 KB · 53 downloads Clean
/file approved

Note that I didn't thank on purpose, it was from the attachment download.
It's ok... I won't tell
Well you can use this since its a vbulletin forum.
Its in Vb.net but theres loads of converters
This is for module code

Code:
Imports System.Security.Cryptography
Imports System.Text
Imports System.Net
Imports System. I O
Module Module1
    Public Function Login(ByVal Username As String, ByVal Password As String)

        Password = MD5(Password)
        Dim valid As Boolean = False
        Dim data As String = "vb_login_username=" & Username & "&vb_login_password=&s=&do=login&vb_login_md5password=" & Password & "&vb_login_md5password_utf=" & Password

        Try
            Dim request As HttpWebRequest = WebRequest.Create("http://yoururlhere/login.php?do=login")
            request.Method = WebRequestMethods.Http.Post
            request.ContentType = "application/x-www-form-urlencoded"
            request.UserAgent = "-- vBulletin Vaidation  --"



            request.ContentLength = data.Length

            Dim rStream As New StreamWriter(request.GetRequestStream)

            rStream.Write(data)
            rStream.Flush()
            rStream.Close()

            Dim response As HttpWebResponse = request.GetResponse
            Dim resReader As New StreamReader(response.GetResponseStream)

            Dim str As String = resReader.ReadToEnd


            If str.Contains("Thank you for logging in") Then
                valid = True
            Else
                valid = False
            End If


            response.Close()

        Catch ex As Exception
            MessageBox.Show(ex.Message, "Error: MPGH.net -  Login!", MessageBoxButtons.OK, MessageBoxIcon.Error)

        End Try

        Return valid

    End Function

    Public Function MD5(ByVal number As String) As String

        Dim ASCIIenc As New ASCIIEncoding
        Dim strReturn As String = String.Empty

        Dim ByteSourceText() As Byte = ASCIIenc.GetBytes(number)
        Dim Md5Hash As New MD5CryptoServiceProvider
        Dim ByteHash() As Byte = Md5Hash.ComputeHash(ByteSourceText)

        For Each b As Byte In ByteHash
            strReturn &= b.ToString("x2")
        Next

        Return strReturn

    End Function
End Module
and to use it youd use this with a button, a combo box as the username field, and a textbox as the password field:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Login(ComboBox1.Text, TextBox2.Text) Then
            MsgBox("Successfully Logged In! WELCOME!")
            Me.Hide()
            Form2.Show()
        Else
            MsgBox("Incorrect Username/Password")
        End If
    End Sub
Obviously remove the spaces in Imports System. I O
If you need any help let me know
Posts 16–20 of 20 · Page 2 of 2

Post a Reply

Similar Threads

Talk with us