Comments (8)
Update: I wasn't thinking very carefully about this issue and realized why this is happening while I was having a bowl of cereal.
In a SpringBoot application, it seems all the classes are moved into the BOOT-INF/classes
directory; however, the classes retain their names (meaning, classes don't have strange names of something like "BOOT-INF/classes/some/class/MyClass").
I suppose that this would require a special handling of SpringBoot applications (or similar) to specifically move the classes into their correct directory within the ZipFile.
from radon.
So, this is the tree structure of obfuscated jar
.
├── BOOT-INF
│ └── lib
│ ├── asm-6.2.jar
│ ├── ...
├── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ └── hello.jatin
│ └── hello
│ ├── pom.properties
│ └── pom.xml
├── hello
│ └── jatin
│ ├── Application.class
│ ├── DataClass.class
│ ├── HelloController.class
│ └── SerializableClass.class
└── org
└── springframework
└── boot
└── loader
├── ExecutableArchiveLauncher.class
├── ....
and this of original jar
.
├── BOOT-INF
│ ├── classes
│ │ └── hello
│ │ └── jatin
│ │ ├── Application.class
│ │ ├── DataClass.class
│ │ ├── HelloController.class
│ │ └── SerializableClass.class
│ └── lib
│ ├── asm-6.2.jar
│ ├── ...
├── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ └── hello.jatin
│ └── hello
│ ├── pom.properties
│ └── pom.xml
└── org
└── springframework
└── boot
└── loader
├── ExecutableArchiveLauncher.class
├── ...
Why is hello/jatin/
directory top level in obfuscated jar while it is nested inside BOOT-INF
in original jar?
from radon.
Also, if I obfuscate spring boot jar with Radon, and then run it I get this error:
Caused by: java.lang.IllegalStateException: Unable to open nested entry 'BOOT-INF/lib/maven-surefire-common-2.22.1.jar'. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file
while the backup jar runs fine.
from radon.
That can probably be fixed by changing the zip compression algorithm to a store. By default, Radon uses the default compression algorithm (most likely deflate or deflate64).
from radon.
@ItzSomebody any idea about change of directory structure issue? Is that the expected behaviour or a bug?
from radon.
Not expected behavior.
Edit: The behavior is actually expected, see below.
from radon.
Update: I wasn't thinking very carefully about this issue and realized why this is happening while I was having a bowl of cereal.
Spoken like a true developer
from radon.
Meet the same problem in my SpringBoot jar file , this BUG will fix in next version?
from radon.
Related Issues (20)
- radon can't find the class even if i put it in radon.jar HOT 2
- How to generate names using English alphabet? HOT 6
- [radon 3] NewArrayNode uses wrong operands (T_TYPE vs TYPE) HOT 2
- Building error HOT 1
- Bad usage of Map in ExclusionManager can lead to undesired effects
- Not obfuscating method parameters HOT 5
- Renamer + TrashClasses Bug HOT 16
- Maven plugin HOT 2
- Renamer \u0000 HOT 4
- Android Studio OR Intellij Idea Support HOT 5
- Setting exclusions hangs renamer
- java.lang.OutOfMemoryError: Java heap space HOT 1
- Gradle integration HOT 2
- Do not handle non-existent classes [JPhantom] HOT 2
- StackEmulationException: stackSize < 0 HOT 9
- [BUG] Software not changing anything HOT 1
- me.itzsomebody.radon.exceptions.RadonException: Could not find org/jboss/marshalling/ByteInput HOT 1
- Inefficiency and random unexpected exclusions in Renamer HOT 1
- Leeway is not updated in bitwise number obf transformers
- java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radon.