Skip to content

Commit

Permalink
Version 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonym0usWork1221 authored Oct 13, 2023
1 parent 3bc5897 commit 0769c6d
Show file tree
Hide file tree
Showing 8 changed files with 857 additions and 60 deletions.
340 changes: 340 additions & 0 deletions PyCheats.py

Large diffs are not rendered by default.

176 changes: 120 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Android-Py-Cheats-Script
PyCheats - An Ultimate Android Cheat Script
====
[![GitHub stars](https://img.shields.io/github/stars/Anonym0usWork1221/Android-Py-Cheats-Script.svg)](https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/Anonym0usWork1221/Android-Py-Cheats-Script.svg)](https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/network/members)
Expand All @@ -8,30 +8,42 @@ Android-Py-Cheats-Script
[![GPT_LICENSE](https://img.shields.io/badge/license-MIT-yellow.svg)](https://opensource.org/licenses/)

-----------


**This is an example of using androidMemoryTool on android
This script is generated for game pubg mobile.
Can be use in Fortnite and other games for cheats**
**This is an example of using androidMemoryTool on android**

If you find any bug or not working function you can contact me.

* date : 2022/12/29
* Version : 0.2
* date : 2023/10/13
* Version : 0.3
* author : Abdul Moez (abdulmoez123456789@gmail.com)
* Study : UnderGraduate in GCU Lahore, Pakistan

MIT License

Copyright (c) 2022 AbdulMoez


## Introduction
**_PyCheats_** is a Python-based Android game cheating tool designed to help you modify
and manipulate game values for **Android games**. This tool allows you to bypass
**anti-cheat** systems, **activate basic game cheats**, and perform various actions to
gain an advantage in your favorite Android games. This documentation provides
detailed information for both developers and simple users.

--------
That's it! You can now use PyCheats to enhance your gaming experience and gain an advantage in your
favorite Android games. Enjoy cheating responsibly!
---------
LOGS

-----------------------------------------MODIFICATION LOG--------------------------------------------------
1. Introducing an enhanced group search system and a streamlined tool arrangement for improved efficiency.
2. Replacing the outdated search system with a cutting-edge, advanced alternative.
3. Version 0.3 offers compatibility with androidMemoryTool version 0.6.3 or higher.

------
Requirements
-----------
* Python Version >= 3.7
* Rooted Environment needed.
* Modules used ``androidMemoryTool==0.4``, ``art==5.7``
* ```python3 PyCheats.py```

Compatible
-----------
Expand All @@ -50,60 +62,112 @@ Installation

Video Demonstration
----------------------------------------

[![VideoDemonstration](https://img.youtube.com/vi/XgKjv0k_8pQ/0.jpg)](https://www.youtube.com/watch?v=XgKjv0k_8pQ)

Old Versions
----------------------------------------
**Old versions can be found in packages section**

Reference
----------------------------------------
* [AndroidMemoryTool](https://github.com/Anonym0usWork1221/android-memorytool)

OutPut Sample
-----------
<br>
<p align="center">
<img src="https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/blob/main/output_sample.png" title="proxy-list">
<img src="readme_assets/output_sample.png" title="Android-Py-Cheats">
</p>
Supported Data Types
-------------------

All data types are signed.

| **Range** | **Name** | **Type** |
|---------------------------------------------------------|----------|------------------|
| -2,147,483,648 to 2,147,483,647 | DWORD | signed int |
| 3.4E +/- 38 (7 digits) | FLOAT | float |
| 1.7E +/- 308 (15 digits) | DOUBLE | double |
| -32,768 to 32,767 | WORD | signed short int |
| -128 to 127 | BYTE | signed char |
| -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | QWORD | signed long long |
| -2,147,483,648 to 2,147,483,647 | XOR | signed long |
| Random | UTF_8 | Text |
| Random | UTF_16LE | Text |


Supported Map Ranges
--------------------
| **Script Name** | **Name** | **Description** |
|-----------------|--------------|----------------------------------------|
| ALL | Whole Memory | Whole Memory of current process (slow) |
| C_ALLOC | C++ alloc | RAM c++ Allocated memory |
| A_ANONYMOUS | Anonymous | Range with r-w access only |
| CODE_APP | Code App | shared libs memory (dangerous) |
| JAVA_HEAP | Java Heap | Java heap |
| C_HEAP | C++ Heap | Heap memory of cpp |
| C_DATA | C++ .data | .Data Memory |
| C_BSS | C++ .bss | .bss section memory |
| J_Java | Java | Java memory section |
| STACK | Stack | Stack Memory |
| ASHMEM | Ashmen | Ashmen Memory |
| V_video | Video | Video memory range |
| B_Bad | Bad | Bad Memory (dangerous) |
| CODE_SYSTEM | Code system | Code system memory (dangerous) |

-----

## Simple User Documentation
### Requirements
As a simple user, **you don't need to install** the required packages manually.
These packages are automatically installed when you run the PyCheats tool.

### Using PyCheats
To use `PyCheats` as a simple user, follow these steps:
1. Run the `PyCheats.py` script. This will start the PyCheats tool and display the
controller menu.
2. Use the controller menu to perform various actions, including logo bypass,
lobby bypass, and activating basic cheats.
3. Follow the on-screen instructions to interact with the `PyCheats tool`.

### Important Notes
**Make sure to run the PyCheats** tool as a `superuser (root)` if required to access certain Android game memory.
PyCheats may not work with all Android games and may require specific game package information.

### Version
The current version of PyCheats support androidMemoryTool Version 0.6.3.
Make sure to use this version when installing the tool.

-----
## Developer Documentation
### Requirements
Before using PyCheats, make sure to install the required Python packages
listed in the `requirements.txt` file. You can install these packages
using the following command:
```shell
pip install -r requirements.txt
```

### Main File: PyCheats.py
The `PyCheats.py` file is the main script that controls the PyCheats tool.
It includes classes and methods for interacting with Android games,
bypassing **anti-cheat systems**, and **activating cheats**.

### Installation and Usage
To use PyCheats, follow these steps:
1. Create a Python virtual environment and install the required packages using the `requirements.txt` file.
2. Run the `PyCheats.py` script. This will start the PyCheats tool and display the controller menu.
3. Use the controller menu to perform various actions, including logo bypass, lobby bypass, and activating basic cheats.

### Classes and Methods
The main classes and methods in `PyCheats.py` are as follows:
* **_PyCheats_**: The main class that initializes the PyCheats tool and provides methods for various actions.
* `__init__()`: Initialize the PyCheats object.
* `__async__get_ticks()`: Asynchronously get information about the Android game and initialize instances.
* `_initialize_instances()`: Initialize memory tool instances for various memory ranges and data types.
* `logo_bypass()`: Perform a logo bypass to modify game values.
* `lobby_bypass()`: Perform a lobby bypass to remove unnecessary files and modify game values.
* `basic_cheats()`: Activate basic game cheats based on the specified cheat code.
* `controller_menu()`: Display a controller menu to interact with the PyCheats tool.
* `get_ticks()`: Start the PyCheats tool and enter the event loop to interact with the controller menu.

> Configuration: Ensure that the `requirements.txt` file includes the necessary packages.
You can specify the desired package versions in this file.

### Utility Classes
`PyCheats` also includes utility classes for various tasks.
These utility classes are used within the main script.
1. `RootUtils (root_utilities.py)`:
This utility class handles root-related tasks and interactions with
Android applications. It provides methods for checking if a game is running,
acquiring root privileges, and removing files.
* `is_game_running()`: Check if an Android game with the specified package name is currently running.
* `is_rooted_acquired()`: Check if the script has acquired root privileges, and if not, attempt to acquire them.
* `remove_file()`: Remove a file at the specified path if it exists.

2. `PPrints (pprints.py)`:
This utility class is responsible for pretty-printing colored text messages in the terminal.
It provides methods for displaying decorative headers and printing messages with different information
types and text colors.
* `decoration()`: Display a decorative header with the project name and author information.
* `pprints()`: Pretty print a text message with optional formatting options.

3. `GameInformationHandler (gather_information.py)`:
This class manages game information, allowing you to compare, retrieve, and update game package information.
It is particularly useful for managing Android game package data.
* `compare()`: Compare the current game package name with a stored one.
* `get_data()`: Prompt the user to enter a game package name and store it in a JSON file.
* `unpack_information()`: Retrieve the stored game package name.

4. `ReqInstaller (requirements_installer.py)`:
This class manages the installation of required dependencies for the Python script. It checks for the availability
of required packages and installs them if necessary.
* `install_requirements()`: Installs required Python packages based on script's import availability
and superuser status.


# Contributor

<a href = "https://github.com/Anonym0usWork1221/Android-Py-Cheats-Script/graphs/contributors">
Expand All @@ -114,16 +178,16 @@ Supported Map Ranges
Assistance
----------
If you need assistance, you can ask for help on my mailing list:

* Email : abdulmoez123456789@gmail.com

I also created a Discord group:

* Server : https://discord.gg/RMNcqzmt9f


Buy Me a coffee
--------------
If you want to support me you can buy me coffee.

BitCoin_addr: ``` 19vwfRXfthPY7f2aqDBpxQvZa6AJFKcdBS ```
* Payoneer: ```abdulmoez123456789@gmail.com```
* BitCoin_addr: ``` 19vwfRXfthPY7f2aqDBpxQvZa6AJFKcdBS ```

1 change: 1 addition & 0 deletions process_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"game_pkg": ""}
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
androidMemoryTool==0.4
commonmark==0.9.1
Pygments==2.13.0
art==5.7
androidMemoryTool==0.6.3
art==6.1
psutil==5.9.5
93 changes: 93 additions & 0 deletions utils/gather_information.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
"""
/*
* Date : 2023/10/13
* Version : 0.3
* Author : Abdul Moez
* Email : abdulmoez123456789@gmail.com
* Affiliation : Undergraduate at Government College University (GCU) Lahore, Pakistan
* GitHub : https://github.com/Anonym0usWork1221/android-memorytool
*
*/
"""

from utils.pprints import PPrints
from json import loads, dump
from os import path


class GameInformationHandler(object):
"""
GameInformationHandler is a class for managing game information.
This class allows you to compare, retrieve, and update game package information.
It is particularly useful for managing Android game package data.
Args:
**kwargs: Additional keyword arguments for customization.
Attributes:
_pprints (PPrints): An instance of the PPrints class for pretty printing.
Methods:
compare() -> bool:
Compare the current game package name with a stored one.
get_data() -> None:
Prompt the user to enter a game package name and store it in a JSON file.
unpack_information() -> str:
Retrieve the stored game package name.
"""

def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
self._pprints = PPrints()

async def compare(self) -> bool:
"""
Compare the current game package name with a stored one.
Returns:
bool: True if the game package exists, False otherwise.
"""

if not path.isfile("process_info.json"):
return False

with open("process_info.json", 'r') as json_file:
current_info = loads(json_file.read())

game_package_name = current_info["game_pkg"]

if not game_package_name:
return False

elif path.exists(f"/storage/emulated/0/Android/data/{game_package_name}"):
return True

else:
await self._pprints.pprints(text="Package not found. Please type it again or press Ctrl+C to exit.",
info_type=3)
return False

async def get_data(self) -> None:
"""
Prompt the user to enter a game package name and store it in a JSON file.
"""

while not (await self.compare()):
try:
await self._pprints.pprints(text="Enter package name: ", info_type=4, no_end=True, off_info=True)
pkg_name = input()
print()
process_info = {"game_pkg": pkg_name}
dump(process_info, open("process_info.json", "w"))
except KeyboardInterrupt:
break

async def upack_information(self) -> str:
"""
Retrieve the stored game package name.
Returns:
str: The stored game package name.
"""

await self.get_data()
with open("process_info.json", 'r') as json_file:
current_info = loads(json_file.read())
game_package_name = current_info["game_pkg"]

return game_package_name
Loading

0 comments on commit 0769c6d

Please sign in to comment.