📜 ⬆️ ⬇️

We look part of someone else's favorite VKontakte


Images from the film "50 shades of gray"

This time, using a simple piece of javascript code, let's take a look at the mysterious depths of human preferences. Namely, we get a part of the list of bookmarks (“likes” of community entries) of the VK account.

According to wordstat.yandex.ru , up to 2,000 times a month, a search robot is asked "how to see who likes what." The answer to the search results is a LikeCheker virus program, which doesn’t actually answer the question. And we will answer.
')
Why do you need it? If you believe the Internet (and it is better not to believe), for example, the handwriting of a person can determine his character. for example
Sarcastic people can be recognized by writing the letter "e." The more unusual the image of the points placed above this letter, the sharper his sense of humor and brighter his ability to imitate.

I have an assumption that using pictures and posts that a person “likes” can build a more accurate portrait of a person than according to his handwriting. However, to get this information you need to work a little.

Description of the situation


In contact with


Previously, information about what records the user notes heart was completely confidential and visible only to the user. After another redesign, privacy is gone. If user A is a friend of user B and they are subscribed to the same community, then he can find out if user B has “liked” under a specific record of this community.

In the case of the VK.com desktop version, the information that user B “liked” her is displayed in the form of his avatar, if you hover your mouse on a heart:


Formulation of the problem


Our goal is to get a list of records that the user has marked with a heart. I don’t know whether it is possible to get to this information using VK API (I didn’t find such an opportunity through a quick glance through the documentation), we will go in a simple way - through a browser.

So, in order to get a list of someone else's favorites, we need:


With the first paragraph, everything is clear, the second and third will be automated.

To business


In order not to touch real-life friends, let's register two accounts and make friends with them.
Spend 30 rubles, buy two virtual sim cards (without a phone, VK does not register) and register heroes of the film “50 shades of gray”:



We use Gray's account as usual - we manually subscribe to different communities and mark various posts in the tape with “likes”.

From the account of Anastacia, we start the hunt for "Likes". Javascript will help us today. You can use bookmarklets, you can make Google Extension. We will go in a simple way, through the Developer Console (F12).

1. Get the list of communities on the victim's page:

var x = document.getElementsByClassName("module_body clear_fix"); for (var i = 0; i < x[1].children.length; i++) { console.log(x[1].children[i].children[0].children[0].href + " " + x[1].children[i].innerText) } 

2. You can subscribe to them like this:

 document.location="https://vk.com/sci"; document.getElementById("public_subscribe").click() 

3. Open the news feed and scroll n times:

 document.getElementById("show_more_link").click(); 

4. Bruteforce entries in the tape:

 var z = document.getElementsByClassName("post_like _like_wrap") for (var k= 0; k< z.length; k++){ z[k].onmouseover(); z[k].focus(); } var y = document.getElementsByClassName("like_tt_owners me_hidden _content") for (var j= 0; j< y.length; j++){ for (var i = 0; i < y[j].children.length; i++) { if (y[j].children[i].title == " "){ console.log( "https://vk.com/feed?w=wall" + z[j].onmouseover.toString().split("'")[1]); } } } 

Result:



Success!

Conclusion


“It's not a bug - it's a feature” say you and maybe I will agree with you, but I would like to see in the privacy settings a tick off such a “feature”.

Of course, this information is not directly so personal and difficult to use against a person. Nevertheless, I am sure that there are cases when such an analysis, in addition to something, will either independently help one to understand a person’s thoughts, his character, political, religious views and so on. I repeat - not for everyone and not always.

Source: https://habr.com/ru/post/316562/


All Articles