plainblack.com
Username Password
search
Bookmark and Share

WccAutoVote

Whoa! Last day to enter the "Best Workflow Activity that Integrates with an External Service" contest and nobody has submitted anything!

Ok, here's something fun..

Let's choose someone else's WebGUI site as the External Service to integrate with. For example.. a Poll on somebody else's site... say... the community contest poll on webgui.org/wcc?  

:evil-grin:

Install this workflow on your own wG site to:
* Connect to an external wG site of your choosing (customisable in the options as "Site URL", say.. www.webgui.org)
* Register a new user on that site. The workflow starts by trying to register "autoVoter0" and then increments the index until it finds an unregistered name, eg. autoVoter1, autoVoter2, ..
* Login to the site as the new user and pull up the poll page (customisable in the options as "Poll URL", say.. www.webgui.org/wcc)
* Vote for the poll answer of your choosing! (customisable in the options as "Answer", say.. whichever entry you want flood in some votes for)

If you decided to run the workflow every minute or so off your own site... well you might be able to influence the votes slightly..
(and if you wanted to be really evil you could put your URLs through an anonymiser so that each vote would come from a unique IP)

The Deets
* The code depends on WWW::Mechanize (which you will need to install via cpan with the command "install WWW::Mechanize")
* We're basically site-scraping here so the code is dependent on the wG templates being used. I tested on the default wG tempaltes.
* We're also dependent on "Allow Anonymous Registration" being turned on and Capcha turned off (both of which happen to be the case on webgui.org....)
* Everything is logged to the wG errorHandler so you can see exactly what the workflow is doing step-by-step (and the reasons for any breakages)  

Sample Output
INFO Log::Log4perl::Appender::log[182] Running with settings:
INFO Log::Log4perl::Appender::log[182] Site URL: http://mysite.com
INFO Log::Log4perl::Appender::log[182] Poll URL: http://mysite.com/mypoll
INFO Log::Log4perl::Appender::log[182] Answer: a1
INFO Log::Log4perl::Appender::log[182] Try to create an new user called: autoVoter0
INFO Log::Log4perl::Appender::log[182] Opened Create Account page
INFO Log::Log4perl::Appender::log[182] Found first form on page
INFO Log::Log4perl::Appender::log[182] Set username field
INFO Log::Log4perl::Appender::log[182] Set pasword field
INFO Log::Log4perl::Appender::log[182] Set pasword confirm field
INFO Log::Log4perl::Appender::log[182] Set pasword email field
INFO Log::Log4perl::Appender::log[182] Submitted form
INFO Log::Log4perl::Appender::log[182] Username already in use, try again!
INFO Log::Log4perl::Appender::log[182] Try to create an new user called: autoVoter1
INFO Log::Log4perl::Appender::log[182] Opened Create Account page
INFO Log::Log4perl::Appender::log[182] Found first form on page
INFO Log::Log4perl::Appender::log[182] Set username field
INFO Log::Log4perl::Appender::log[182] Set pasword field
INFO Log::Log4perl::Appender::log[182] Set pasword confirm field
INFO Log::Log4perl::Appender::log[182] Set pasword email field
INFO Log::Log4perl::Appender::log[182] Submitted form
INFO Log::Log4perl::Appender::log[182] Username already in use, try again!
INFO Log::Log4perl::Appender::log[182] Try to create an new user called: autoVoter2
INFO Log::Log4perl::Appender::log[182] Opened Create Account page
INFO Log::Log4perl::Appender::log[182] Found first form on page
INFO Log::Log4perl::Appender::log[182] Set username field
INFO Log::Log4perl::Appender::log[182] Set pasword field
INFO Log::Log4perl::Appender::log[182] Set pasword confirm field
INFO Log::Log4perl::Appender::log[182] Set pasword email field
INFO Log::Log4perl::Appender::log[182] Submitted form
INFO Log::Log4perl::Appender::log[182] Opened polling page
INFO Log::Log4perl::Appender::log[182] Ticked vote option
INFO Log::Log4perl::Appender::log[182] Submitted voting form
INFO Log::Log4perl::Appender::log[182] Voting seemed to succeed!
INFO Log::Log4perl::Appender::log[182] Finished.

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
DownloadWccAutoVote.pm WccAutoVote.pm
LinksNo Support Offered
Screenshotsscreenshot.png
Statistics Downloads: 444
Views: 2487
Rating: 0
Updated: 8/31/2007
Keywords miscellaneous
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved