Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Crack Charles Proxy 4.1.3
charles=/Applications/Charles.app/Contents/Java/charles.jar
dir=charleshack
mkdir $dir
cd $dir
cat >> psPJ.java <<EOF
package com.xk72.charles;
public final class psPJ {
public static boolean qIvM() { return true; }
public static String tCiz() { return "https://0x0d.im"; }
public static String qIvM(String name, String key) { return null; }
}
EOF
javac -encoding UTF-8 psPJ.java -d .&& jar -uvf $charles com/xk72/charles/psPJ.class
cd .. && rm -rf $dir
@HeIp-zz

This comment has been minimized.

Show comment Hide comment
@HeIp-zz

HeIp-zz Jul 6, 2017

image

HeIp-zz commented Jul 6, 2017

image

@HeIp-zz

This comment has been minimized.

Show comment Hide comment
@HeIp-zz

HeIp-zz Jul 6, 2017

This one worked for me :+1 , indentation breaks it?:
#!/usr/bin/env bash
charles=/Applications/Charles.app/Contents/Java/charles.jar
dir=charleshack

mkdir $dir
cd $dir
cat >> psPJ.java <<EOF
package com.xk72.charles;
public final class psPJ {
public static boolean qIvM() { return true; }
public static String tCiz() { return "https://0x0d.im"; }
public static String qIvM(String name, String key) { return null; }
}
EOF
javac -encoding UTF-8 psPJ.java -d .&& jar -uvf $charles com/xk72/charles/psPJ.class
cd .. && rm -rf $dir

HeIp-zz commented Jul 6, 2017

This one worked for me :+1 , indentation breaks it?:
#!/usr/bin/env bash
charles=/Applications/Charles.app/Contents/Java/charles.jar
dir=charleshack

mkdir $dir
cd $dir
cat >> psPJ.java <<EOF
package com.xk72.charles;
public final class psPJ {
public static boolean qIvM() { return true; }
public static String tCiz() { return "https://0x0d.im"; }
public static String qIvM(String name, String key) { return null; }
}
EOF
javac -encoding UTF-8 psPJ.java -d .&& jar -uvf $charles com/xk72/charles/psPJ.class
cd .. && rm -rf $dir

@SETSESSION

This comment has been minimized.

Show comment Hide comment
@SETSESSION

SETSESSION Jul 17, 2017

very good

very good

@randykaskuser

This comment has been minimized.

Show comment Hide comment
@randykaskuser

randykaskuser Sep 6, 2017

java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at sun.tools.jar.Main.createTempFileInSameDirectoryAs(Main.java:144)
at sun.tools.jar.Main.run(Main.java:260)
at sun.tools.jar.Main.main(Main.java:1288)

can someone help me please, was run .sh on charles 4.1.4
Ubuntu 16.04 LTS

randykaskuser commented Sep 6, 2017

java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at sun.tools.jar.Main.createTempFileInSameDirectoryAs(Main.java:144)
at sun.tools.jar.Main.run(Main.java:260)
at sun.tools.jar.Main.main(Main.java:1288)

can someone help me please, was run .sh on charles 4.1.4
Ubuntu 16.04 LTS

@randykaskuser

This comment has been minimized.

Show comment Hide comment
@randykaskuser

randykaskuser Sep 6, 2017

update: work as well on Ubuntu 16.04 LTS
sudo cp '/home/randykaskuser/Downloads/CharlesHack-master/charles.jar' '/usr/lib/charles-proxy'

update: work as well on Ubuntu 16.04 LTS
sudo cp '/home/randykaskuser/Downloads/CharlesHack-master/charles.jar' '/usr/lib/charles-proxy'

@feix

This comment has been minimized.

Show comment Hide comment
@feix

feix Dec 31, 2017

cat charles.general.crack.sh

#!/bin/bash

charles=${1:-/Applications/Charles.app/Contents/Java/charles.jar}
charles=$(find $charles -name charles.jar)
charles=$(realpath $charles)
dir=charleshack

mkdir $dir
cd $dir

unzip -o $charles 'com/*' 2>/dev/null || exit 1
jad -o -r -s java com/**/*.class 2>/dev/null || exit 1
package=com.xk72.charles
main=${package//.//}/Main.java
validate=$(grep -Eo 'protected boolean [a-zA-Z]+' $main | awk '{print $NF}')
call=$(grep 'Registered to: ' $main | grep -Eo '[a-zA-Z]+\.[a-zA-Z]+\(\)' | tr -d '()')
class=${call/.*/}
identify=${call/*./}
identification=https://www.charlesproxy.com


cat >> $class.java <<EOF
package $package;
public final class $class {
    public static boolean $validate() { return true; }
    public static String $identify() { return "$identification"; }
    public static String $validate(String name, String key) { return null; }
}
EOF
cat $class.java
echo javac -encoding UTF-8 $class.java -d . || exit 1
echo jar -uvf $charles ${package//.//}/$class.class || exit 1
cd .. && rm -rf $dir

feix commented Dec 31, 2017

cat charles.general.crack.sh

#!/bin/bash

charles=${1:-/Applications/Charles.app/Contents/Java/charles.jar}
charles=$(find $charles -name charles.jar)
charles=$(realpath $charles)
dir=charleshack

mkdir $dir
cd $dir

unzip -o $charles 'com/*' 2>/dev/null || exit 1
jad -o -r -s java com/**/*.class 2>/dev/null || exit 1
package=com.xk72.charles
main=${package//.//}/Main.java
validate=$(grep -Eo 'protected boolean [a-zA-Z]+' $main | awk '{print $NF}')
call=$(grep 'Registered to: ' $main | grep -Eo '[a-zA-Z]+\.[a-zA-Z]+\(\)' | tr -d '()')
class=${call/.*/}
identify=${call/*./}
identification=https://www.charlesproxy.com


cat >> $class.java <<EOF
package $package;
public final class $class {
    public static boolean $validate() { return true; }
    public static String $identify() { return "$identification"; }
    public static String $validate(String name, String key) { return null; }
}
EOF
cat $class.java
echo javac -encoding UTF-8 $class.java -d . || exit 1
echo jar -uvf $charles ${package//.//}/$class.class || exit 1
cd .. && rm -rf $dir
@arimcore

This comment has been minimized.

Show comment Hide comment
@arimcore

arimcore Jan 7, 2018

Hello, some recommendation? (after implement the fix is my app freezed)
screen shot 2018-01-07 at 21 51 33

arimcore commented Jan 7, 2018

Hello, some recommendation? (after implement the fix is my app freezed)
screen shot 2018-01-07 at 21 51 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment