Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sootOptions.add("-src-prec");
- sootOptions.add("java");
- sootOptions.add("-keep-line-number");
- sootOptions.add("-output-format");
- sootOptions.add("jimple");
- sootOptions.add("-allow-phantom-refs");
- sootOptions.add("-no-bodies-for-excluded");
- sootOptions.add("-time");
- for (String p : processDirs){
- sootOptions.add("-process-path");
- sootOptions.add(p);
- }
- sootOptions.add("-prepend-classpath");
- sootOptions.add("-soot-classpath");
- sootOptions.add(classPath);
- ArrayList<String> firstRoundSootOptions = new ArrayList<String>(sootOptions);
- firstRoundSootOptions.add("-phase-option");
- firstRoundSootOptions.add("cg");
- firstRoundSootOptions.add("enabled:false");
- //Load the classes
- Scene.v().addBasicClass("javax.servlet.http.HttpServlet",SootClass.SIGNATURES);
- Scene.v().addBasicClass("org.apache.jasper.runtime.HttpJspBase", SootClass.SIGNATURES);
- soot.Main.main(firstRoundSootOptions.toArray(new String[firstRoundSootOptions.size()]));
- //Set entry points
- //...
- //Call graph phase options
- final String[] phaseOptions = new String[]{
- "cg,enabled:true",
- "cg,verbose:true",
- "cg.spark,enabled:true",
- "cg.spark,geom-pta:true"
- };
- ArrayList<String> phase2Options = new ArrayList<String>();
- for(String po: phaseOptions){
- phase2Options.add("-phase-option");
- for (String opt : po.split(","))
- phase2Options.add(opt);
- }
- logger.debug("Running soot with options: {}", phase2Options);
- soot.Main.main(phase2Options.toArray(new String[phase2Options.size()]));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement