Skip to content

Instantly share code, notes, and snippets.

@DiabloHorn
Created June 11, 2018 17:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiabloHorn/9160056af4b9be6c57903bb150f6a8ac to your computer and use it in GitHub Desktop.
Save DiabloHorn/9160056af4b9be6c57903bb150f6a8ac to your computer and use it in GitHub Desktop.
Decompile multiple jar files for analysis
#!/bin/bash
#DiabloHorn - https://diablohorn.com
#easy opengrok analysis of all decompiled source
# sudo docker run -v /home/me/Desktop/libanalysis/srces:/src -p 9000:8080 itszero/opengrok
# http://localhost:9000/source/
OUTPUTDIR="srces"
DECOMPATH="/home/me/tools/javadecomp"
DECOMBIN="cfr_0_130.jar"
if [ ! -d "$OUTPUTDIR" ]; then
mkdir "$OUTPUTDIR"
fi
for i in $(ls -1 *.jar)
do
JARSRCES="$OUTPUTDIR/$i"
mkdir "$JARSRCES"
java -jar "$DECOMPATH/$DECOMBIN" "$i" --outputdir "$JARSRCES/"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment