Jeagr 1 Posted February 7, 2012 Report Share Posted February 7, 2012 (edited) Hey everyone. I am trying to create a bot that copies my random WordPress admin password and saves it to a file. Saving it to a file I can do, but scraping the value is driving me crazy. Can anyone help? Here is a pic of my final build: http://screencast.com/t/m5dT6B8YpqMR I want to scrape that password and save it to a variable that I can then manipulate. When I try to scrape the text, it saves that specific test text instead of the random text that appears on each WordPress build. Any ideas on what to do next? Also, using scrape attribute, here is the code I can isolate. So I need the password only out of here: <innertext="Success!Username adminPassword 4aMAnUzApaNote that password carefully! It is a random password that was generated just for you. It has also been emailed to you. "> Edited February 7, 2012 by Jeagr Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted February 7, 2012 Report Share Posted February 7, 2012 Hi, You can try it using regex. Something like this:set(#html, "Success! Username admin Password 4aMAnUzApa Note that password carefully! It is a random password that was generated just for you. It has also been emailed to you.", "Global") set(#password1, $find regular expression(#html, "Password .+"), "Global") set(#password1, $replace(#password1, "Password ", ""), "Global") Quote Link to post Share on other sites
JohnB 255 Posted February 7, 2012 Report Share Posted February 7, 2012 Here are two methods and a video showing how: http://screencast.com/t/G7DniXCETWei Code: set(#pw, $scrape attribute(<id="dialogPassword">, "value"), "Global")set(#pw2, $trim($replace($scrape attribute(<tagname="b">, "innertext"), "admin", $nothing)), "Global") John Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.