[Soot-list] Class Hierarchy with no entry point - catch 22?

Eric Bodden eric.bodden at ec-spride.de
Tue Jun 12 19:40:52 EDT 2012


Marc-Andre,

recently there was another person with a similar problem, after which
I patched Soot to circumvent this problem (IIRC). Are you using the
nightly build? If not, please try that. Also, please browse the list's
archive a bit.

Eric

On 13 June 2012 02:46, Marc-Andre Laverdiere-Papineau
<marc-andre.laverdiere-papineau at polymtl.ca> wrote:
> Hello,
>
> I am trying to find all the servlets in my program, so that I can set
> those as entry points.
>
> Now, a good way to doo that, I think, is to use the class hierarchy.
>
> Sadly, I get an exception, "java.lang.RuntimeException: There is no main
> class set!".
> Is there a way to  deal with this without having a dummy main class?
>
>
> P.S. My code:
>
> //Work in whole-program mode
> Options.v().set_whole_program(true);
> Options.v().set_exclude(Arrays.asList("java", "javax", "org.hibernate",
> "sun"));
> // General Options
> Options.v().set_allow_phantom_refs(true);
> Options.v().set_no_bodies_for_excluded(true);
> Options.v().set_time(true);
> Options.v().set_verbose(false);
>
> //First, do a simple class hierarchy analysis
> Options.v().setPhaseOption("cg", "enabled:true");
> Options.v().setPhaseOption("cg.cha", "enabled:true");
> Options.v().setPhaseOption("cg.spark", "enabled:false");
> Options.v().setPhaseOption("cg", "implicit-entry:true");
> Options.v().setPhaseOption("cg", "all-reachable:true");
>
> Scene.v().loadNecessaryClasses();
> PackManager.v().runPacks();
>
> final String servletClassName = "javax.servlet.http.HttpServlet";
> for (SootClass sc :
> Scene.v().getActiveHierarchy().getSubclassesOf(Scene.v().loadClassAndSupport(servletClassName))){
> System.err.println("Servlet class: " + sc.getShortJavaStyleName());
> }
>
>
> --
> Marc-André Laverdière-Papineau
> Étudiant au doctorat - PhD Student
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list



-- 
Eric Bodden, Ph.D., http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Principal Investigator in Secure Services at CASED
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list