
Idea
The idea was to write an automatic contact liker that would have liked everything and would not require our presence at the computer.
Professional SMMs will understand, and the rest why this is necessary, I will explain at the end.
What were the successes?It was possible to write the posts of the user / group page without a ban, in large quantities.
Managed to write a news feed flicker.
And one more interesting implementation, but it is more often relevant to users with a large number of subscriptions> 1000: only the newly arrived news is liked in the news feed.
')
How it works?We manually go to the victim, scroll down to download the required number of posts and insert a small js-code into the console. Or go to the news vk.com/feed, run the code and it only likes new posts or all downloaded, if necessary.
Code (like only new posts in the feed):(function () { var e = document.createElement('script'); e.src = '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js'; document.getElementById('system_msg').appendChild(e); }()); var func_prevClass = '', func_checkPostTimer; func_checkPostTimer = setInterval(function() { var func_curOb = $("#feed_rows .feed_row:first"), func_curClass = func_curOb.find(".post_like.fl_r").attr("onclick"); if (func_curClass != func_prevClass) { func_curOb.find(".post_like.fl_r").trigger("click"); } func_prevClass = func_curClass; }, 45000);
What's going on here?First, we load the jQuery library, and with different inserts, if we do it with the rest of the code in one insert, the library will not have time to load, and the code on jQuery will start to run and will not work. Next, I'll tell you how to get around this.
In the main part of the code, a timer is started, which every 45 seconds checks for a new post, if the post is like it by forcing the
$ .trigger event (“click”) , clicks on the item on which the contact developers have kindly hung up onclick event handling call the like method, the wall object with the necessary parameters.
It is worth paying attention that 45 seconds are suitable only for me and depend on the activity and the number of users to which you are subscribed. In my case, it turns out that some posts do not like, i.e. there are more than one of them in 45 seconds, and the code only likes the first one. When likes
all posts, you will be banned due to performing the same type of actions, checked!
And yet, the program can be left for the whole day, there will be no ban.
Aggressive flaking
The following method can probably be called more aggressive. He likes at once all the posts on the page of the user or group, but in a different order and not instantly, but with a different delay. This is especially fun when the victim is online.
Code (all user / group posts): function shuffle(o) { for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }; var workArray = shuffle($("#page_wall_posts .post_like.fl_r")), curTaskElement = 0; function triggerCurElement() { if (curTaskElement >= workArray.length) { alert(" !"); return false; }; var rand = Math.floor(Math.random() * (4100 - 1550 + 1)) + 1550; $(workArray[curTaskElement]).trigger("click"); setTimeout(function() { curTaskElement++; if ($(".box_body .captcha").size()) { var me = $(".box_body .captcha").parent().parent().find(".box_controls_wrap .button_blue"); me.click(function() { triggerCurElement(); }); return false; } triggerCurElement(); }, rand); } triggerCurElement();
Half of the code here is aimed at fighting the ban. We collect an array of posts, mix it using the shuffle function, then click on all the elements of the array, in the same way. You should also pay attention to the fact that between clicks different times, this is also done in order to combat the ban.
By the way, I almost forgot. It turns out that with a large number of likes, the captcha can also come out and here it is taken into account. When captcha is detected, the huskies stop, and an event is placed on the check button for the captcha, which again starts the varnish function.
That's all. Our API
To get rid of multiple inserts and work with large code, I put my code and jQuery library in one file and got something like my API:
(function () { var e = document.createElement('script'); e.src = '[REQUEST]'; document.getElementById('system_msg').appendChild(e); }());
requests:
// likes all uploaded posts on a wall or in a group
http://funcbook.com/js/api/like/wall
// likes all uploaded posts in the news feed
http://funcbook.com/js/api/like/feed
// likes only the first post in the news,
// when a new post appears in the feed, it also likes it and so on to infinity
http://funcbook.com/js/api/like/feed_new
Why all this and how did I come up with this idea?
I showed my work to several friends and they all asked the same thing: “What is the point, why?” But no, one of my friends, he is more a programmer of those whom I showed this, he was very surprised and didn’t use his mind how such an idea came to me, how such ideas even come to mind. I also have an idea, here's the game in
0xy 0 lines of JS-code, I understand.
I will answer this article and the last surprised.
Damn my leg pulled and I went to the course for start-up entrepreneurs from
yurylifshits Earlydays in his city, Kaliningrad. By the way, I do not regret, I got a lot of useful things and met a person there, an SMM guy who just pushed me to write a JS-like contact person.
In general, you can write such likes, as it turned out after the first implementation of the code, for any site, it is very easy! The main thing is to understand the goal.
So, that SMM's man told me about how they promote companies in instagram. They like using the API, for example, 10,000 users, according to statistics, 25% subscribe to the public from which likes came, this is of course all abstract. And I wanted to make such a tool for myself, VKontakte, and I wrote it, or rather, I took the first step to writing it and achieved a lot already.
All the code was written much faster than this article, I received my first ban 30 minutes after the start of writing the code. For me, as probably many programmers, writing in a programming language is much easier than expressing my thoughts in such articles.
All of the above is not so useful and is more fun, in the future the code itself will go through all the pages, search for likes, accumulate them and defer to call, this will be more useful.
Thanks for attention.
UPD: at the request of the minus, changed the principle of work delay'la. Replaced your really not justified, to setTimeout. Thanks
mayorovp for the
comment .