Go Back   Gaming Gutter


» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post What do you do when your...
10-25-2008 12:23 AM
Last post by Badger
Today 10:37 PM
177 Replies, 1,220 Views
Go to first new post Super mario world
10-20-2008 12:49 PM
Last post by agentgerbil
Today 10:33 PM
69 Replies, 616 Views
Go to first new post Fav Football Team?
11-19-2008 03:58 PM
by shep
Last post by agentgerbil
Today 10:32 PM
24 Replies, 137 Views
Go to first new post [MULTI-TRAINER] Eclipse
10-04-2008 04:39 PM
by Horde
Last post by Horde
Today 10:31 PM
109 Replies, 3,785 Views
Go to first new post Best MmoRPG
11-14-2008 12:38 AM
by jamila
Last post by agentgerbil
Today 10:31 PM
26 Replies, 178 Views
View Single Post

 [VB6] How to make Neopets Login (detailed)
Old 05-21-2007, 05:42 PM   #1 (permalink)
second2none
Underground

Male second2none is offline
 
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
GPoints: 354
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 16
[VB6] How to make Neopets Login (detailed)

How to make a Login for Neo Pets

This is the procedure for any login for any site.
For now I will be using Neopets (simple one)
I will post how to get the Post Data using firefox. & how to get it just normally.
You will also need to have a wrapper.
First of All if you dont have firefox get it.

http://www.mozilla.com/en-US/firefox/

Next Download the Live HTTP Headers Addon.

http://livehttpheaders.mozdev.org/

Restart Firefox.

Navigate your way to http://www.neopets.com

If you are logged in, Log out, if not click sign in.

So now we are here.
http://www.neopets.com/loginpage.phtml

In fire fox click Tools> Live HTTP Headers

A extra window will pop up.
Along the top you will see
Headers | Generator | Config | About

Click the Headers Tab.

Make sure it's blank if not click clear.
Next go back to the neopets Login page & enter your username. & click Login

A hole bunch of text should show up. The to one should look something like this.



I have circled the info we need.
1 = The Site you post to.
2= The Data you send.

Now on neo we will be here
http://www.neopets.com/hi.phtml

Click back to your Live HTTP Headers & Clear. (you will find out why in a second)

Enter your password & Click Login.
Go to live HTTP Headers & the first one should be a Post.
Something like this.



As you can see you wont need to use the first example I showed as it posts the Username. Most logins dont require you enter your username first. But this one does. BUT still at the end it sends it all at one time in the end.

So now we have the post data.
You can start coding.

Add a Label, 2 Text Boxes , wrapper (in this case its HTTP wrapper) & a Command Button.
Change the properties to the following.


-------------------------------
Label
Name - lblStatus

-------------------------------
Text Box 1
Name - txtUser
Text -
-------------------------------
Text Box 2
Name - txtPass
PasswordChar - * (or whatever you want the character to be)
Text -

-------------------------------
HTTPWrapper
Name - wrapper

-------------------------------
Command Button 1
Name - cmdLogin

-------------------------------

Now you have everything on the form.
Double click the cmdLogin.

type this

Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("", "")


What is this?
This is the post function for HTTPWrapper. strHTML can be anything but its easy to name it strHTML.

What to add between the "" 's

You want to Add the first thing I circled & named 1.

So far it will look like this.


Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("http://www.neopets.com/login.phtml", "")


Now we need to add the post data.

Number 2.

Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("http://www.neopets.com/login.phtml", "username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=%2petcentral.phtml")


What have I done here?
I have exchanged the username & pass with with the txt Boxes.
So now it will post whatever you put in the text boxes.

Now we want to check if the password & or username is correct.
Log out of neo type in your username & enter a bad password.
Look for something unique to the bad password page. In this case its "badpassword" so now we are going to check if strHTML as "badpassword" in it.


Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("http://www.neopets.com/login.phtml", "username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=%2petcentral.phtml")

If InStr(1, strHTML, "badpassword") then
lblStatus.Caption = "Bad Password, Try Again"
End If


Whats this?
Its an instr Function. It checks to see if strHTML as "Badpassword" & if it does it will display the message in the label.

Now go back to the neo login page, enter the username of a frozen account.
Check the page for a unique text. In this case its "This account has been"
So add the code.


Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("http://www.neopets.com/login.phtml", "username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=%2petcentral.phtml")

If InStr(1, strHTML, "badpassword") then
lblStatus.Caption = "Bad Password, Try Again"
ElseIf InStr(1, strHTML, "This account has been") then
lblStatus.Caption = "Account Frozen, Try Another"
End If


Next Check to see the password is correct.


Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("http://www.neopets.com/login.phtml", "username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=%2petcentral.phtml")

If InStr(1, strHTML, "badpassword") then
lblStatus.Caption = "Bad Password, Try Again"
ElseIf InStr(1, strHTML, "This account has been") then
lblStatus.Caption = "Account Frozen, Try Another"
ElseIf InStr(1, strHTML, "petcentral") then
lblStatus.Caption = "Congrats Logged In."
End If


SO now we have it checking. Its always go to add an Else to If statments so if it cant find anyof them it will do the else. (if the page doesnt load properly etc.)


Quote:
Dim strHTML as String

strHTML = wrapper.Postwrapper("http://www.neopets.com/login.phtml", "username=" & txtUser.Text & "&password=" & txtPass.Text & "&destination=%2petcentral.phtml")

If InStr(1, strHTML, "badpassword") then
lblStatus.Caption = "Bad Password, Try Again"
ElseIf InStr(1, strHTML, "This account has been") then
lblStatus.Caption = "Account Frozen, Try Another"
ElseIf InStr(1, strHTML, "petcentral") then
lblStatus.Caption = "Congrats Logged In."
Else
lblStatus.Caption = "Unknown Error"
End If


There you go. Sorry for the long tutorial But I wanted to explain it.
You can also add extra checks like suspensions, how long left etc.

I hope this helps.
You can use the neo account to practice. Its a crap account.
If you have any questions Post them here
Pictures By: Kane
Code By: Kane
Tutorial By: Kane

I've probably fucked up somewhere xD Cause I wrote it off the top of my head. So if there is a mistake tell me. Thanks
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote
 
Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 10:38 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.16487789 seconds (100.00% PHP - 0% MySQL) with 18 queries