March 29, 2012 at 01:17

How I got the key to Diablo III Beta

  • Website development,
  • Programming

In YouTube videos ThisIsGood Recently, keys to Diablo III Beta have begun to appear. In the 7-minute video, the key is shown for a second; whoever activates it first wins. This is what the key looks like on a still frame:

Are you thinking the same thing I'm thinking?


There are 10 keys in total.

Key 1
I didn’t know about the first key and probably no one knew. Some people are lucky.

Key 2
For the second video, the simplest bot was ready, which updates the page with the added video every 10 seconds and, if a new video appears, a modal window in the form of an alert reports this. It turned out that after 4 hours YouTube detects the bot and asks him to enter recaptcha, and then every hour he asks him to enter it. It’s very inconvenient, but I didn’t really want to waste time and write in a normal way, since I expected that the second key would appear somehow differently, for example, at least in green letters. I missed the second key, but when I saw the same gray numbers and letters, in the same font, the same size, on the same white background and even the size of the same three lines, I decided to make a normal bot.

Key 3
For the third video, the bot used the youtube api, the quota for the number of requests for which allowed scanning once every 5 seconds for 12 hours.

The algorithm was simple:

So, an alert popped up informing me about the release of a new video, I logged into battle.net, after 10 seconds the video downloaded, after another 10 seconds a screenshot with the serial number appeared:


I entered it and... it turned out to be already used. Error analysis showed that data via the youtube api is updated with a delay of up to 5 minutes! By the time the bot discovered the new video, it was already too late. Some of the other bots or users pressing F5 were lucky.

Key 4
By the fourth video, the bot has been improved: now it uses about 100 proxy servers (1 thread for each proxy server), which scan gdata every 5 seconds. Tests have shown that about 20 proxies simply instantly report the release of a new video, the rest catch up within a minute, it was great. Unlike gdata, direct links appear immediately for any IP, so here, without a proxy, the bot simply downloads videos in 20 streams (it worked even in 1000 streams, YouTube allows it). The download speed has increased. The scanning algorithm has been improved: the bot first scans the second part of the video in 4 threads (in all previous videos, the serial key appeared at the end of the video), and then the first part in 4 threads. For reliability, the scanning step was reduced to 500 ms, and other parameters were also slightly weakened.

So, an alert popped up announcing the release of a new video. Before I had time to log into battle.net, the video had already downloaded (10 seconds) and a screenshot with the serial number appeared:

I was glad that I had taken into account the possibility of his appearance in two lines. With shaking hands, I somehow wrote it and activated it! It all took about 20 seconds. I was very lucky with the scanning; the algorithm almost immediately showed the serial number, despite the fact that the full scan lasted 30 seconds. In this video, as it turned out, there were two keys that appeared sequentially, I entered the second one. Congratulations to whoever activated first!

5 more keys left
You can refine the algorithm: run the scan along with the start of the download, the algorithm will become more complicated, but the gain will be 10 seconds. You can also recognize the serial number and automatically enter it into battle.net. Then the key can be entered even in 5 seconds.

Everything was written in Java using HttpComponents (http protocol) and VLCj (video processing)

P.S. Diablo III is cool

UPDATE
It was interesting to write the bot itself, so I regard the 20 hours spent as time spent on entertainment, and not as 20 hours for which one could earn much more money than the key itself costs. In my free time, I relax or study something new, rather than work, but here’s something pleasant and useful. Haven't finished the game yet.

Algorithm
I deliberately did not immediately indicate the algorithm for determining the serial number for two reasons. Having learned the absolutely accurate algorithm, the authors of ThisIsHorosho will quickly make the key unrecognizable, and I will be doing a disservice to those who also write the bot. Although I admit that there are no such people, but judging by the comments, they enter serial numbers in 3 minutes, do they really press F5 while waiting...

Well, since there are a lot of questions about the algorithm... The main thing is that the algorithm must be very fast. The main idea is immediately visible from the screenshot with the serial number.

  1. We take a picture from the frame and save it with a size of 640x320, VLCj allows you to save pictures with any resolution, even if the video has a different one. All points close to the text color are made black, everything else is white. As a result, we get black and white pictures. A couple of such pictures are included in this article.
  2. For each screenshot, we calculate the statistics of white and black dots. We declare as background those where the number of white dots is more than 92%; in tests, 94% was enough, but this is with a margin. In the frames with the background we look for the serial number.
  3. We retreat 30 pixels from the edges of the frame, since the serial appears closer to the center, but never from the edge. We divide the remaining field into 20x20 squares, in each of which we count the number of black dots
  4. We declare squares with the number of black dots from 10% to 60% to be squares with letters - this is taking into account the fact that a letter can only fit halfway into the square and with some margin.
  5. Frames that have a continuous sequence of at least 6 squares with letters horizontally and 3 squares vertically are declared frames with a serial number. We save them in a folder.

As a result, only pictures with text similar to the serial number appear:

In practice, there are not many of them, so finding the one you need is not difficult.

Working with VLCj
Working with VLCj is very simple. First, I read the documentation www.capricasoftware.co.uk/vlcj/tutorial1.php, then I played a little with the MediaPlayer class, but it was somehow buggy, in general I settled on calling direct functions from the LibVlc library - it is both faster and more bug-free.

First we create the library
LibVlc libvlc = LibVlcFactory.factory().create();

Then we create an array of 8 AnalyzerThreads (of Runnable type) (each 1/8 of the video time), which we pass to Executors.newFixedThreadPool(4) in this order: 4, 5, 6, 7, 0, 1, 2, 3. Those. The second part of the video will be scanned first, and then the first. Each AnalyzerThread contains the following code:

System.out.println("Run section " + num); libvlc_media_player_t p_mi = null; libvlc_media_t media = null; try ( // prepare //libvlc_instance_t instance = libvlc.libvlc_new(0, new String); libvlc_instance_t instance = libvlc.libvlc_new(2, new String("--vout", "dummy")); p_mi = libvlc.libvlc_media_player_new( instance); libvlc.libvlc_audio_toggle_mute(p_mi); libvlc.libvlc_media_new_path(instance, fileName); .libvlc_media_player_pause(p_mi) ; // start snapshoting int block = blockFrom; for (long msTime = msFrom; msTime<= msTo; msTime += msInBlock, block++) { String path = snapshotPath + File.separator + "snap-" + String.format("%03d.png", block); libvlc.libvlc_media_player_set_time(p_mi, msTime); int r = libvlc.libvlc_video_take_snapshot(p_mi, 0, path, picWidth, picHeight); if (r != 0) System.out.println("SNAPSHOT FAILED: block=" + block + ", returnCode=" + r); else analyzeImage(path); } } finally { if (p_mi != null) libvlc.libvlc_media_player_stop(p_mi); if (media != null) libvlc.libvlc_media_release(media); if (p_mi != null) libvlc.libvlc_media_player_release(p_mi); System.out.println("Close section " + num); }

The analyzeImage function determines whether the key is in the screenshot or not; if it is, it saves it in a special folder.

Despite the fact that the use of cheat codes in computer games generally reduces the interest in the game, this topic always remains popular. Unfortunately, even in the case of the popular role-playing game Diablo 3, players are eagerly looking for opportunities to unfairly gain gaming advantages.

The use of various codes in Diablo 3, or rather special cheating programs, has its own very important feature, which is rarely explained by the distributors (sometimes for a fee) of these cheating programs. I urge you to the site to think carefully about your desire to gain an advantage in the game by dishonest means, since this event may well end disastrously for your account on battle.net, but let’s start in order.

Network placement of heroes

There is no local game in Diablo 3, all the heroes are stored on the server, so as such there is no local game and local heroes here. So even banal editing of saves, which was often practiced in Diablo 2, can’t help here, because we don’t have access to them. But there is no need to worry about the safety of our characters, we can play for them both from work and from home or an Internet cafe.

All characters can play both in their own world and with other players, so you can’t directly use cheat codes in the game, they simply don’t exist. That is, they do not exist in nature, thanks to the special format of the role-playing game Diablo 3, where everything is subordinated to a collective game, a joint passage. So the developers simply could not leave codes that could strengthen your character.

There are no codes in the game!

There are no codes in Diablo 3. This would be the end of this chapter on the site, but it won’t look very nice, so I’ll dilute the paragraph with a couple of other sentences. There are no official and safe cheats for Diablo Three, and there will not be in the future, so any use of them violates the user agreement, which, by the way, you unconditionally agreed to. But what are cheaters doing in the new world of Sanctuary?

Maphacks, bots and other programs

Diablo 3 uses special cheating programs that, one way or another, will give a non-game advantage to your characters. By the way, forcing bots to farm gold or items is also considered cheating and cheating. This is how players hack the game and get additional options for their heroes.

Many Internet resources actively distribute various map hacks and bots for Diablo 3, not only without warning about the possible danger of using them, but also often slipping viruses into the archives. So the popularity of the game and the desire to use different cheats are fully exploited by dishonest owners of various gaming sites.

So you need to be careful at the stage of searching and downloading various hacks for the third Diablo, because you can catch a virus, and not the program you are looking for. In principle, the best thing is not to download cheats for this game at all and not to use them..

Don't use cheats

Even though the first reason that I will outline will bring a smile to many fans of computer games, I cannot help but mention it. By using different cheating programs you significantly reduce the pleasure of the game and violate the principles of fair play. Although Diablo 3 for many is an eternal pursuit of gold and powerful artifacts. In this version, the game, instead of relaxation and pleasure, brings mostly negative emotions.

The second reason, a warning, is more pressing and concerns your personal finances. The fact is that for using cheats and bots you can simply be banned from the game. Blizzard is pretty sensitive about cheaters, and ten million players want a fair playing environment for their money. As a result, it is most likely cheaters who will lose money. And you will have to re-purchase Diablo 3 with your own money.

As a result, searching for and using various hacks and cheats, bots in Diablo 3 can result in not only an infection of your computer, but also a ban on your account on battle.net, so that you will lose the opportunity to explore Sanctuary altogether. This Arbs article may not seem too trivial to you, but the risk of using cheats in Diablo 3 is quite high, since the game is quite expensive.

Meanwhile, you can get an advantage in the game using a safer method, namely, by purchasing gold, that is, game currency. As a result, you will spend less money, the result will be more reliable, and you will also save your own time on setting up hacks and cheats. It’s even safer to use an official auction for real money. The best solution is to play Diablo 3 for fun.

Twenty years have passed since hordes of the undead, led by the mighty demons Diablo, Mephisto and Baal, rampaged through Sanctuary, but those who fought against the ancient evil still remember the terrible events of those days... In search of knowledge that will help overcome new incarnations of evil, Deckard Cain returned to the ruins of Tristram Cathedral. And then the herald of the Apocalypse descended from heaven, engulfed in flames: the blow fell on the very place where Diablo once entered the world. The heavenly flame awakened the ancient Evil. The hour has struck! The heroes of Sanctuary must once again rise to defend the mortal world from the raging forces of the underworld.

ATTENTION! You are buying codes (not a disc)! The game is downloaded after activation!

How to redeem Diablo III Standard Edition (RU) code:

1) Go to eu.battle.net/ru/ and register (if you have a Battle Net account, log in).
2) After logging in, select the “Attach game key” section (eu.battle.net/account/management/claim-code.html) and enter the purchased Diablo III Standard Edition (RU) code.

How to redeem a Diablo III Guest Pass code (RU):

1) Go to http://www.diablo3.com/guest and register (if you have a Battle Net account, log in).
2) Enter the received guest key
3) Download the game for free (Guest version allows you to play Diablo III until the battle with the Skeleton King in Act I)

How to redeem WoW Guest Pass (RU) code:

1) Go to http://www.warcraft.com/guest and enter the guest key you received
2) Download the free trial version of the game
3) Play World of Warcraft for free up to level 20

About availability: Many, regularly, officially (from SoftClub). You receive activation codes immediately after payment! Includes the main code and guest code for D3 and WoW (All reprinted from the jewel edition on disk).

Reviews

2

No feedback received from customers.

In order to counter the violation of copyright and property rights, as well as to exclude unfounded accusations against the site administration of complicity in such a violation, the administration of the Plati trading platform (http://www.site) appeals to you with a request - in case of detection of violations on the trading platform Plati, immediately inform us at the address of the fact of such a violation and provide us with reliable information confirming your copyright or ownership rights. In the letter, be sure to indicate your contact details (full name, telephone number).

In order to exclude unfounded and deliberately false reports of violations of these rights, the administration will refuse to provide services on the Plati trading platform only after receiving from you written statements of violation accompanied by copies of documents confirming your copyright or ownership rights, at the address: 123007, Moscow, Maly Kaluzhsky lane. 4, building 3, Lawyer's office "AKAR No. 380".

In order to promptly respond to violations of your rights and the need to block the actions of unscrupulous sellers, Plati asks you to send a certified telegram, which will be the basis for blocking the actions of the seller, this telegram must contain an indication of: the type of rights violated, confirmation of your rights and your contact details (organizationally - legal form of the person, full name). The blocking will be lifted after 15 days if you fail to provide the Law Office with written documents confirming your copyright or ownership rights.