[Soot-list] Replace byte code in java class file

Jun Liu jun.liu at dcu.ie
Sun Sep 15 18:39:19 EDT 2013


Hi all

I appreciate if anyone can give some advices of the issue I encountered.

I'm new to soot, I've been searching for materials of soot online for the
last few days and tried to read all online documentations. However, I
haven't find an answer about whether soot can do exactly what I want.


So my problem is that is it possible soot can read a java class file and
update an arbitrary statement in the class file (for instance, replace
java.sql.DriverManager with xx.xxx.DriverManager) and then output to a new
.class file. So far  I can only do this by generating a jimple file first,
read jimple file as string into java code and then replace, e.g.,
DriverManager, with xxx.xxx.DriverManager, and then run soot again to
generate a new class file for me.


I'm wondering if anyone know is there a way to do this in Java??

-- 


*

Email Disclaimer

"This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee. Any unauthorised dissemination, distribution or copying of this message and any attachments is strictly prohibited. If you have received this e-mail in error, please notify the sender and delete the message. Any views or opinions presented in this e-mail may solely be the views of the author and cannot be relied upon as being those of Dublin City University. E-mail communications such as this cannot be guaranteed to be virus-free, timely, secure or error-free and Dublin City University does not accept liability for any such matters or their consequences. Please consider the environment before printing this e-mail."

Séanadh Ríomhphoist

"Tá an ríomhphost seo agus aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus sin amháin é. Tá cosc iomlán ar scaipeadh, dháileadh nó chóipeáil neamhúdaraithe ar an teachtaireacht seo agus ar aon cheangaltán atá ag dul leis. Má tá an ríomhphost seo faighte agat trí dhearmad cuir sin in iúl le do thoil don seoltóir agus scrios an teachtaireacht. D’fhéadfadh sé gurb iad tuairimí an údair agus sin amháin atá in aon tuairimí no dearcthaí atá curtha i láthair sa ríomhphost seo agus níor chóir glacadh leo mar thuairimí nó dhearcthaí Ollscoil Chathair Bhaile Átha Cliath. Ní ghlactar leis go bhfuil cumarsáid ríomhphoist den sórt seo saor ó víreas, in am, slán, nó saor ó earráid agus ní ghlacann Ollscoil Chathair Bhaile Átha Cliath le dliteanas in aon chás den sórt sin ná as aon iarmhairt a d’eascródh astu. Cuimhnigh ar an timpeallacht le do thoil sula gcuireann tú an ríomhphost seo i gcló."
*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130915/303eb633/attachment.html 


More information about the Soot-list mailing list