-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
99 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import wx, os, json, array | ||
# old path: ..\\!McChinaDev\\Minecraft.Windows.exe | ||
version = '016' | ||
configuration_file_name = 'config.json' | ||
|
||
class PrimaryFrame(wx.Frame): | ||
def __init__(self): | ||
super().__init__(parent=None, title='EPPL_Auto_Modificator_v' + version, size=(480, 200)) | ||
with open(configuration_file_name, 'r') as config_file: | ||
self.data = json.load(config_file) | ||
self.filename = os.path.join(*self.data["path"].split('\\')) | ||
|
||
self.panel = wx.Panel(self) | ||
with open(self.filename, 'rb') as file: | ||
for i in range(len(self.data["switches"])): | ||
patches = array.array('b') | ||
defaults = array.array('b') | ||
for a in range(len(self.data["switches"][i]["patches"])): | ||
file.seek(int(self.data["switches"][i]["patches"][a].split(' >> ')[0], 16)) | ||
hex_value = file.read(1).hex().upper() | ||
patches.append(hex_value == self.data["switches"][i]["patches"][a].split(' >> ')[2]) | ||
defaults.append(hex_value == self.data["switches"][i]["patches"][a].split(' >> ')[1]) | ||
result = all(x for x in patches) | ||
checkbox = wx.CheckBox(self.panel, id=i, label=self.data["switches"][i]['title'], pos=(10, 10 + (i * 30))) | ||
checkbox.SetValue(result) | ||
if not result and not all(x for x in defaults): | ||
wx.MessageBox("Error: Invalid values found", "Error", style=wx.OK | wx.ICON_ERROR) | ||
checkbox.Disable() | ||
wx.StaticText(self.panel, label='MDLC organization. Developed by bs2jbwsgp4vsc4qg3ayn97nd (DiscordUsername)', pos=(10, 140)) | ||
self.Bind(wx.EVT_CHECKBOX, self.onChecked) | ||
|
||
def onChecked(self, e): | ||
cb = e.GetEventObject() | ||
id = cb.GetId() | ||
value = cb.GetValue() | ||
label = cb.GetLabel() # if you want print message like "${label} was activated!" | ||
patches = self.data["switches"][id]["patches"] | ||
for i in range(len(patches)): | ||
self.replace_hex(patches[i].split(' >> ')[0], patches[i].split(' >> ')[2 if value else 1]) | ||
|
||
def replace_hex(self, address, hex_value): | ||
with open(self.filename, 'r+b') as file: | ||
file.seek(int(address, 16)) | ||
file.write(bytes.fromhex(hex_value)) | ||
file.flush() | ||
|
||
app = wx.App() | ||
PrimaryFrame().Show() | ||
app.MainLoop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +0,0 @@ | ||
# AutoModificator | ||
RU/EN | ||
|
||
RU | ||
|
||
![image](https://github.com/Max-RM/AutoModificator/assets/81485476/b22da77c-abd6-4668-b052-ba017d9929ee) | ||
|
||
Python программа для изменения файлов. Изменения вносятся исходя из данных указанных в файле config.txt лежащим рядом с exe AutoModificator после нажатия рычагов в окне программы. | ||
В файле конфига первая строка - это путь указывающий на файл, который будет редактироваться, который можно изменить на нужный (путь записывается в питоновской форме). | ||
2 и 3 строки - принадлежат первому рычагу в окне программы. | ||
4 и 5 строки - принадлежат второму рычагу в окне программы. | ||
в строках 2, 3, 4, 5 нужно указывать hex смещение/адрес того места где нужно изменить байты, перед смещением вы должны написать - (0x), далее после ( >> ) указывается исходные байты в hex форме находящиеся по указанному смещению/адресу, затем после второго ( >> ) указывается те байты, на которые нужно изменить исходное значение. Пример записи файла config.txt используемого в реальном проекте: | ||
|
||
'..','!McChinaDev','unpacked_Minecraft.Windows.exe' | ||
|
||
0x2A9ACDE >> 0C >> FF | ||
|
||
0x2A9AF70 >> 0C >> FF | ||
|
||
0x396A191 >> 80 >> 00 | ||
|
||
0x396A192 >> 00 >> 01 | ||
|
||
( Штука ('..') в пути - это означает - одну папку назад). | ||
Программа может быть применена практически для любого файла, но используется в основном для Minecraft Bedrock Edition. Запускать изменения в отношении исполняемого файла нужно когда он выключен, что в принципе очевидно. | ||
Программа была разработана с использованием Chat GPT. | ||
|
||
EN | ||
|
||
![image](https://github.com/Max-RM/AutoModificator/assets/81485476/b8452831-e536-44fe-aa1e-e90cc63856b4) | ||
|
||
A Python program for changing files. Changes are made based on the data specified in the file config.txt located in same folder with AutoModificator exe after pressing the switchers in the program window. | ||
In the config file, the first line is the path specified the file that should be edited. Path can be changed to the desired one (the path is written in python form). | ||
Lines 2 and 3 belong to the first switch in the program window. | ||
Lines 4 and 5 belong to the second switch in the program window. | ||
in lines 2, 3, 4, 5, you need to specify the hex offset/address of the place where the bytes need to be changed, before the offset you must write - (0x), then after ( >> ) indicate the original bytes in hex form located at the specified offset/address, then after the second ( >> ) indicate those bytes to change the original value to. Example of writing a file config.txt used in a real project: | ||
|
||
'..','!McChinaDev','unpacked_Minecraft.Windows.exe' | ||
|
||
0x2A9ACDE >> 0C >> FF | ||
|
||
0x2A9AF70 >> 0C >> FF | ||
|
||
0x396A191 >> 80 >> 00 | ||
|
||
0x396A192 >> 00 >> 01 | ||
|
||
(The thing ('..') in the path means one folder back). | ||
The program can be applied to almost any file, but is mainly used for Minecraft Bedrock Edition. You need to run changes to the executable file when it is turned off, which is basically obvious. | ||
The program was developed using Chat GPT. | ||
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file not shown.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# AutoModificator | ||
RU/EN | ||
|
||
RU | ||
|
||
![image](https://github.com/Max-RM/AutoModificator/assets/81485476/b22da77c-abd6-4668-b052-ba017d9929ee) | ||
|
||
Python программа для изменения файлов. Изменения вносятся исходя из данных указанных в файле config.txt лежащим рядом с exe AutoModificator после нажатия рычагов в окне программы. | ||
В файле конфига первая строка - это путь указывающий на файл, который будет редактироваться, который можно изменить на нужный (путь записывается в питоновской форме). | ||
2 и 3 строки - принадлежат первому рычагу в окне программы. | ||
4 и 5 строки - принадлежат второму рычагу в окне программы. | ||
в строках 2, 3, 4, 5 нужно указывать hex смещение/адрес того места где нужно изменить байты, перед смещением вы должны написать - (0x), далее после ( >> ) указывается исходные байты в hex форме находящиеся по указанному смещению/адресу, затем после второго ( >> ) указывается те байты, на которые нужно изменить исходное значение. Пример записи файла config.txt используемого в реальном проекте: | ||
|
||
'..','!McChinaDev','unpacked_Minecraft.Windows.exe' | ||
|
||
0x2A9ACDE >> 0C >> FF | ||
|
||
0x2A9AF70 >> 0C >> FF | ||
|
||
0x396A191 >> 80 >> 00 | ||
|
||
0x396A192 >> 00 >> 01 | ||
|
||
( Штука ('..') в пути - это означает - одну папку назад). | ||
Программа может быть применена практически для любого файла, но используется в основном для Minecraft Bedrock Edition. Запускать изменения в отношении исполняемого файла нужно когда он выключен, что в принципе очевидно. | ||
Программа была разработана с использованием Chat GPT. | ||
|
||
EN | ||
|
||
![image](https://github.com/Max-RM/AutoModificator/assets/81485476/b8452831-e536-44fe-aa1e-e90cc63856b4) | ||
|
||
A Python program for changing files. Changes are made based on the data specified in the file config.txt located in same folder with AutoModificator exe after pressing the switchers in the program window. | ||
In the config file, the first line is the path specified the file that should be edited. Path can be changed to the desired one (the path is written in python form). | ||
Lines 2 and 3 belong to the first switch in the program window. | ||
Lines 4 and 5 belong to the second switch in the program window. | ||
in lines 2, 3, 4, 5, you need to specify the hex offset/address of the place where the bytes need to be changed, before the offset you must write - (0x), then after ( >> ) indicate the original bytes in hex form located at the specified offset/address, then after the second ( >> ) indicate those bytes to change the original value to. Example of writing a file config.txt used in a real project: | ||
|
||
'..','!McChinaDev','unpacked_Minecraft.Windows.exe' | ||
|
||
0x2A9ACDE >> 0C >> FF | ||
|
||
0x2A9AF70 >> 0C >> FF | ||
|
||
0x396A191 >> 80 >> 00 | ||
|
||
0x396A192 >> 00 >> 01 | ||
|
||
(The thing ('..') in the path means one folder back). | ||
The program can be applied to almost any file, but is mainly used for Minecraft Bedrock Edition. You need to run changes to the executable file when it is turned off, which is basically obvious. | ||
The program was developed using Chat GPT. |
Binary file not shown.