[Soot-list] Modifying initial values fields of method.
Marc Miltenberger
Marc.Miltenberger at cased.de
Mon Feb 16 16:29:54 EST 2015
The method is called <clinit> and has the subsignature
void <clinit>()
Am 16.02.2015 um 21:56 schrieb Roman Petriev:
> Well ... How can I get access to clinit with soot? BodyTransformer
> couldn't find this method.
>
> 2015-02-16 21:58 GMT+03:00 Marc-André Laverdière
> <marc-andre.laverdiere-papineau at polymtl.ca
> <mailto:marc-andre.laverdiere-papineau at polymtl.ca>>:
>
> If the field is static, then it will be in clinit...
>
> Marc-André Laverdière-Papineau
> Doctorant - PhD Candidate
>
> On 16/02/15 01:25 PM, Roman Petriev wrote:
> > Unfortunately, it didn't help :( ....
> >
> > Simplest <init> contains 3 items, e.g.:
> >
> > r0 := @this: decomp.Decomp
> > specialinvoke r0.<java.lang.Object: void <init>()>()
> > return
> >
> > Decomp class contains 2 constants.
> >
> > Do you have any ideas else?
> >
> > P.s. javap:
> >
> > private static final java.lang.String FUUU;
> > Signature: Ljava/lang/String;
> > flags: ACC_PRIVATE, ACC_STATIC, ACC_FINAL
> >
> > ConstantValue: String fdgsfdhsrthd
> >
> >
> > private static final java.lang.String AAAA;
> > Signature: Ljava/lang/String;
> > flags: ACC_PRIVATE, ACC_STATIC, ACC_FINAL
> >
> > ConstantValue: String olololo
> >
> > Probably, constants were initialized somewhere else ...
> >
> >
> > 2015-02-16 14:22 GMT+03:00 Bodden, Eric <eric.bodden at sit.fraunhofer.de <mailto:eric.bodden at sit.fraunhofer.de>
> > <mailto:eric.bodden at sit.fraunhofer.de
> <mailto:eric.bodden at sit.fraunhofer.de>>>:
> >
> > Hi Roman.
> >
> > You will find the appropriate assignment within the body of the
> > method <init> within SomeClass. You need to modify the assignment there.
> >
> > Hope this helps,
> > Eric
> >
> > > On 16.02.2015, at 11:15, Roman Petriev <vvpiroman at gmail.com <mailto:vvpiroman at gmail.com>
> > <mailto:vvpiroman at gmail.com <mailto:vvpiroman at gmail.com>>> wrote:
> > >
> > > I do body transformation (Jimple) for JBCO, and I need to do this
> > for code obfuscation.
> > >
> > > 2015-02-16 13:10 GMT+03:00 Roman Petriev <vvpiroman at gmail.com <mailto:vvpiroman at gmail.com>
> > <mailto:vvpiroman at gmail.com <mailto:vvpiroman at gmail.com>>>:
> > > Ok.
> > >
> > > E.g.:
> > >
> > > public class SomeClass{
> > >
> > > //I want to get/set value of this constant.
> > > private final String SOME_PARAMETER = "value";
> > >
> > > public static void main(String[] args) {
> > >
> > > //................
> > >
> > > }
> > > }
> > >
> > > It's possible?
> > >
> > >
> > > 2015-02-16 9:26 GMT+03:00 Bodden, Eric
> > <eric.bodden at sit.fraunhofer.de
> <mailto:eric.bodden at sit.fraunhofer.de>
> <mailto:eric.bodden at sit.fraunhofer.de
> <mailto:eric.bodden at sit.fraunhofer.de>>>:
> > > Hi Roman.
> > >
> > > If you describe your problem in more detail then there is a
> > better chance that people will be able to help you out.
> > >
> > > Best wishes,
> > > Eric Bodden
> > >
> > > > On 15.02.2015, at 22:22, Roman Petriev <vvpiroman at gmail.com <mailto:vvpiroman at gmail.com>
> > <mailto:vvpiroman at gmail.com <mailto:vvpiroman at gmail.com>>> wrote:
> > > >
> > > > Hi all!
> > > >
> > > > I want to get/set initial value of method field
> > (java.lang.String). How I can do it?
> > > >
> > > > Best regards,
> > > > Roman.
> > > >
> > > > _______________________________________________
> > > > Soot-list mailing list
> > > > Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>
> <mailto:Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>>
> > > > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> > >
> > > --
> > > Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/
> http://bodden.de/
> > > Head of Secure Software Engineering at Fraunhofer SIT, TU
> > Darmstadt and EC SPRIDE
> > > Tel: +49 6151 16-75422 Fax: +49 6151 869-127
> > > Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
> > >
> > >
> > >
> >
> > --
> > Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/
> http://bodden.de/
> > Head of Secure Software Engineering at Fraunhofer SIT, TU
> Darmstadt
> > and EC SPRIDE
> > Tel: +49 6151 16-75422 Fax: +49 6151 869-127
> > Room B5.11, Fraunhofer SIT, Rheinstraße 75, 64295 Darmstadt
> >
> >
> >
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>
> > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> >
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
More information about the Soot-list
mailing list