Quantcast
Channel: Gemalto Sentinel Customer Discussions
Viewing all articles
Browse latest Browse all 1619

Envelope Java JAR file - is it possible to disable obfuscation but encrypt all code?

$
0
0
I’m testing the envelope product on java Jar file (few classes).
In my project I’m using Log4j to log messages.
I noticed that the name of the classes/methods are obfuscated.
Is it possible to disable obfuscation and only encrypt the code?
By the way, the only obfuscation settings I saw are disabled:



Sample of logging when running the jar (in red I would like to see the real class and method names. I saw it only in the main class I run. Also the stack trace is obfuscated too):

c:\Work\dev\sentinel>java -cp test-0.0.1-SNAPSHOT.jar;C:\Users\tomerm\.m2\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;C:\Users\tomerm\.m2\repository\org\slf4j\slf4j-log4j12\1.7.5\slf4j-log4j12-1.7.5.jar;C:\Users\tomerm\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar test.test.App
2018-02-11 11:29:23,079 [INFO] App.main:15 - Hello World!
2018-02-11 11:29:24,665 [INFO] COoN4X4GnMK9qQkn.Ha2uDzVDZbj64QkL:13 - this is OK
2018-02-11 11:29:24,665 [INFO] App.main:18 - pass OK
2018-02-11 11:29:24,727 [ERROR] NT2v0iCLyDVXhYVE.LevQorDE76r6r6xd:19 - this is bad
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.aladdin.nemesis.d.do(pd:150)
        at com.aladdin.nemesis.e.b.do(s:570)
        at com.aladdin.nemesis.e.a.do(r:169)
        at com.aladdin.nemesis.DGC_F534E230FD4236C586C12F34734FA44C96A44D96FFCF6972CA449132.aldn_1989undnochda_mwtbdltr(qd:49)
        at test.test.TestLog.bad(TestLog.java)
        at test.test.App.main(App.java:19)
Caused by: java.lang.NullPointerException
        at NT2v0iCLyDVXhYVE.LevQorDE76r6r6xd(Unknown Source)
        ... 10 more

I would like to see the following:

2018-02-11 11:21:09,933 [INFO] App.main:15 - Hello World!
2018-02-11 11:21:09,955 [INFO] TestLog.isOK:13 - this is OK
2018-02-11 11:21:09,955 [INFO] App.main:18 - pass OK
2018-02-11 11:21:09,956 [ERROR] TestLog.bad:19 - this is bad
Exception in thread "main" java.lang.NullPointerException
at test.test.TestLog.bad(TestLog.java:21)
at test.test.App.main(App.java:19)

Viewing all articles
Browse latest Browse all 1619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>