[Tutorial] Easiest way to add a HackCommunity Login form to your application 05-26-2012, 03:05 AM
#1
I wanted to write this tutorial for a long time now, so here goes. :thumbs:
Alright, first off, add a new form to your WindowsFormsApplication and call it Login or whatever you want.
Now add two textboxes and one button. The first textbox for inputting the username and the second one for the password.
Change the button text to "Login".
Add the following code to button1:
Replace the mainform with the name of your application's main form.
Don't forget your imports:
That's basically the end of the coding part.
Now click on Project Settings and change the default form to Login.vb.
You're done.
I just want to say thank you to the unknown user who taught me this method.
Goodluck and god speed. :bye:
~ Arcane.cfg
Alright, first off, add a new form to your WindowsFormsApplication and call it Login or whatever you want.
Now add two textboxes and one button. The first textbox for inputting the username and the second one for the password.
Change the button text to "Login".
Add the following code to button1:
Code:
Dim postData As String = "http%3A%2F%2Fhackcommunity.com%2Fmember.php?action=login&username=" + TextBox1.Text & "&password=" + TextBox2.Text & "&submit=Login&action=do_login&url="
Dim tempcookies As New CookieContainer
Dim encoding As New UTF8Encoding
Dim byteData As Byte() = encoding.GetBytes(postData)
Dim postreq As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://www.hackcommunity.com/member.php?action=login"), HttpWebRequest)
postreq.Method = "POST"
postreq.KeepAlive = True
postreq.CookieContainer = tempcookies
postreq.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729"
postreq.ContentType = "application/x-www-form-urlencoded"
postreq.Referer = "http://www.hackcommunity.com/member.php?action=login"
postreq.ContentLength = byteData.Length
Dim postreqstream As Stream = postreq.GetRequestStream()
postreqstream.Write(byteData, 0, byteData.Length)
postreqstream.Close()
Dim postresponse As HttpWebResponse
postresponse = DirectCast(postreq.GetResponse, HttpWebResponse)
tempcookies.Add(postresponse.Cookies)
logincookie = tempcookies
Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
Dim thepage As String = postreqreader.ReadToEnd
If thepage.Contains("You have entered an invalid username/password combination.") = True Then
MsgBox("Error logging in, try again!", 0, "Incorrect Username/password combination.")
Else
MsgBox("Account verified, you can now proceed to the beta key generator.", 0, "Logged in.")
MAINFORM.Show()
Me.Hide()
End IfReplace the mainform with the name of your application's main form.
Don't forget your imports:
Code:
Imports System.Net
Imports System.Text
Imports System.IOThat's basically the end of the coding part.
Now click on Project Settings and change the default form to Login.vb.
You're done.
I just want to say thank you to the unknown user who taught me this method.
Goodluck and god speed. :bye:
~ Arcane.cfg
![[Image: 5Y220l1.png]](http://imgur.com/5Y220l1.png)
[FREE] iPentagram Version4 - AIO Hacking Tool.
/ IPTracer, Shellbooter, Vuln.Scanner, DorkScanner, AnonEmailClient, Encrypter/Decrypter & more. /


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


![[Image: Wfxdx.png]](http://i.imgur.com/Wfxdx.png)
![[Image: 2a97db037ecd41e7e4fc523da9c72f76_45646931.1.bmp]](http://nn1.upanh.com/b5.s28.d1/2a97db037ecd41e7e4fc523da9c72f76_45646931.1.bmp)