Thetan Posted February 25, 2008 Share Posted February 25, 2008 I am trying to create a script that will bypass a CAPTCHA. .....I know what your thinking, but this site uses a very weak CAPTCHA system. The CAPTCHA image source has the actual CAPTCHA solve right in it which is also referenced several times in the full page source. Script Objective: 1. Open IE 2. Navigate to the page 3. Copy specified characters from source 4. Paste the character string into an HTML form 5. Press Submit 6. Repeat My problem is I tried using: CODE #Region --- IE-Builder generated code Start --- $oIE = _IECreate() ;------------- User input -------------- _IENavigate($oIE, "http://www.autoitscript.com/") ; web address $Find = " " ; my info shows after this line... or just find this line $Before = " " ; my info shows before this line... or set as "" ; ------------ End User input ------------- Sleep(1000) $body = _IEBodyReadHTML($oIE) $sloc = @TempDir & "\stest.txt" FileDelete($sloc) FileWrite($sloc, $body) $sfile = FileOpen($sloc, 0) $num = 0 While 2 $num = $num + 1 $sline = FileReadLine($sfile, $num) If @error Then MsgBox(262208, "Fail", "The string was NOT found ") FileClose($sfile) Exit EndIf If StringInStr($sline, $Find) Then MsgBox(64, "Success", "The string " & $Find & " was found " & @CRLF & " on line # " & $num, 5) If $Before = "" Then ExitLoop $Found = _StringBetween($sline, $Find, $Before) MsgBox(64, "Found", "The string is *" & $Found[0] & "* ", 5) ExitLoop EndIf WEnd #EndRegion --- IE-Builder generated code End --- This cannot find my specified characters, nor do I have any idea how to implement the rest of my script. Any help would be appreciated. Link to comment Share on other sites More sharing options...
Bert Posted February 25, 2008 Share Posted February 25, 2008 This is the second post in 20 minutes on this subject? Are you the same as the last one? Read post: http://www.autoitscript.com/forum/index.php?showtopic=65120 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
uPod Posted February 26, 2008 Share Posted February 26, 2008 Well first off if that is how you could bypass that captcha than you can find all that from the helpfile. If you had too you could get auto it to search in the source HTML. But why would you want to bypass a captcha? Link to comment Share on other sites More sharing options...
Thetan Posted February 26, 2008 Author Share Posted February 26, 2008 This is the second post in 20 minutes on this subject? Are you the same as the last one? Read post: http://www.autoitscript.com/forum/index.php?showtopic=65120I feel like these are two completely different posts actually. In the other post the user is asking completely mundane questions without actually knowing how to bypass the CAPTCHA, whereas I have asked somewhat specific questions and already figured out the security flaw in the CAPTCHA. Well first off if that is how you could bypass that captcha than you can find all that from the helpfile. If you had too you could get auto it to search in the source HTML. But why would you want to bypass a captcha?I am having a hard time understanding your reply. I think what you mean is that, If I can find the security flaw than I am able enough to use the helpfile and figure it out for myself. Secondly I do want AutoIt to search in the Source, I am just having trouble finding the right command to do that. The helpfile is not very specific. The reason I want to bypass the CAPTCHA is to automate a proprietary voting system.Anyways, I am doing better with the code at this point but I still have a lot of questions. Anyone willing to offer insight?I will chat it up on AIM or ICQ also if someone is willing.AIM: hollywood3ndingICQ: 151090902 Link to comment Share on other sites More sharing options...
uPod Posted February 26, 2008 Share Posted February 26, 2008 I didn't mean for it to sound like that, sorry. There are a couple of things you could do, I'm pretty sure there are some functions to search the source, I can't think of any. You could always make the script open up the source of the current page and search it there. It's more work but it should do the job if it's your last resort. Thats all I can think of right now, I'm tired... Link to comment Share on other sites More sharing options...
Thetan Posted February 26, 2008 Author Share Posted February 26, 2008 Thanks for the reply, I may resort to that. I thought that the code I have would work, I am not sure why it doesn't, does the IEBodyReadHTML function not read HTML? Am I using the complete wrong function? Also is it possible that I can use _IEImgGetCollection and store only the last four characters of the img src into a variable, or just say read after " " and store that as a variable? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now