
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 | Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser1.Navigate(ComboBox1.Text) WebBrowser1.Document.GetElementById("emailAddress" ).SetAttribute("type", login.Text) WebBrowser1.Document.GetElementById("pswd").SetAtt ribute("type", login.Text) WebBrowser1.Document.GetElementById("btn_login").I nvokeMember("click") End Sub
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #2 (permalink) |
| Regular Member Join Date: Jan 2010
Posts: 43
|
This should work: PHP Code: |
| | |
| | #3 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Thanks for your Time Waldo. Ok I tried the code under webbrowser1.Documents Complete. and No Dice. It navigates to the page then It just sits there. Could it be that the constantly changing Notice in the center of the page is not allowing the page to become inactive? Anyway Thanks for the help I sure need it. Oh this time it didn't flag any lines of code.Also I am running in debug mode in cast that may have something to do with it.
__________________ "If at first you do succeed, try not to look astonished" Last edited by Ghst; 02-07-2010 at 09:02 AM. |
| | |
| | #4 (permalink) |
| Regular Member Join Date: Jan 2010
Posts: 43
|
Check this area of code: PHP Code: |
| | |
| | #5 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Waldo, I have tried all my reasonable options. I even tried this: HTML Code: Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
WebBrowser1.Navigate(ComboBox1.Text)
WebBrowser1.Document.GetElementById("emailAddress").SetAttribute("type", login.Text)
WebBrowser1.Document.GetElementById("pswd").SetAttribute("type", login.Text)
WebBrowser1.Document.GetElementById("btn_login").InvokeMember("click")
End Sub
HTML Code: <form name="frmLogIn-tbar" id="signInBoxLocal" method="post" action="/?cmd=sb-login&from=/?cmd=home"> <label class="loginLabel">Email Address or Swag Name:</label> <input gtbfieldid="5" title="Enter your email address" name="emailAddress" id="emailAddressLocal" class="loginInput" onkeypress="return enterLoginTBLocal(event);" type="text"> <label class="loginLabel">Password</label> <input title="Enter your password" name="pswd" id="pswdLocal" class="loginInput" onkeypress="return enterLoginTBLocal(event);" type="password"> <img src="/content/swagbucks-com/images/fbLogin_button.jpg" onclick="initFacebook(TBFCCallback);" class="btn-login" style="float: left; margin-right: 4px;" id="foo96"><img src="/content/swagbucks-com/images/login_button.jpg" onclick="logInTBLocal();" class="btn-login" style="float: left;"><div class="clear"></div> <a href="#" onclick="sendEmailTBLocal(); return false" class="emailPass">Email Password</a> <input name="persist" id="persistLocal" checked="checked" onkeypress="return enterLoginTBLocal(event);" class="persistBox" onchange="prettyCheckbox('persist',this)" type="checkbox"> <label for="persistLocal" class="persistLabel">Remember Me</label> <div class="clear"></div>
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #6 (permalink) |
| Regular Member Join Date: Jan 2010
Posts: 43
|
1. As you already noticed, the ids are: emailAddressLocal and pswdLocal. 2. So here are the code to fill the content of the textbox: PHP Code: 3. To send click is a little bit tricky as they use image as a button. But here you go: PHP Code: The code above should work. Tell me if you need further help. |
| | |
| | #9 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Here is all my code: HTML Code: Private Sub lblPass_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click
login.Show()
End Sub
Private Sub txtUser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub SwaggerLee1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(ComboBox1.Text)
End Sub
Private Sub lblUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblUser.Click
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
WebBrowser1.Document.GetElementById("emailAddressLocal").SetAttribute("value", lblUser.Text)
WebBrowser1.Document.GetElementById("pswdLocal").SetAttribute("value", lblPass.Text)
WebBrowser1.Document.GetElementById("btn_login").InvokeMember("click")
'collect all <img> tag name
Dim elemCollec As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
'iterate each <img> found to look for unique string of the button
For Each tagname As HtmlElement In elemCollec
Dim ctrlname As String = tagname.GetAttribute("src").ToString 'get atribute with src
If ctrlname.Equals("http://www.swagbucks.com/content/swagbucks-com/images/login_button.jpg") Then 'match with the buttin image
tagname.InvokeMember("click")
End If
Next
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
End Sub
End Class
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #10 (permalink) |
| Regular Member Join Date: Jan 2010
Posts: 43
|
The only thing that I changed from your code was removing this line: PHP Code: Code: http://www.swagbucks.com Here is the full code: PHP Code: |
| | |
| | #11 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Ok I had to do a lot of finagling To get the code to this point. Surprisingly it was Your (waldo) button click code that helped me get both username and password to load into the site's text boxes. But I lack the code to click the login Button. any way here is the code so far. HTML Code: Private username, password As String
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Login(username, password)
End Sub
Private Sub Login(ByVal username As String, ByVal password As String)
Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("id").ToString
If controlName = "emailAddressLocal" Then
curElement.SetAttribute("Value", lblUser.Text)
ElseIf controlName = "pswdLocal" Then
curElement.SetAttribute("Value", lblPass.Text)
End If
Next
End Sub
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #12 (permalink) |
| Regular Member Join Date: Jan 2010
Posts: 43
| Do you meant this? PHP Code:
__________________
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
| | |
| | #13 (permalink) | |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
I'm curious about this Quote:
__________________ "If at first you do succeed, try not to look astonished" | |
| | |
| | #14 (permalink) |
| Regular Member Join Date: Jan 2010
Posts: 43
|
That code is specifically for swagbucks login page since they use image as a button. If it use normal button like twitter, then you can use any method that can be found in this section.
__________________
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
| | |
| | #15 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Absolutely everything that I have tried has failed miserably in auto clicking the login button. Are there any suggestions?
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #16 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Here is the code that I'm trying to get to click the login Button. I've tried everything, That I can think of. I sure can use some help! There is a btn1 btnLogin that I've also tried from the source code but still no dice. Please HELP! HTML Code: For Each curElement As HtmlElement In theWElementCollection
Dim controlName As String = curElement.GetAttribute(" tagname").ToString
If controlName = "frmLogIn-tbar" Then
WebBrowser1.Document.GetElementById("btn1 btnlogin").InvokeMember("click")
End If
Next
System.Threading.Thread.Sleep(1000)
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #17 (permalink) |
| Bot Leecher Join Date: Feb 2010
Posts: 15
Reputation: 0 | http://thebotnet.com/third-party-bot...r-bots-in.html With that post I was able to auto logon to swagbucks only problem is when I get to the successful logon page I get a ton of java script errors making it practically useless. |
| | |
| | #18 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
I finally have a auto logger! The solution was a simple one line of code added to the bottom of: F HTML Code: or Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("id").ToString
If controlName = "emailAddressLocal" Then
curElement.SetAttribute("Value", lblUser.Text)
ElseIf controlName = "pswdLocal" Then
curElement.SetAttribute("Value", lblPass.Text)
End If
Next
__________________ "If at first you do succeed, try not to look astonished" |
| | |
| | #19 (permalink) |
| Bot Leecher Join Date: Feb 2010
Posts: 15
Reputation: 0 |
CONGRAT!!!!! I know how frustrating the whole trial and error programming can be. And thanks for sharing the code also. Just out of curiosity how are you going to get around the captchas? Sence they have updated ive only seen it happen one time so maybe it wont be a big deal. I was thinking bout looking for the swagbuck pic after ever search and if it finds it stop searching and ding the user. *Edit Can you plz post the full code? This is what I have its add the user names but no click Code: Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
WebBrowser1.Document.GetElementById("emailAddressLocal").SetAttribute("value", My.Settings.User)
WebBrowser1.Document.GetElementById("pswdLocal").SetAttribute("value", My.Settings.Pass)
'WebBrowser1.Document.GetElementById("btn_login").InvokeMember("click")
'collect all <img> tag name
Dim elemCollec As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
'iterate each <img> found to look for unique string of the button
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute(" tagname").ToString
If controlName = "frmLogIn-tbar" Then
WebBrowser1.Document.GetElementById("btn1 btnlogin").InvokeMember("click")
End If
Next
End Sub
Last edited by alkmie; 03-06-2010 at 10:51 AM. |
| | |
| | #20 (permalink) |
| Subscriber
GPT Earnings: $0.45
Join Date: Nov 2009
Posts: 73
Reputation: 0 |
Here is the code that I worked my arse off to get! look at the invokemember click statement. It took several weeks to get this one line right. HTML Code: Dim theWElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
For Each curElement As HtmlElement In theWElementCollection
Dim controlName As String = curElement.GetAttribute("id").ToString
If controlName = "emailAddressLocal" Then
curElement.SetAttribute("Value", lblUser.Text)
ElseIf controlName = "pswdLocal" Then
curElement.SetAttribute("Value", lblPass.Text)
System.Threading.Thread.Sleep(3000)
WebBrowser1.Document.InvokeScript("logInTBLocal")
End If
Giv Rep if this logs you on!
__________________ "If at first you do succeed, try not to look astonished" Last edited by Ghst; 03-06-2010 at 01:52 PM. |
| | |
![]() |
| Tags |
| auto, login, problems, swagbucks |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bot Problems | Sidekick | Bot Resources and Exploiting discussions. | 6 | 12-25-2009 12:26 AM |
| [VB 08] No-Id Auto Login Help | BotwiththeBest | Programming | 13 | 12-15-2009 02:51 PM |
| Lockerz - Grease Monkey - Auto Redemption / Auto Dailies / Auto Login Script | 3roken | Lockerz | 21 | 12-07-2009 12:15 PM |
| Lockerz - Grease Monkey - Auto Dailies / Auto Login PTZ Script | 3roken | Lockerz | 3 | 12-05-2009 01:36 PM |