obfuscation


How to manage Spring Getters and Setters Obfuscation in yguard


Hi i use yguard ant task to obfuscate my project, it goes well with renaming my java classes, and corresponding bean in spring xml files, but since the getter and setter methods are also renamed in java, the property names in spring injection does not match.. So i am unable to proceed. can any one tell me how to exclude setters and getters alone from obfuscating?
YGuard is not very good in this part, but why don't you try ProGaurd?
You can refer to ProGaurd examples section (http://proguard.sourceforge.net/index.html#manual/examples.html) which say:
Processing bean classes
If your application, applet, servlet, library, etc., makes extensive use of introspection on bean classes to find bean editor classes, or getter and setter methods, then configuration may become painful. There's not much else you can do than making sure the bean class names, or the getter and setter names don't change. For instance:
-keep public class mypackage.MyBean {
public void setMyProperty(int);
public int getMyProperty();
}
-keep public class mypackage.MyBeanEditor
If there are too many elements to list explicitly, wildcards in class names and method signatures might be helpful. This example should encompasses all possible setters and getters in classes in the package mybeans:
-keep class mybeans.** {
void set*(***);
void set*(int, ***);
boolean is*();
boolean is*(int);
*** get*();
*** get*(int);
}
The '***' wildcard matches any type (primitive or non-primitive, array or non-array). The methods with the 'int' arguments matches properties that are lists.
and if you also use annotations in your application:
Processing resource injection
If your application is using Java EE-style resource injection, the application container will automatically assign instances of resource classes to fields and methods that are annotated with #Resource. The container applies introspection, even accessing private class members directly. It typically constructs a resource name based on the type name and the class member name. We then have to avoid that such class members are removed or renamed:
-keepclassmembers class * {
#javax.annotation.Resource *;
}
The Spring framework has another similar annotation #Autowired:
-keepclassmembers class * {
#org.springframework.beans.factory.annotation.Autowired *;
}

Related Links

Protect AdWords Scripts
JS obfuscation not working?
Obfuscate single package with all dependencies
Obfuscating names with human readable names
Linux based virus / malware source code in C [closed]
Keep class methods but obfuscate packages in proguard
Mono.Cecil - obfuscated malicious code
TypeScript Obfuscation
.NET Reactor and InnoSetup
Theory of obfuscation and symbolic computation
Eazfuscator.NET error for custom build configuration
ProGuard obfuscate package name with -keeppackagenames
How to avoid that proguard obfuscates the classes annotated with #OnStart
Obfuscating URLs in WordPress
Protecting PHP CLI scripts
How to manage Spring Getters and Setters Obfuscation in yguard

Categories

HOME
numbers
interface
shiro
pclxl
knitr
opendj
vxml
missing-data
character
augeas
32bit-64bit
fhir
pega
keytool
alpacajs
easyphp
identity-management
jmp
ag
user-experience
exit
qliksense
google-api-client
tiki-wiki
google-cloud-print
interbase
ms-access-web-app
asymptotic-complexity
fractions
errbot
sqsh
corenlp-server
eviews
xbox
testbed
erb
rselenium
gojs
processwire
salesforce-communities
release
projects-and-solutions
metaprogramming
tasm
datacachefactory
softmax
sharp-snmp
strftime
datamaps
x-ray
context-switch
excel-dna
dt
cpu-cache
restore
donations
async.js
jboss-tools
udpclient
android-wake-lock
deep
toast
concept-insights
dllimport
xenomai
text-search
finalbuilder
zscript
baasbox
ocra
actionfilterattribute
mass-assignment
teaspoon
mdichild
named-parameters
lnk
xml-dsig
clickbank
xmltodict
openargs
artemis
route-provider
insert-id
mantle
argouml
saleslogix
floating-point-exceptions
tmx
svk
jqueryform
pos-for-.net
cfwindow
django-piston
echo3
filesystemobject
skype4java
fdf
sqlobject
product-management

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App