📜 ⬆️ ⬇️

As I opened the Dota-league. Part 2


Start here: How I opened the DotA League. Part 1

The end of 2007, again winter, and again time to develop. We successfully moved the league from the dying Battle.Net to the upcoming Good Game Client (later - Garena). New players come every day, the league is growing, everyone is happy with the lack of cheaters, excellent ping and easy process of starting the game. Players invited their friends to this platform from Battle.net, from local networks and pirated servers - everyone was going to Garena. Cold December made people stay at home and play. The constant online Warcraft players on this platform in the CIS-sector grew from 1,000 to 10,000 players. Very soon, Garena stood in every computer club, and online tournaments were held only on it.
Everything is fine, and we had the only and coolest bot on this planet platform ...


Good game client


The platform was wonderful and unexplored. No one knew exactly how it works, and what interesting things you can dig into it. Since I was the only decision maker, I started thinking about the future:

- where to find money and sponsors? How to find them, and where to look?
- where to further develop the league?
')
A simple and brilliant idea came pretty quickly - you need to team up with the best and most recognizable team, and release the league on their behalf! They are PR + sponsors will be delighted for sure, and we will receive gifts from sponsors to reward the winners! The choice immediately fell on the best team of professional players at the time with the daring name SAY-PLZ , especially since it was from Moscow. Found a common language, received approval, renamed the league. The manager of this team promised to beat out each season (3 months) on the 1st video card to the prize for the best league player. It was better than nothing, and we agreed. Moreover, they provided their site as a platform for maintaining the rules of the game, resolving disputes and selecting players.

The League received a new breath, the players felt a new excitement - not only virtual glasses, but also a chance to win the best video card from the sponsor at that time!

Competition


As a full league, we were alone in Garena. There were no competitors. Bot was just with us. This is both good (all the best players are with us) and bad (without competition, it’s hard to say - do you have this kind of online, is it normal or can it be better?). Over time, our old friends from another league asked us to give them the same bot so that they would finally move from Battle.Net to Garena . On the one hand, this would mean that we will have fewer players. On the other hand, it would be an interesting challenge - it will compete with someone! In the end, after a week of reflection, I gave them my program, on an honest word not to give anyone else, adapted their bot to Garena, and so we had a competitor. Looking ahead, I will say that they kept their word, this bot never appeared anywhere, they did not give it to anyone. Part of the players began to spill over between two leagues - if a player was banned for a couple of hours on one (for example, for bad behavior), then he could go play for the second and go back. We didn’t do anything about it, and were neutral to each other - they didn’t climb to us, and we didn’t climb to them, everyone does what he wants, and no one tells the other what to do. So you could take only the best from each other.

Hello, Garena!


Unexpectedly for everyone, the GGC platform is renamed to Garena (from Global ARENA) and a large-scale rebranding is announced:



For the next six months, the people spit and, as soon as they do not call the new platform: Gangrene, Govnoren, etc., but over time, everyone got used to such an incoherent name. The interface style changes from white-yellow-metallic to red-depressive.

It's time to pick it up at last to Garen, and see what you can pull out of it. Unfortunately, I did not know the assembler from the word at all, so I tried somehow to open the service files, to look for some platform resources. So I caught sight of a certain file RoomsEN.dat . In fact, it turned out to be a normal SQLITE database file. Using the program SQLite Expert, I opened the file and found interesting tables: [Rooms], [Servers]

In the Rooms table I was able to find my Say-Plz Dota League Room . This room had its own numeric number, and in the next column server_id , which took a value from 1 to 6.

Looking at the Servers table, I discovered these same 6 servers:


One of them was the server of my room and several (hundreds) other rooms. Those. all rooms Garen'y then located only 6 servers.

Reverse Engineering Garena


Digging further - why is an integer used as an IP address? Where are familiar eye 86.60.90.164 ? I spent more than one evening, realizing that this number (for example 243037643 ) must be represented in hexadecimal form (hex): 0E7C75CB , and then mirrored it: CB.75.7C.0E and represented in decimal form: 203.117.124.14 . Voila, we finally understood how to convert IP into a whole and back (honestly, I googled, but apparently the Google subscription ended). Therefore, we take our 127.0.0.1, present it in HEX: 7F000001 , deploy it back to back: 0100007F , get 16777343 , substitute it into the Database, launch the client and voila! Garena tries to connect to the local 127.0.0.1, this connection is accepted by my program on Autoit, translates all traffic to the real Garena server and simultaneously saves it for analysis. Finally, I received a mysterious traffic that the client sent to the server!

Now I began to receive incomprehensible data in binary form. For the certification, he represented them in HEX, but still could not understand anything. I was embraced by the desire to understand this protocol, what the client is sending! To begin with, I wrote down the command to send the word “Test” to the general chat, intercepted the sent data and saved it. Then I tried to imitate sending this word to the chat, sent it and ... did not see the result - in the general chat my message was not visible. As it turned out later, the message was seen by all users, except me - the Garena client does not display the same messages sent by itself, but shows them itself at the time of sending.

Already had something. This means that the sent string contained encrypted data! In general, I spent 23 hours, without a break in sleep, to sort out this protocol, and finally split this nut, using AutoIt, a calculator and paper with a pen! I have never done anything like this before, and have never studied network protocols, so everything was new to me.

Approximate composition of the package
4 bytes - packet length
2 bytes - data type (entry to room, exit from room, new message
the remaining bytes are the payload, depending on the type of data. If this is a chat message, then there was a message type - public, private, bold. Next came the user ID and message text.

One friend later said that the protocol almost completely repeats the protocol in Lineage II.

It was already lunch, and I did not sleep more than a day. It was time to go to bed, and have a good sleep, I felt that I was on the threshold of a new breakthrough!

I slept a little - so much was the desire to write a new version of the bot that would work without the Garena client itself, and would communicate directly with the server. Another 1 day, and I already had a working prototype. After 2 days, I transferred the bot to the new version - the Garena client was no longer required, the bot began to respond to messages almost instantly (the answer used to take 2 seconds). I did not give up trying to study the protocol, and it turned out that Garena servers do not check at all who the data came from. At all. Absolutely. It was possible to send a package that the user HeLRa wrote to the chat: “Hello”. And it was possible to send to the chat that the user changed the icon from his nickname (there were about 64 different icons available to choose from). This gave me the idea to decorate the chat, to mark players by their rank, or level of access. Administrators were with the coolest icons, moderators for simpler, and all the rest - with the icon of the minotaur.


All users were shocked, what “chaos” was going on in our room (channel), but it was our channel, and in general, everyone was happy with everything. About a week later, some people with blue nicknames came to us often - it turned out that these were the global administrators of Garena. They came in, grumbled softly, why are we here boundless, but since such a “hack” was only in one room (and not across the entire garene), then there were no consequences, and after a couple of weeks they fixed this bug, along with the vulnerability of sending a message on behalf of another user.

Joining the league


As early as March 2008, our league has the coolest bot, we constantly have games at a very high level, and the forum has a bunch of Vouch-requests hanging (requests for joining the league).

Previously, to get to our league, the player had to post his short summary - in which teams he played, how long he plays, who is his favorite character, and attach the record with his best game, where he sweated and tried. After some time, his application was considered by some moderator and made a decision whether it was worth our league or not. Over time, there were so many applications that the moderators could no longer cope, and recruiting more moderators meant losing control over all this. Therefore, we changed the scheme, and now, to get to the league, you had to get together on a certain day at a certain time, and fight with others who want to get to the league ( selections, test game ). Behind all this live watched moderator, and noted the most useful players who should give an invitation.

This scheme allowed the moderator, instead of viewing the hourly replay, at a time to consider 10 candidates at once, and invite 1-3 people (and sometimes no one). It was noted both the personal skill of the game and the game as a team: sometimes a player would start to emerge: “how is it that I killed the most, I had the strongest and most swinging hero, but you did not give me an invitation!” he was told that the whole game quietly rocked the hero aside, while the rest of the team somehow fought off the attacks of the enemy, and after 30 minutes of calm swinging - this hero was naturally the strongest, and if not a strong team, then they would have lost much earlier.

Recruitment to the league was like joining the Fight Club - people had to prove they were worthy.

How else sometimes taken
Sometimes moderators would add players without a test game, especially when their best friends swore that this player is worthy and vouches for it!

In DotA, everyone loves to be the most assassiners, and there are far fewer players who like to play helpers (support) who only help their more formidable heroes to kill. If the whole team plays for the killers, it will certainly lose, because no one will help them. And since our league was quite strong, and the players most often liked to play for the killers. For this reason, at the selections, the moderators were very positive towards the players who helped the team very much during the whole game, and even if the player’s kills / deaths are negative, they could also issue an invitation as a useful player. An experienced moderator's eye immediately sees good helpers.

When you are the most important person in the league, and you are very young, and hundreds of people are asking for a league, and the other asks you to give them an admin, then willy-nilly, you have a star disease. She struck me too. It is a shame to write about it, but without this side of the medal, the whole story will not be complete: I have become the most evil and merciless administrator. When I sat down to play in my league, they were afraid to play with me. If someone in the team was stupid (on purpose, or not), then I could write a ban to him (temporarily) during the game, or even kick him out of the league! Just that he was not at the right time in the right place. Over time, it even came to the point that if I entered the game, most of those who entered immediately canceled their registration, and no one wanted to enter, because they were afraid to enter. I became a little more cunning and began to use other accounts, under which no one knew me, but I still wrote out bans. On the one hand, I created the coolest league, and on the other, I destroyed it myself ...

The league took all my time - I was constantly thinking about improving the bot, league, rules, and everything I could improve. The league was my life, my brainchild. I drank, ate and slept at the computer, read the chat, studied user behavior and their mistakes, and made the bot even easier and clearer.

About money


Over time, I was increasingly visited by the thought: How can I make money on it? I didn’t want to corrupt the league by “unbanning for money” or “inviting for money”, so I was looking for new opportunities.

Sponsors were rather scarce, and gave only a video card every 3 months.

In the Garena platform, it was possible to pump your account by purchasing a “Gold Account” - your nickname became orange (gold), and you could go into almost any room, even if it was full. Here you can only buy it only through PayPal. At that time, many didn’t even have plastic cards, and WebMoney was the most popular payment system (Yandex.Money just appeared, so it doesn’t count). It was impossible to buy a Gold Account for WebMoney, and so I became an intermediary - I bought Gold Accounts in Garena, and sold them for WebMoney with a surcharge. I wrote a second bot, which went to all the CIS-rooms in Garena and gave a short advertisement about the sale of the Gold Account. In a month it was possible to earn up to 2 thousand rubles. The difference between 0 and 2000 was huge, and I felt that I could “earn money easily on the Internet.” From time to time people wrote to me who wanted to buy a Gold Account, but who doubted whether I could be trusted. My most weighty argument was that I was the chief administrator of the DotA League, and I have been selling accounts for a long time. People trusted, bought, came again.

The ability to sell virtual goods to people in a virtual online chat was very useful to me. When I finished university, I got a job in a large company selling services. It was much easier to sell live than in the faceless ICQ chat.

New supplier


Already the summer of 2008 is already full, some kid writes me, who can sell me Gold Accounts 2 times cheaper. I did not ask questions, and just started buying them from him, increasing my profits. As it turned out later, he bought stolen plastic cards on hacker forums, and bought Gold Accounts for them. And he was not alone. The administration of Garena took action, and banned all users, except the moderators of the garena sections, from sending out items. Now neither I, nor he, no one could send items, and the shop hid behind itself (for a while). Fortunately, my friend had an account of the moderator of the garena section, so that he could send items, and I started purchasing and sending GoldAcc through him already.

After some time, this same supplier again writes to me, who made a good profit on these frauds, and offered me a deal that I couldn’t refuse - he would buy from me the access of the league moderator for a pretty impressive money for those times

how much?
quite a lot for a student, but very little for an adult.

It is very difficult for me to explain this, but we had a “league of gentlemen”, we did not have to sell something, for example, sell access to a league, or promotions. We had a principle - " if you deserve - you will be with us ."

But then I went to violate this unwritten principle, and some moderators and administrators began to condemn this act, saying "sold out." For my part, I considered myself to have the full right to distribute access to those people whom I considered necessary, and considering my contribution, which I made to the league by creating it from scratch, I did not consider it necessary to report to someone. It was the beginning of the end ...

Look after the server


At that time, in addition to my studies and the league, I had time to work as an incoming administrator in a small government office. They had unlimited internet and a small server, on which I next door and placed my bot. Having successfully closed the session, I went on vacation to my native lands, where everything was very bad with the Internet. In order for the league to live, I asked the most technically-trained admin B to look after the bots, and restart them if that.

The summer passed, I returned to Moscow. During this time, the bot has changed a little - the flashing admin B has figured out my code, understood everything and even improved it by doing a few long-awaited things.

“Well, well, great!” I thought, and was glad that I now had an assistant.

Beginning of the End


It was October 2008. The contradictions in the league reached their apogee, the administrators broke up into 2 camps: “He has every right to dispose of his league as he wants!”, And: “We also contributed to the development of the league, and we have the same right to manage the league!”

At this critical moment, the manager of a professional team (who broke up half a year ago) suddenly showed up. He was and remained the owner of the site with a forum on which everything was spinning. One dissatisfied admin B complained to him, and showed what I was not satisfied with:

1. What I dragged into the moderators of my person, who was absolutely not suitable for this role, and did not fulfill this role (this person really did not take part in the life and development of the league, and he needed access as an ordinary person to ksiwa)
2. That there is one very old admin A who for a very long time has not logged on to the network, and he needs to select the highest access for the admin (he just moved to a new house where there was no Internet).
3. That I generally became inadequate and a bath of everyone.

The manager writes these claims to me in ICQ, asks - “what are you doing? what are you doing on my league? ” It was very strange to read this from a man who first appeared in the league in his life, and said that it was his league.

He demanded:

1. remove the authority from the moderator - “ok, we will do”
2. to be more adequate - “of course, not a question, but I only want the bath of the worst players! honestly!"
3. Remove admin A. - but this I could not do. This admin was one of two people who were with me from the very beginning at the beginning. It was with him that I spoke and thought out how the league should work. He sat with me in a deserted chat room at 3 am, waiting for me to add a new code, and testing it with me. He was not just a friend to me, but a friend. I could not remove access from him and quit. And what's the difference that an inactive user has admin rights? I went to the principle, and refused to comply with this item.

Coup


Further events unfolded very quickly. At first they banned me on our own channel in Garena. Then they banned my bot, and admin B, having access to the server, always had the latest version of the bot. The database was on a server that the manager also owned, so users did not feel anything. At the forum I was banned after another 15 minutes. I was left without channel access, without access to the site, without a fresh user database. The only place where I could lead a dispute is relatively independent prodot. There began the wildest showdown, dirt, blood and tomatoes.

Those administrators who began to rebel against the coup, lost adminstva very quickly. Some moderators who supported the coup received a welcome increase in admins. Power changed hands.

I thought the truth was on my side. And if the truth is with me, the people will understand that they have thrown me, and they will not play there. I was too naive. I did not know that using sly words and a long tongue could turn the truth upside down, expose me in the mud and expose me guilty. The once silent moderators told me everything they thought about me, without risking losing access. The only point with which I agreed was that I inappropriately banned people, but even that was no reason to take away my child, my creation, the years of my life!

The dispute at the independent site did not lead to anything. The Garena administrators tried not to intervene actively in the conflict, but could give me the rights to the room if I prove that I am the owner of the bot. It was enough for them to make the bot chat: Bot wrote Tims . Unfortunately, the admins of Garena connected too late, I already lost all power, and all the players were opposed to me, and I didn’t even want to regain the league. From now on, the ship has a new captain!

I was crushed into a flat cake, I lost everything I worked on and worked for. I had no more leagues, I had no more access, I had no players who would use my programs. In addition to this, the next day the office took a new permanent administrator (some strange coincidence of circumstances), and in fact I did not need to go to work, and a couple of days before these events I broke up with the girl.

What about fate?


It was a very difficult period in my life. But I'm an adventurous guy, right?
Looking from the future into the past, I can say that these events untied my hands, relieved me of the heavy burden of keeping an eye on bots, the league, the admins and the players, and allowed me to finally do web development, which I never got to arms. Only a few years after I realized that this coup had a positive effect on my life than if it had not happened. What a pity that at that moment I did not understand this - I would save myself a lot of nerves.
A month later, I gathered strength, and made a new ambitious project, in the same place - in Garena.

To be continued…

PS: Many years later, I wrote to admin B , we forgave each other, and I even thanked him for all this.

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


All Articles