Login Register






[Tutorial] Easiest way to add a HackCommunity Login form to your application filter_list
Author
Message
[Tutorial] Easiest way to add a HackCommunity Login form to your application #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:
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 If

Replace 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.IO

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
[Image: 5Y220l1.png]
[FREE] iPentagram Version4 - AIO Hacking Tool.
/ IPTracer, Shellbooter, Vuln.Scanner, DorkScanner, AnonEmailClient, Encrypter/Decrypter & more. /

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #2
holy crap....that was amazing!

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #3
(05-26-2012, 03:22 AM)Jacob Wrote: holy crap....that was amazing!

Haha, I know right!
I just wish I could remember the guy's name.
[Image: 5Y220l1.png]
[FREE] iPentagram Version4 - AIO Hacking Tool.
/ IPTracer, Shellbooter, Vuln.Scanner, DorkScanner, AnonEmailClient, Encrypter/Decrypter & more. /

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #4
Nice share, thank you.

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #5
This Is Very Use Ful , Thank you very Much for the Share !
[Image: Wfxdx.png]

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #6
(05-26-2012, 03:05 AM)Arcane.cfg Wrote: 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:
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 If

Replace 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.IO

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
Help me , this is a error
The remote server returned an error: (404) Not Found.
ai line postresponse = DirectCast(postreq.GetResponse, HttpWebResponse)
help me , thank

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #7
(06-01-2012, 05:47 PM)daovanson Wrote:
(05-26-2012, 03:05 AM)Arcane.cfg Wrote: 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:
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 If

Replace 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.IO

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
Help me , this is a error
The remote server returned an error: (404) Not Found.
ai line postresponse = DirectCast(postreq.GetResponse, HttpWebResponse)
help me , thank

That's not an issue with the code. You were either disconnected from the internet, or HC/Whichever MyBB forum you were trying this code out on was down at the time.
[Image: 5Y220l1.png]
[FREE] iPentagram Version4 - AIO Hacking Tool.
/ IPTracer, Shellbooter, Vuln.Scanner, DorkScanner, AnonEmailClient, Encrypter/Decrypter & more. /

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #8
That unknown user that you copied most of the code from is here: http://howtostartprogramming.com/vb-net/...st-method/

His username is Eleqtriq and can be found on HF(which pops up as google apparently).
#steez

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #9
Just some advice, it's probably more failsafe if you check to make sure that you're logged in by seeing if such parts of the logged in member source code exist, rather than checking for that invalid password message. Check for "UserCP" or something like that and you're good.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: [Tutorial] Easiest way to add a HackCommunity Login form to your application #10
hix . help me , i can do it
[Image: 2a97db037ecd41e7e4fc523da9c72f76_45646931.1.bmp]

what is logincookie ? help me please

Reply