Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for 4.6.1 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Charles Patcher.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ REM Extract charles.jar
echo Extracking charles.jar...
mkdir .\charles\
cd .\charles\
jar xf ..\charles_original.jar
..\jdk\bin\jar.exe xf ..\charles_original.jar
cd ..

REM Decompiling
echo Decompiling Main.class...
jad .\charles\com\xk72\charles\Main.class >nul 2>&1
grep "protected boolean [a-zA-Z]" .\Main.jad | grep -Eo " [a-zA-Z]+;" | grep -Eo "[a-zA-Z]+" > grep.temp
.\jdk\bin\java.exe -jar cfr-0.150.jar .\charles\com\xk72\charles\Main.class >Main.cfr 2>&1
.\grep\grep.exe "protected boolean [a-zA-Z]" .\Main.cfr | .\grep\grep.exe -Eo -m 1 " [a-zA-Z]+;" | .\grep\grep.exe -Eo -m 1 "[a-zA-Z]+" > grep.temp
set /p validate=<grep.temp
grep "Registered to: " .\Main.jad | grep -Eo "[a-zA-Z]+\.[a-zA-Z]+\(\)" | grep -Eo "[a-zA-Z]+\." | grep -Eo "[a-zA-Z]+" > grep.temp
.\grep\grep.exe "Registered to: " .\Main.cfr | .\grep\grep.exe -Eo "[a-zA-Z]+\.[a-zA-Z]+\(\)" | .\grep\grep.exe -Eo "[a-zA-Z]+\." | .\grep\grep.exe -Eo "[a-zA-Z]+" > grep.temp
set /p class=<grep.temp
grep "Registered to: " .\Main.jad | grep -Eo "[a-zA-Z]+\.[a-zA-Z]+\(\)" | grep -Eo "\.[a-zA-Z]+" | grep -Eo "[a-zA-Z]+" > grep.temp
.\grep\grep.exe "Registered to: " .\Main.cfr | .\grep\grep.exe -Eo "[a-zA-Z]+\.[a-zA-Z]+\(\)" | .\grep\grep.exe -Eo "\.[a-zA-Z]+" | .\grep\grep.exe -Eo "[a-zA-Z]+" > grep.temp
set /p identify=<grep.temp

REM Patching
Expand All @@ -44,9 +44,9 @@ echo public static boolean %validate%() { return true; } >> %class%.java
echo public static String %identify%() { return "%identification%"; } >> %class%.java
echo public static String %validate%(String name, String key) { return null; } >> %class%.java
echo } >> %class%.java
javac -encoding UTF-8 %class%.java -d .
.\jdk\bin\javac.exe -encoding UTF-8 %class%.java -d .
copy .\charles_original.jar .\charles.jar /y >nul 2>&1
jar -uvf .\charles.jar ./com/xk72/charles/%class%.class >nul 2>&1
.\jdk\bin\jar.exe -uvf .\charles.jar ./com/xk72/charles/%class%.class >nul 2>&1
copy .\charles.jar "%charles%" /y >nul 2>&1

REM Cleaning
Expand All @@ -62,4 +62,4 @@ echo.
echo Done!
echo.

pause
pause
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This script will basically gain you Full Version without having the license.

## How to use the script?

Download and Run "Charles Patcher.bat" as Administrator.
Download this github repo then ectract it and configure "set charles" with the correct path in "Charles Patcher.bat" before running it as Administrator.

It will automatically patch "charles.jar" file and replace the original file for you.

Expand Down
Binary file added cfr-0.150.jar
Binary file not shown.
Binary file removed jad.exe
Binary file not shown.