-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathjava-hacking.cheat
More file actions
16 lines (10 loc) · 1.31 KB
/
Copy pathjava-hacking.cheat
File metadata and controls
16 lines (10 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
% Java Cheats
$ jar: find "$(pwd)" -maxdepth 1 -type f -name '*.jar' 2>/dev/null | sort -u
$ apk: find "$(pwd)" -maxdepth 1 -type f -name '*.apk' 2>/dev/null | sort -u
$ output: printf '%s\n' ./unzipped
# unzip and decompile with procyon from nixpkgs
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ unzip ]' -c unzip -d <output> <jar>
#find <output> ! -type d | grep -v '\$' | grep -v 'meta-inf' | grep -v org|grep "\.class" | while read class; do procyon $class -o .;done
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ findutils ]' -c find <output> ! -type d | grep -v '\$' | grep -v 'meta-inf' | grep -v org|grep "\.class" | while read class; do $class -o .;done
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ findutils ]' -c find unzipped2 ! -type d | grep -v '\$' | grep -v 'meta-inf' | grep -v org| grep "\.class"
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ procyon ]' -c procyon -jar <jar> -o <output>