Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Go Back  Xtreme Visual Basic Talk > > > Yahoo Auto Login Program... need help :/


Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2008, 07:33 PM
41g0h4x0r 41g0h4x0r is offline
Newcomer
 
Join Date: Nov 2008
Posts: 1
Default Yahoo Auto Login Program... need help :/


alright.. i've got everything working here..

the regex is a little futile.. but wth.. i'm still learning

now when it opens up the page.. it goes to the login page rather than logging in..

maybe because firefox is default.. and the cookie doesn't get carried over or something :? :? ???

anyways.. enough chit chat.. here's the code:

PHP Code:
Imports System.Data
Imports System
.Text.RegularExpressions

Public Class Form1

    
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles loginBtn.Click
        Dim strURL 
As String
        Dim strMethod 
As String

        strURL 
"https://login.yahoo.com/config/login?"
        
strMethod "POST"

        
Dim varNames() As String = {".tries"".src"".md5"".hash"".js"".last""promo"".intl"".bypass"".partner"".u"".v"".challenge"".yplus"".emailCode""pkg""stepid"".ev""hasMsgr"".chkP"".done"".pd""login""passwd"}
        
Dim varVals() As String = {"1""ym""""""""""""us"""""FindVars(".u"), "0"FindVars(".challenge"), """""""""""0""Y""http://mail.yahoo.com""ym_ver=0&c=&ivt=&sg="txtUser.TexttxtPass.Text}

        
Dim i As Integer 0

        
For 0 To varNames.Length 1
            dbgTxt
.Text dbgTxt.Text vbNewLine varNames(i) & "=" varVals(i)
        
Next

        System
.Diagnostics.Process.Start("http://mail.yahoo.com")


    
End Sub
    
Public Function SubmitForm(ByVal frmURL As StringByVal frmMethod As StringByVal varNames() As StringByVal varValues() As String)
        If 
IsNothing(varNames) Or IsNothing(varValuesThen
            
Return "ERROR"
            
Exit Function
        
End If
        If 
varNames.GetUpperBound(0) <> varValues.GetUpperBound(0Then
            
Return "ERROR"
            
Exit Function
        
End If
        
Dim web As New System.Net.WebClient()
        
web.Headers.Add("Content-Type""application/x-www-formurlencoded")
        
Dim temp As StringAs Integer
        
For 0 To varNames.GetUpperBound(0)
            
temp temp varNames(i) & "=" varValues(i)
            If 
<> varNames.GetUpperBound(0Then
                temp 
temp "&"
            
End If
        
Next i
        Dim d 
As Byte() = System.Text.Encoding.ASCII.GetBytes(temp)
        
Dim res As Byte() = web.UploadData(frmURLfrmMethodd)
        Return 
System.Text.Encoding.ASCII.GetString(res)
    
End Function



    Public Function 
getSource(ByVal strURL As String) As String
        
Try
            
Dim wClient As New System.Net.WebClient(), temp As String_
            sReader 
As System.IO.StreamReaderstrStream As System.IO.Stream
            strStream 
wClient.OpenRead(strURL)
            
sReader = New System.IO.StreamReader(strStream_
            System
.Text.Encoding.UTF8False)
            Return 
sReader.ReadToEnd
        
Catch ex As Exception
            
Return "An error occurred. Unable to get text."
        
End Try
    
End Function

    Public Function 
FindVars(ByVal Var As String)
        
Dim temp As Stringsearchstr As String
        Dim result 
As String
        temp 
getSource("https://login.yahoo.com")
        
searchstr "<input type=" Chr(34) & "hidden" Chr(34) & " name=" Chr(34) & Var & Chr(34) & " value=" Chr(34) & ".*" Chr(34) & ">"
        
result Regex.Match(tempsearchstrRegexOptions.IgnoreCase).Value
        Dim replaceStf 
As String "<input type=" Chr(34) & "hidden" Chr(34) & " name=" Chr(34) & Var & Chr(34) & " value=" Chr(34)
        
result Regex.Replace(resultreplaceStf"")
        
replaceStf Chr(34) & ">"
        
result Regex.Replace(resultreplaceStf"")

        Return 
result
    End 
Function



End Class 
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/ Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
 
Yahoo Auto Login Program... need help :/
Yahoo Auto Login Program... need help :/
 
-->