![](http://habrastorage.org/getpro/habr/avatars/6f8/36c/52a/6f836c52aea93df2cc56eedf9ba2902d.png)
Synthesizing a panacea. Together
![](https://habrastorage.org/getpro/geektimes/post_images/70f/19c/1fa/70f19c1fa7d258190c4d538ecc27129c.jpg)
... Having received a new message from my friend, I was a little surprised - we rarely communicate. Opening it, I was even more surprised:
Hello! How are you? I got sick, the temperature is 39, I can’t get out of nowhere, I don’t even know if you can ask such a request. Please go now, buy a recharge card to Kyivstar for 100 hryvnias, come back and immediately send me a recharge code here, otherwise I have 0 in my account - no connection ... I have a very high temperature, I will give the money on Monday, can you help?
Of course, I have honest rules and helping a lady is a sacred matter, especially if you can replenish your account through WebMoney without stopping from the monitor. But one hundred hryvnias (≈ $ 12) made me wonder - we are not so familiar with it so that from the spot we ask to replenish the account. A logical question arose: how neatlyFind out if an account has been hacked or not. Moreover, even if the account is hacked, an attacker can be at the computer and manually conduct a conversation without relying on ICQ-bots. On the other hand, conscience dejectedly kicks consciousness on the subject: “What if she really doesn’t feel good and are you showing off here?” Of course, the strategy of a “sick person” who cannot answer questions and constantly cries, they say, come on faster, to me so hard, very successful. But too often, VKontakte accounts are stolen to be careless in such matters.
Therefore, the formulation of the problem is as follows: how to determine for the least number of calls to the interlocutor:
- whether we are dealing with a program or with a person
- is this the person from whose account the message came
In particular, I was lucky - I probably know that the information issued by the bot to me as known only to me and the other person is not known to the latter. Adding to this a certain “community” of answers, I concluded that I was dealing more with a bot than with a living person, my friend. But conscience is not reassured, but requires strong evidence.
Therefore, I propose to develop an algorithm for conducting such a conversation, which allows with a high degree of probability (in fact, at least more than 50%) to give an answer with whom we are dealing with - with a known interlocutor or with an attacker / bot.
You can consider as input the message from your friend containing some request (usually everything depends on money).