[Soot-list] Possible to use SootClass object outside of transform() ?

Joe Roback robackja at cs.arizona.edu
Wed Nov 26 16:51:08 EST 2008


that was our thought also. if an soltution doesn't present itself
rather quickly, we will probably go the thread route. thanks again
eric.

Joe

On Wed, Nov 26, 2008 at 2:44 PM, Eric Bodden <eric.bodden at mail.mcgill.ca> wrote:
> From your description, I think that it would be easiest to prevent
> Soot from "finishing" in the first place, i.e. bring it to block just
> after all your transformations have run. Then, when you need to
> perform additional work with Soot you awaken its blocked thread and
> have it perform the transformations (e.g. obfuscations) you want to
> do.
>
> Eric
>
> 2008/11/26 Joe Roback <robackja at cs.arizona.edu>:
>> Hi Eric.
>>
>> How about a 2 second overview of the project. Client/Server. Client
>> asks Server for program blocks to run an application. Server provides
>> them. Server is continuously obfuscating the blocks as it sends them
>> to the Client. That is a high-high-level overview, skipping over lots
>> of details.
>>
>> And we do run some code within the control flow of soot main method to
>> start with. But its the continuous replacement part, where we want to
>> continuously obfuscate the generated program blocks. Program flow
>> looks like this
>>
>> Server starts
>>  - Run SOOT over program, spliting program into blocks using custom
>> soot tranformer
>>  - At this point, soot.Main() has finished.
>>  - Opens Socket and between serving Blocks to Client
>>
>> The idea here is each time the same block is served to the client, its
>> changed using some obfuscation technique. Re-running Soot each time is
>> not feasible, since it takes 2 minutes+ to run even for a simple
>> program on a fast machine (Soot is generating the call graph to map
>> dependencies between program blocks -- old code, stuff I didn't
>> personally write)
>>
>> I keep looking into it. :) I was just really looking for a "maybe" or
>> "absolutely not" feasible.
>>
>> thanks for quick reply eric.
>>
>> Joe
>>
>> On Wed, Nov 26, 2008 at 2:14 PM, Eric Bodden <eric.bodden at mail.mcgill.ca> wrote:
>>> Hi Joe.
>>>
>>> I have never tried to add functionality after main(..) has completed
>>> running. I am sure it can be done but it could be painful. What
>>> exactly are you trying to achieve? Why can't you run your code from
>>> within the control flow of Soot's main method?
>>>
>>> Eric
>>>
>>> 2008/11/26 Joe Roback <robackja at cs.arizona.edu>:
>>>> Hello All.
>>>>
>>>> I am working on a continuous-replacement project with Christian
>>>> Collberg here at the University of Arizona. In the project we need to
>>>> keep SootClass objects around and manipulate them after-the-fact (ie
>>>> after soot.Main is run). Is this feasible?
>>>>
>>>> if I try to even write out a SootClass using JasminClass outside the
>>>> transform() I get errors of "no active body". Backtrace looks like
>>>> this:
>>>>
>>>> java.lang.RuntimeException: method: <init> has no active body!
>>>>        at soot.AbstractJasminClass.emitMethod(AbstractJasminClass.java:687)
>>>>        at soot.AbstractJasminClass.<init>(AbstractJasminClass.java:568)
>>>>        at soot.jimple.JasminClass.<init>(JasminClass.java:62)
>>>>        at server.blockify.SootOutput.writeByteArray(SootOutput.java:74)
>>>>        at server.blockify.BlockifiedBlock.getClassBytes(BlockifiedBlock.java:68)
>>>>        at server.blockify.BlockifiedBag.getBlock(BlockifiedBag.java:47)
>>>>        at server.components.Scheduler_c.processClientRequest(Scheduler_c.java:98)
>>>>        at server.components.BlockProvider_c.run(BlockProvider_c.java:37)
>>>>        at server.components.ServerInstance_c.startServerInstance(ServerInstance_c.java:78)
>>>>        at server.control.ServerApplication_c.run(ServerApplication_c.java:115)
>>>>        at java.lang.Thread.run(Thread.java:613)
>>>>
>>>> So, is this feasible thing to do with SOOT? or must all SOOT related
>>>> manipulations happen within the SOOT tranformations?
>>>>
>>>> thanks. much appreciate the help.
>>>>
>>>> Joe Roback
>>>> _______________________________________________
>>>> Soot-list mailing list
>>>> Soot-list at sable.mcgill.ca
>>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>>>
>>>
>>>
>>>
>>> --
>>> Eric Bodden
>>> Sable Research Group, McGill University, Montréal, Canada
>>> Got an interesting job offer? http://www.bodden.de/hire-me/
>>>
>>>
>>
>
>
>
> --
> Eric Bodden
> Sable Research Group, McGill University, Montréal, Canada
> Got an interesting job offer? http://www.bodden.de/hire-me/
>
>


More information about the Soot-list mailing list