Ask.fm is a twitter knock-off constructed around the gimmick of "asking questions" instead of the gimmick of "only 140 characters", but otherwise the same stale old "social media" dysfunction.
It was made originally by some reasonably cool people from outside the bezzleworld, and it was reasonably well run for as long as that lasted. Sadly, it got "new ownership" recentlyi, and as it triumphantly informs the casual visitor at every turn, "new Terms of Service" and whatnot to come into effect next month.
Well, that's all fine and dandy. Allow me to share a few items then :
Part 1 : Question posting bot.
-
<?
$user = array("name1", "name2");
define('SETUSERAGENT', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)');
function echow($text) {
if (isset($_SERVER{'TERM'})) echo $text . "\t\n"; else echo $text . "<br />";
}
function getToken() {
$a = curl_init("http://ask.fm/youruser");
curl_setopt($a, CURLOPT_USERAGENT, SETUSERAGENT);
curl_setopt($a, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($a, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($a, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($a, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($a, CURLOPT_MAXREDIRS, 10);
curl_setopt($a, CURLOPT_REFERER, 'http://ask.fm/');
curl_setopt($a, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($a, CURLOPT_HEADER, FALSE);
curl_setopt($a, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($a, CURLOPT_SSL_VERIFYHOST, 2);
$wynik = curl_exec($a);
curl_close($a);
$patt='#<input name="authenticity_token" type="hidden" value="(.*)" />#';
preg_match_all($patt, $wynik, $token);
return $token[1][0];
}
function login($login, $password) {
$token = getToken();
$curlchanel = curl_init("http://ask.fm/session");
curl_setopt($curlchanel, CURLOPT_USERAGENT, SETUSERAGENT);
curl_setopt($curlchanel, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($curlchanel, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($curlchanel, CURLOPT_HEADER, 0);
curl_setopt($curlchanel, CURLOPT_TIMEOUT, 6);
curl_setopt($curlchanel, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($curlchanel, CURLOPT_POSTFIELDS, trim("authenticity_token=$token&login=$login&password=$password&follow=&like=&back=&authenticity_token=$token"));
$wynik = curl_exec($curlchanel);
if ($wynik != 1) {
echow("Unable to login");
die;
}
curl_close($curlchanel);
}
function ask($question, $user) {
$token = getToken();
$curlchanel = curl_init("http://ask.fm/$user/questions/create");
curl_setopt($curlchanel, CURLOPT_USERAGENT, SETUSERAGENT);
curl_setopt($curlchanel, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($curlchanel, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($curlchanel, CURLOPT_HEADER, 0);
curl_setopt($curlchanel, CURLOPT_TIMEOUT, 6);
curl_setopt($curlchanel, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($curlchanel, CURLOPT_POSTFIELDS, trim("authenticity_token=$token&question%5Bquestion_text%5D=$question%3F&question%5Bforce_anonymous%5D=&authenticity_token=$token"));
$wynik = curl_exec($curlchanel);
if ($wynik != 1) {
echow("Unable to login");
die;
}
curl_close($curlchanel);
}
login("youraccount", "yourpassword");
foreach ($user as $u) {
ask('Ever heard of Bitcoin ( http://trilema.com/BitcoinNew ) ?', $u);
echo "asked :",$u,"<br />";
if ( ($cnt % 100) == 1) mail('your@email',"Script ask.fm", $u." ".$cnt);
sleep(3);
$cnt++;
}
?>
Part 2 : Account name harvester.
-
wget -q -m --no-check-certificate -U "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.9.1.16) Gecko/20110929 Firefox/3.5.16" http://ask.fm/ -O askfm1.txt
(This one lets you download the front page.)
grep "a href" askfm1.txt | sed 's/a href="\//xXxXx/' | sed 's/\//\n/g' | grep "xXxXx" | sed 's/xXxXx//' | sort -u > askfm1-b.txt
(This one processes the downloaded front page into usernames, one per line)
wget -q -R "jpg,gif,jpeg,png,css,scss" --ca-directory=/noexist --no-check-certificate --follow-tags=a -U "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.9.1.16) Gecko/20110929 Firefox/3.5.16" -i askfm1-b.txt -O askfm2.txt
(This one uses the names to download their pages, into a bundle. Repeat the step above and this one until you're sick of it. Generally after about 250k or so accounts harvested you see diminished returnsii.)
To use, you take the names produced by 2 and dump them in the $user array in 1. You can run 1 on any php-enabled host, if you're poor, or else you could just buy a proxy list (in which case, might as well translate the whole thing to python or whatever). Enjoy!
And yes this does mean I've been exposing however many million mostly underage, mostly Spanish speaking chicks to the brave new world awaiting them. The results were mixed, but next time you consider paying for "online exposure", buying "traffic", hiring "experts", "advertising online" and so on and so forth, think about this : the only reason I'm not getting another million uniques this month is that I can't be bothered to. How much are you paying per million ? Because you're paying too much by that much, if you catch my drift. O, wait, you're buying per thousand aren't you. Fraction of a thousand ? Well... on the positive side they say you're among the named inheritors for the Kingdom of Heaven.
It doesn't cost me anything, that extra million, and I'm not even an expert in the field, I'm just dicking around for ideological reasons. Unless you're absolutely fucking retarded you can simply write your own traffic figures. You know the old days of "Information Superhighway" and all that blabla ? Back when people threw a few html pages up on a free host somewhere and added a "counter" ? Which they could set to anyting they felt like ? Well, guess what ? Yeah, nothing's changed. Nothing will change. It can't, for fundamental reasons, okay ?
The supposed "media" outlets actually do exactly this. Perhaps not quite as efficiently, perhaps taking all sorts of careful precautions and sprouting forth thick clouds of hypocritical pretense - as thick in fact as they can possible make 'em. Sure. But at the end of the day, this is exactly all they do. Which is why Gawker / NYT / whoever else claims however million unique visitors, and whatever reach / importance / whatever the fuck "metrics" they claim, yet Trilema makes more money being online than they do.iii
So :
- Go make up your own traffic figures, it's a worthless pursuit that will teach you a lot about both computers and the human nature ;
- Stop thinking that whatever you don't understand works in the way people who use it tell you it works. Do you think the Spanish conquistadors were actually so fucking stupid as to tell the idiotic indians they were fleecing how shit actually worked ? The business end of the chumpatron is not a good descriptor of the machine in question, get it already.
That'd be all from me for now. Take care.
———- In the shape of a septuagenarian "investor" of the bezzle empire. Seriously, the USG mostly consists of fucking liches, don't you think this arrangement just a little odd ? A bunch of perambulating skeletons on life support, what are they supposed to represent again ?
[↩]
- They claim 200 million membership, of course, but what's in a claim. [↩]
- Actual money. Not faint whiffs of promises predictated on a chance to maybe earn a prize in the future. We're not talking Reader's Digest Mail-in Dollars here, okay ? [↩]