Popcat is really hot nowadays, at the time of writing, Malaysia is ranked #2 worldwide with 8.1 billion pops and 120.5k pops per seconds (PPS), Finland is ranked #3 with 5.4 billion pops and 425.7k PPS (crazily high). With the current speed, Malaysia will be winning over Taiwan who is currently ranked #1 with 13.5 billion pops, but with only 36.4k PPS, in a matter of time.
Being a software development house with more than 90 man strong, we are dealing with similar situations in daily basis. In this weekend, We are challenging ourselves by applying our professional software knowledge for development and automation testing in this real life scenario. Here’s the video on how it works if you are interested. Note that there are also non software way, such as using some small robots which are quite interesting too. Feel free to check it out.
We started with using an automation script obtained from Github. The script was working perfectly before we noticed there was a bot checking mechanism. Here is how it works:
After that, we noticed our cats’ eyes become red color:
Then we noticed the eyes are red when the “bot” flag is set in cookie
Thanks to an Agmoian sharing a post from Facebook. We have learnt that the frontend code will:
You can also unminified the minified Javascript code by using tools like https://unminify.com/
Before:
After:
The author, Tommy Wong has also written a workaround script, which works perfectly fine:
document.cookie=”bot= ”
const event = new KeyboardEvent(‘keydown’, { key: ‘a’, ctrlKey: true });
const timegap = 1 / (790 / (30 * 1000));
setInterval(() => {
document.dispatchEvent(event);
}, timegap);
Then the next challenge is how do we deploy this in mass scale, a few ideas come into our mind:
However, after all above won’t work, as the public cloud has no Malaysia IP range. Also, the API is rated limited by IP, we cannot use the same Internet Connection, hence we are using multiple data plans and Wifi to bypass the bot checking.
With this, we have to do it more manually with our resources. We have bought plenty of test devices for COVID-19 Bluetooth Contact Tracing development last time. It’s time to bring them to the game. So, how do we run the Javascript in our mobile phones just like using Console in our Chrome?
The way for doing this is slightly different for desktop, Android and iOS.
For desktop:
For Android:
1 Go to “Settings”, then tap “About device” or “About phone”.
2 Scroll down, then tap “Build number” seven times.
For iOS:
As simple as that, you can make your computer, iOS or Android phones to click automatically for you, when you are sleeping, eating or doing anything. Feel free to try it out.
Interested to have automation testing for your web or mobile application? Write to us at [email protected]