Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] CoC Always Online Script
#1
Checkmark 
Hello everyone,

As a new member of this forum, I decided I should start off on the right foot and release something that some of you may find useful. So, today, I decided to write a little Clash of Clans botting script that keeps a player online indefinitely. It's nothing fancy, but it works well and it bypasses the 5 hour limit.

The basic process of the script:
1. The user selects the device to bot on.
2. The script confirms that device is available.
3. The script pushes the Clash of Clans app to the device screen.
4. The script calculates a 5% chance as to whether or not it should kill and restart the game. (Prevents the 5 hour online issue.)
5. The script executes an arbitrary click somewhere between -15% and 15% from the center of the screen.
6. The script waits for a randomly chosen amount of time between 30 seconds and 3 minutes and then repeats steps 4 & 5 again. (This goes on infinitely until the script is killed.)

Key Notes:
- Does not require any Android emulators (e.g., Bluestacks)
- Should work without rooting the device
- Requires a physical Android device
- Currently requires the device to be connected via USB to the computer
- Multiple instances of this script can be ran simultaneously to keep multiple accounts online (a new instance of the script must be opened for each account you want to keep online)

Future Possible Features:
- Botting over the internet (without a physical connection via USB)
- Advanced botting using Optical Character Recognition, Object Detection, Template Matching, and Computer Vision (for auto-attacking, auto-collecting resources, auto-troop training, auto-donating, etc.)

This script requires Python 3.0.0 or higher (not included in my archive) and the Android Debug Bridge (ADB) with all its dependencies (all of which I have included in my archive). The script is designed for windows, but it could easily run on another platform if you replace the dependencies folder with the relevant ADB dependencies for your platform. The script can also be converted to Python 2.x by anyone who has decent knowledge of the different Python versions. All of the primary code can run in Python 2.x except things like printing output and receiving input.

If you want to view the source code, just open coc_always_online.py in any text editor and you will be able to see all of the source code. I have also included a legal disclaimer in that file which users should read before running. I attempted to document the script thoroughly so readers will know what is going on throughout it.

Screenshot of the script running in IDLE:
[Image: yymM3ma.png]

I assume nobody here wants to get a virus, so I have included some virus scans:
VirusTotal (0/57)
Jotti (0/22)

Download Link:
Dropbox: Clash of Clans - Always Online - Android

I hope it's alright that I posted an offsite link. I didn't see a way to upload files/attachments to my post, so I decided to put it up on dropbox.

All the best,
Spencer

PS: If you use this and like it, let me know. If enough people find this bot useful, I'll probably continue its development and see if I can add some cool, extra features!
Reply
#2
This looks pretty legit, but its not called "VirusJotti", its just, "Jotti".
Reply
#3
(04-20-2015, 09:13 AM)Manuel Neuer Wrote:  This looks pretty legit, but its not called "VirusJotti", its just, "Jotti".

Ahh, well, my apologies about that. I used to release hacks on another game hacking website and everyone called it Virus Jotti. I'll fix that.

Anyway, I released that script without too much testing. I've been further testing it today, and it seems to be performing exactly as expected. It has been keeping my accounts online without issues and it is not being stopped by the 5 hour limit. I am running multiple instances of the script at the same time to keep multiple accounts open.

My next goal is to add the functionality to connect to the account without needing a USB connection. Instead, it would connect to the device's IP address which would enable it to be used on virtual Android devices/Android Virtual Machines.
Reply
#4
Very solid submission! Interesting approach to staying online, are you able to control the phone using this? In terms of grabbing a screenshot, sending input, receiving input, etc.
Reply
#5
(04-20-2015, 11:55 AM)Konloch Wrote:  Very solid submission! Interesting approach to staying online, are you able to control the phone using this? In terms of grabbing a screenshot, sending input, receiving input, etc.

Well thank you, Konloch. I'm glad to see that you like it.

Yes, using ADB, you can control a device very easily. I was previously working on a Clash of Clans bot that kept the user online and took screenshots of the base so it could scan them for resource collection icons (the icons that appear above the collectors/mines when they filled up a little bit); however, I abandoned that project because I couldn't find a way to search the image for the resource icons. If I have enough time and I can find a good image-matching/image-searching library, the possibilities for this project could be endless.

If you want to know more about this method, shoot me a PM and I can explain it. The Android Debug Bridge is a very powerful and convenient tool.

Oh, and by the way, I apologize for not writing this in Java. I know this is a Java forum, but Python seemed more convenient because I could test everything on-the-fly in the Python shell. However, this really could be rewritten in almost any language because it primarily relies on shell commands sent through ADB.
Reply
#6
You can use adb connect command to connect to a Android device over network.

http://developer.android.com/tools/help/...l#wireless

(04-20-2015, 11:33 AM)S.Doak Wrote:  
(04-20-2015, 09:13 AM)Manuel Neuer Wrote:  This looks pretty legit, but its not called "VirusJotti", its just, "Jotti".

Ahh, well, my apologies about that. I used to release hacks on another game hacking website and everyone called it Virus Jotti. I'll fix that.

Anyway, I released that script without too much testing. I've been further testing it today, and it seems to be performing exactly as expected. It has been keeping my accounts online without issues and it is not being stopped by the 5 hour limit. I am running multiple instances of the script at the same time to keep multiple accounts open.

My next goal is to add the functionality to connect to the account without needing a USB connection. Instead, it would connect to the device's IP address which would enable it to be used on virtual Android devices/Android Virtual Machines.
Reply
 


Forum Jump:


Users browsing this thread: 3 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website