Lack of interest Limit/throttle likes

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Kent

Active member
It's reasonable that someone may end up liking many posts quickly.
It's not reasonable that someone may like 100 posts within a minute.

Tested on XenForo 1.1.5 without any addons enabled.

A reasonable throttle should be added to prevent something like...
Code:
use warnings;
use strict;

use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->agent('SpammerBot/1.0');
$ua->max_redirect(0);

my $xf_path = 'http://xenforo.deb.vm/';
my $xf_session = '5422ff207bb42d1afc5f289cfbe37f09';
my $xf_token = '136462,1372048715,b45f5397626599cadfcfe566ed4f00e5efa9f955'; # valid for 24 hours(?), session agnostic

$ua->default_header(
    'Cookie' => 'xf_session=' . $xf_session
);

my %params;
$params{'_xfToken'} = $xf_token;

my $like_target = 'posts'; # posts, profile-posts
my $post_id     = 1;
my $max_post_id = 100;
my $step = 10; # update interval
my $pass = 0;
my $total = 0;

my $max_post_id_length = length($max_post_id);
my $step_length = length($step);
my $progress = "Progress: [ %".$max_post_id_length."d / %".$max_post_id_length."d ] Pass: [ %".$step_length."d / %".$step_length."d ]\n";

while($post_id++ < $max_post_id) {
    my $response = $ua->post($xf_path . $like_target . '/' . $post_id . '/like', \%params);

    $total++;
    if ($response->code == '303') { # "See other" redirect assumes success
        $pass++;
    }

    if ($post_id % $step == 0 || $post_id == $max_post_id) {
        printf($progress, $post_id, $max_post_id, $pass, $total);
        $pass = 0;
        $total = 0;
    }
}
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Top Bottom