Obfuscate a Single Java Class File using Third party tool - encryption

I'm currently looking for some tool which can Obfuscate a Single Class file. Where it would be better when you suggest me some tool for Control flow obfuscation.I have tried proguard, DashO, and some tool where it doesn't supports the Class file and supports Jar. I have also tried JShrink where it can accept Class file and Obfuscate it which I would prefer some similar tools.
Thanks in Advance

Related

Moving Functionality to a class library project - what to do with the related resources?

I have a .net project whose part of the functionality is xls transformation.
I now want to move that functionality away from the main project to a separate class library project.
I have no problems moving classes and accessing them, but part of the resources that I wanted to move were xslt files that define the transformations. Those files were originally located in the special asp.net folder: App_Data and then accessed using Server.MapPath(~/App_Data/XSLT/anXsltFile.xslt)
I wanted to move those files to that separate library as well, but not sure how to approach it, and how to access those files within the class library.
Perhaps embed the xslt files inside your class library and stream read them as necessary to perform your transforms
http://support.microsoft.com/kb/319292
How to embed a text file in a .NET assembly?
http://blogs.msdn.com/b/alexdan/archive/2007/12/19/loading-embedded-resources-in-c-using-getmanifestresourcestream.aspx
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/1d341eae-fed4-408c-8791-96e96a5fd99c/
I think a class library, unlike a web site project, should not have file resources. It should supply the functionality to the web site project which will host the files.
I personally consider both the class library and the xslt files to be resources of the web site. Lets say you want to use this same class in a different app or web site, with different xslt files.
It's bad for re-usability.
I suggest you to use string constant in Web.Config with the Server.MapPath path and use these to load the xslt files.
I hope it's helpful
if you mantain the xsltfiles on the app_data, you must use
httpcontext.current.server.mappath("...your path...")
if you move the xslt files to the assembly too, you must get the Assembly resource...

flex MS Project library

Is there ActionScript library that works with MPP(MS Office Project)? library that parses MS Project XML?
Also please advice me all links that may help me
I don't know of such a library per-se, but I just happened to implement something along these lines this week. I wrote a simple script to parse exported MSProj CSV files into XML and then sent that XML into my Flex application. Maybe you can do something similar on the server side.
I doubt you will find a native AS3 class that parses the proprietary binary format of Project, so some intermediate format might be necessary here.

Link an external library at runtime in .NET

Is it possible for my application to monitor a folder that if we copy a DLL (library) in it, the application will pick it up and link it?
I did a similar thing in C++ back in the days but is it possible to dynamically link a library in .NET?
Thanks
Using reflection you could.
Poll the directory for added files, and then if you find one, load it using reflection and run some Main method inside it.
However you can't "unload" these DLLs unless they are loaded into seperate AppDomains.
Absolutely. See this SO question or consider using the MEF.

Creating a javadoc web from compiled jar library

I have a third-party library in the form of a jar containing only class files.
I'd like to be able to run javadoc (or some other tool) and generate a reference to the library API calls that I can make.
I know I'm not going to get many useful comments, but I'm not expecting that. I just want the auto-generated summary of the classes and calls.
What is the best way to go about doing this?
EDIT: As good as jad is, it doesn't generate perfect code. Consequently, javadoc complains. Is there any way to tell javadoc to ignore the errors and generate documentation as best as it can?
How about decompiling the classes and running javadoc on the output?
Try [jad](http://en.wikipedia.org/wiki/JAD_(JAva_Decompiler)).

Is there a standardised way to embed metadata (e.g. version, license) in SWC components?

Scenario: there is an Adobe Flex 3 project which uses several third-party libraries and components in the form of SWC files.
How can we know "what is inside" those SWC files? Specifically, how can I make sure that the project uses the latest versions of all those components?
According to official Adobe Flex 3 help, "you can define" (sic) a version property for a component that you intend to package and distribute. Something along the lines of:
private static const version:String = '1.0.0.42';
But that property is not treated in any special way by Adobe's authoring tools, and I suspect that it is not commonly used by the community, anyway.
The file catalog.xml that is inside all SWC components doesn't seem to contain anything useful in that sense.
Are developers distributing SWC usually embedding metadata in those files in any way? Is there a standardised way to retrieve data such as version, license, author and copyright from a SWC file?
I would consider it good practice to include the version name in the .swc file itself. For example, if you use the Mate framework, the swc filename is something like Mate_08_5.swc. At a quick glance, you can see that you're using version 0.8.5.
As far as license goes, usually you distribute a LICENSE text file within the .zip that contains your .swc file.
You could look into RSL digests. These attach a different hash value to each version of a particular library (swc/library/libraries/digests in the catalog.xml file) . Then all you have to do is only load the library with the known digest value.
If you don't have any control over the SWC files being used and they're not using digests, you are kind of stuck with whatever proprietary versioning system the vendor is using though.
You are making an interesting point.
Adobe has provided a way to include basic metadatas in SWFs (and thus in SWCs) but this is stored in the binary and there's no way to extract it without decompilation.
Interestingly, if one knows how to read a SWF, extracting metadatas is fairly easy. But most of the time it doesn't contain any useful information because obviously authoring tools don't let you simply view it...
So I guess first we need some integration in our authoring tools, then we may begin finding useful information in the metadatas :)
SWCs are generally distributed in a package with other supporting files, such as documentation and examples. Version, license, and author information is usually available as part of that package in a separate readme or license file. I've never seen component developers in the Flex world compile that sort of information into the SWC itself.

Resources