» Site Navigation | | | » Advertisement | | | » Recent Threads | I'm back. Today 05:37 PM Today 06:11 PM 19 Replies, 20 Views | | | Redemption? Today 05:57 PM Today 06:10 PM 5 Replies, 6 Views | Need a MM Today 06:09 PM Today 06:09 PM 0 Replies, 1 Views | | | |  | |  | [VB6] How to make Neopets Login (detailed) |  |
05-21-2007, 04:42 PM
|
#1 (permalink)
| | Underground
second2none is offline
Join Date: Sep 2006 Location: BrisBANE <---- Age: 19 Posts: 5,023 Rep Power: 15 | [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! | |
| |  |
05-22-2007, 03:45 AM
|
#2 (permalink)
| | gôt hacks?
{Nasadaws} is offline
Join Date: Mar 2007 Location: winnipeg Age: 13 Posts: 1,400 Rep Power: 6 | nice guide i only just started vb and found this easy too use =)
(i would +rep but i have none) | |
| |
05-22-2007, 03:54 AM
|
#3 (permalink)
| | .Love Me. Wanna Be Mod.
likepeas is offline
Join Date: Apr 2007 Location: .out side. Age: 88 Posts: 720 Rep Power: 5 | Where to you DownLoad VB ? Likepeas
__________________ 卐Deep Thinking 卐  | |
| |
05-29-2007, 01:35 PM
|
#4 (permalink)
| | Underground
hedgeehog is offline
Join Date: May 2007 Posts: 200 Rep Power: 4 | Well it looks good. I could never write somthing that big.
Handy to those who need it. | |
| |
07-09-2007, 09:56 AM
|
#5 (permalink)
|
Connor is offline
Join Date: Dec 2006 Location: Preston Age: 15 Posts: 2,532 Rep Power: 9 | Thanks!
I just need to learn how to make it redirect to my next form ¬_¬ | |
| |
07-09-2007, 10:19 AM
|
#6 (permalink)
| | Banned
Jello is offline
Join Date: Dec 2006 Location: Durham, England Age: 16 Posts: 2,498 Rep Power: 0 | Very nice guide ;)
+rep.
Also look for a rip of VB6 Peas.
__________________
[CENTER][U][I][B][URL="http://img.photobucket.com/albums/v385/jellie116/Assassinscreed.jpg"][IMG]http://img.photobucket.com/albums/v385/jellie116/Assassinscreed.jpg[/IMG][/URL]
[/B][/I][/U][/CENTER]
| |
| |
07-09-2007, 11:46 AM
|
#7 (permalink)
| | Banned
Meilin No Yuutsu is offline
Join Date: May 2007 Posts: 6 Rep Power: 0 | Wow, hey thanks for the guide. Very well put together ^_^ | |
| |
07-10-2007, 07:55 AM
|
#8 (permalink)
|
Connor is offline
Join Date: Dec 2006 Location: Preston Age: 15 Posts: 2,532 Rep Power: 9 | Code: Option Explicit
Private Sub cmdlogin_Click()
Dim strHTML As String
strHTML = wrapper.PostWrapper("http://login.gaiaonline.com/gaia/login.php", "username=txtuser.text&x=32&y=12&password=txtpass.text&submit=Login&sid=50fdacdc60471930e84c0b87ddfd19c4&redirect=http%3A%2F%2Fwww.gaiaonline.com%2F")
If InStr(1, strHTML, "ERROR") Then
lblstatus.Caption = "Incorrect Password, Try Again"
End If
If InStr(1, strHTML, "banned") Then
lblstatus.Caption = "Sorry. Your account is banned. >_<"
End If
If InStr(1, strHTML, "Gold") Then
lblstatus.Caption = "You have logged in successfully."
End If
End Sub This is my code for a gaia login.
When I try to compile it, the program highlights the word 'wrapper' and an error comes up. WTF? | |
| |
07-31-2007, 05:10 AM
|
#9 (permalink)
| | Full Member
Kiizii3 is offline
Join Date: Jul 2007 Posts: 85 Rep Power: 4 | this looks pretty good | |
| |
10-20-2007, 02:50 PM
|
#10 (permalink)
|
|G3| is online now Join Date: Feb 2007 Posts: 3,076 Rep Power: 17 | | |
| |  | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |