User Control Panel
Advertisements

HELP US, HELP YOU!

Make a bot that clicks on a button every hour

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Ideas
View unanswered posts
Author Message
superninja
Newbie
Newbie


Joined: 05 Feb 2008
Posts: 4


PostPosted: Tue Feb 05, 2008 5:45 pm    Post subject: Make a bot that clicks on a button every hour Reply with quote

I'm a newbie that really would like to make a bot, Ill just start with explaining how I want this one to work:

It sould press a button every hour then wait till the website is fully loaded, and then it would press it again. And after that just wait another hour. I just wonder if this is possible to do without scripting? I tried to read some tutorials but I really think this is very much for a newbie to get into, so I thought Id just ask here if someone maybe take the challenge? I dont think its too hard to do?

Also I wonder if there is programs that I can just "show" the program what button it is, and then choose how often and for how long, how many times, etc it would press it. Also other things. Is there any programs that have close to those functions?
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Tue Feb 05, 2008 10:14 pm    Post subject: Reply with quote

What are you trying to do? Cheat on a "top sites" site?

Generally speaking, the button doesn't need to be clicked on at all; you just need to make your script go and do what the button itself is doing: make a request, submit some data, etc.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
superninja
Newbie
Newbie


Joined: 05 Feb 2008
Posts: 4


PostPosted: Wed Feb 06, 2008 1:52 pm    Post subject: Reply with quote

What I would like it to do is to press the button "Attack!" every hour.. hehe, is there anyone that can do that? dont think it should be too hard?
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Wed Feb 06, 2008 2:11 pm    Post subject: Reply with quote

It's not that hard. We are talking about a button on a web page, right? Generally you just make a script to submit a form then.

Example:

Code:
<!-- this is the web page you wanna submit the form on -->

<form name="logn" action="/login.cgi" method="post">

<b>Username:</b>
<input type="text" size="30" name="user"><br>

<b>Password:</b>
<input type="password" size="30" name="pw"><br>

<input type="checkbox" name="remember" value="yes" id="rm">
<label for="rm">Keep me logged in.</label><p>

<input type="submit" name="submit" value="Log In">

</form>


Then...

Code:
#!/usr/bin/perl -w

use LWP::UserAgent;

my $agent = new LWP::UserAgent;
$agent->agent ('Mozilla/4.0 (Compatible; MSIE 6.0; Windows NT'); # forge a user agent

# Post the form.
my $request = $agent->post ("http://site.eu/login.cgi", {
   user => 'Soandso',
   pw   => 'my_passw0rd',
   remember => 'yes', # checked the box, lol
   submit => 'Log In', # if the submit button had a name/value, pass it too
});

# Request sent. Success?
if ($request->is_success) {
   # Get the src code of the page that login.cgi returned.
   my $src = $request->content;
}


Look into LWP::UserAgent. It's powerful.

On a more moral note, don't do this if your intention is to hit a site that has policies that say "NO AUTOMATED BOTS!" or anything of that extent. You're likely to get yourself in trouble if you're making something like this in order to cheat at anything or give yourself an unfair advantage by automating requests through a bot.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Wed Feb 06, 2008 8:20 pm    Post subject: Reply with quote

To clarify,

View the source code of the page that contains the button you want. Find out which <form>...</form> tag the button is inside of. Note the <form>'s action and method. Read through the HTML code and look for the names of all the <input>, <select>, and <textarea> objects. Note their values where appropriate.

Then, use LWP::UserAgent to request the 'action' that you got from the <form>, using the 'method' from the <form> (ex. GET or POST), and send a hash reference that contains all of the names you got out of the form's fields along with some values to place into those fields.

But since it looks like this is all just an effort to cheat at an online game, I'm not going to hand the code to you. You seem to lack even a very basic understanding of the HTTP protocol, much less Perl itself. I've handed you all the information you need; figure it out.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
superninja
Newbie
Newbie


Joined: 05 Feb 2008
Posts: 4


PostPosted: Wed Feb 06, 2008 9:37 pm    Post subject: Reply with quote

okey thanks alot! really great Ill look into it and see how this goes! hehe

again thanks alot:P
Back to top
Teario
Member
Member


Joined: 25 Jun 2004
Posts: 130
Location: Liverpool(home) or Derby(uni), UK
Reputation: 59.8
votes: 3

PostPosted: Mon Feb 11, 2008 2:04 pm    Post subject: Reply with quote

I find it a lot faster to use wireshark and click the button yourself, then just examine the output. Helps for sites which have nasty redirects and stuff. Also, it sounds like youre trying to cheat on some browser based game (outwar or similar?) so bear in mind they might have a captcha or similar system in place and you could get banned from the site (I found this out when I wrote a bot to add every single person on myspace to my friends list Confused) after 40 invitations, I had to enter the numbers shown in a box every 3rd invitation, then after about 80 of those they just banned me.
Back to top
dinnerbone
Member
Member


Joined: 07 Mar 2004
Posts: 136
Location: UK
Reputation: 54.3

PostPosted: Mon Feb 11, 2008 3:45 pm    Post subject: Reply with quote

Teario wrote:
I find it a lot faster to use wireshark and click the button yourself, then just examine the output. Helps for sites which have nasty redirects and stuff. Also, it sounds like youre trying to cheat on some browser based game (outwar or similar?) so bear in mind they might have a captcha or similar system in place and you could get banned from the site (I found this out when I wrote a bot to add every single person on myspace to my friends list Confused) after 40 invitations, I had to enter the numbers shown in a box every 3rd invitation, then after about 80 of those they just banned me.

Trying to become the next tom? Razz
Back to top
zander
God Like
God Like


Joined: 14 Jan 2004
Posts: 540
Location: england
Reputation: 66.6

PostPosted: Mon Feb 11, 2008 11:15 pm    Post subject: Reply with quote

tom doesnt own it no more Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Ideas All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group