##################################################### #Matthew Russell 7 Apr 05 # #An adaptation of a sample script from Sandmark's #help menu. Sandmark runs this script for you via #the "decompile" tab. Don't run it manually. #If the locations of your jar files are different, #change them where noted. # #See http://www.cs.arizona.edu/sandmark/ for more info. # #Make sure this script is in your path. You can type #"which jDecompile" in Terminal to make sure it is. ###################################################### #!/bin/csh -f set jarPath = $1 set className = $2 set classPath = $3 #the main runtime jar file for Soot's internal classpath set RT = /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar #soot's internal classpath set SOOTCP = /Library/Java/Home/sootclasses-2.2.1.jar:/Library/Java/Home/jasminclasses-2.2.1.jar:/Library/Java/Home/polyglotclasses-1.3.jar:$RT set TMP = $jarPath/SOOT-RESULT set CMD = "java -classpath $SOOTCP soot.Main -f dava -soot-classpath $jarPath/:$classPath/:$RT -d $jarPath" if ($className == "ALLCLASSES") then set XCMD = "$CMD -process-dir $jarPath" else set XCMD = "$CMD $className" endif $XCMD >&! $TMP grep Exception $TMP > /dev/null if ($status == 0) then echo "Executing Soot failed." cat $TMP exit endif foreach out (`grep "Generating" $TMP | sed 's/Generating//g;s/\.\.\.//g' `) cat $out echo "---------------------------" end