hi
i was wondering if anyone can help me with my code what im trying to do is get this code to login to the steamcommunity website but am having a problem with the login packet any ideas on this would be great thanks...
Form Code:
Module code:
login source for steamcommunity website:
i was wondering if anyone can help me with my code what im trying to do is get this code to login to the steamcommunity website but am having a problem with the login packet any ideas on this would be great thanks...
Form Code:
Code:
Private Sub Command1_Click()
Socket.Connect "steamcommunityDOTcom", "80"
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub Socket_Connect()
SteamLogin Text1.Text, Text2.Text, Socket
End Sub
Private Sub Socket_DataArrival(ByVal bytesTotal As Long)
Dim THEDATA As String * 18
Socket.GetData THEDATA
If THEDATA = "HTTP/1.1 302 Found" Then
MsgBox "Correct Password!", vbInformation
Else
MsgBox "Wrong Password!", vbCritical
End If
Socket.Close
End Sub
Module code:
Code:
Public Function SteamLogin(Username As String, Password As String, Winsck As Winsock)
Dim LOGINPACKET As String, FINALLEN As String
FINALLEN = 36 + Len(Username) + Len(Password)
LOGINPACKET = "POST /loginForm HTTP/1.1" & vbCrLf
LOGINPACKET = LOGINPACKET + "Host: " & Winsck.RemoteHost & vbCrLf
LOGINPACKET = LOGINPACKET + "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept-Language: en-gb,en;q=0.5" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept -Encoding: gzip , deflate" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf
LOGINPACKET = LOGINPACKET + "Keep-Alive: 300" & vbCrLf
LOGINPACKET = LOGINPACKET + "Connection: keep -alive" & vbCrLf
LOGINPACKET = LOGINPACKET + "Referer: http://wwwDOTgoogleDOTcom" & vbCrLf
LOGINPACKET = LOGINPACKET + "Content-Type: application/x-www-form-urlencoded" & vbCrLf
LOGINPACKET = LOGINPACKET + "Content-Length: " & FINALLEN & vbCrLf & vbCrLf
LOGINPACKET = LOGINPACKET + "steamAccountName=" & Username & "&steamPassword=" & Password & "&userlogin=Log+In"
Winsck.SendData LOGINPACKET
End Function
login source for steamcommunity website:
Code:
<form enctype="multipart/form-data" action="https://steamcommunity.com/" method="POST" name="loginForm" id="loginForm">
<input type="hidden" name="action" value="doLogin" />
<input type="hidden" name="goto" value="" />
<input type="hidden" name="qs" value="" />
<input type="hidden" name="msg" value="" />
<label for="steamAccountName">Steam Username:</label>
<input class="textField" type="text" name="steamAccountName" id="steamAccountName" maxlength="64" /><br />
<label for="steamPassword">Password:</label>
<input class="textField" type="password" name="steamPassword" id="steamPassword" autocomplete="off" maxlength="64" /><br />
<input class="subImage" type="image" id="imageLogin" onMouseover="iSwap('imageLogin','skin_1/buttonLoginOver.gif')" onMouseout="iSwap('imageLogin','skin_1/buttonLogin.gif')" src="https://steamcommunity.com/public/images/skin_1/buttonLogin.gif" width="104" height="25" border="0"/>
</form>