Limited support for multiple assemblies

.NET obfuscator and automated error reporting

Limited support for multiple assemblies

Postby logandam » Fri May 23, 2014 11:44 am

My company purchased SmartAssembly because we've had an incident where one of our ex clients started making their own version of our software. I've been tasked with using it to obfuscate our code to make it a little more difficult to do so.

Now I understand that a lot of applications generally have one main executable with one or two libraries, and SmartAssembly makes it really easy to manage everything if that's the case since you can embed your libraries within your main application. That's great for that use case. But I am struggling to come up with ideas on how to do this with our applications, which have several hundred separate executables (our applications have some main processes that monitor for work and fire off separate individual processes based on the work) and each one loads a common set of libraries (and even those can differ). This means we can't do the embedding because then we're going to increase the size of each binary several times their original size which is just a waste of size, and it also makes it a pain to set up a separate project for every single executable.

I know there is a command line interface to SmartAssembly but it still relies on having project files. Ideally I'd like to just be able to use the command line to do something along the lines of "smartassembly -i <input> -o <output> [options]" or have one SmartAssembly project for every binary we have.

I've searched on the net and had a look at the documentation and I haven't come up with anything like this. Is it possible for SA to do what I describe above or am I going to have to set a day where I just make projects for all 400+ assemblies we have?
logandam
 
Posts: 3
Joined: Fri May 23, 2014 11:27 am

Postby Brian Donahue » Tue May 27, 2014 12:07 pm

You could write a batch command that creates projects for your assemblies.
http://documentation.red-gate.com/displ ... +line+mode

The /create argument lets you specify an .saproj file that contains the automatically-generated project. You can try this in a batch:

FOR %N in (*.exe) do "c:\\program files\\red gate\\smartassembly 6\\smartassembly.com" /create "c:\\SAProjects\\%N.saproj" /Input "%N" /output "c:\\protectesassemblies\\%N"

I hope this helps.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby logandam » Tue May 27, 2014 12:10 pm

Thanks, I was hoping to avoid that but it will have to do. Is there perhaps anything planned to make this simpler in a future release?
logandam
 
Posts: 3
Joined: Fri May 23, 2014 11:27 am

Postby Brian Donahue » Fri May 30, 2014 8:22 am

You can use the command-line and it will create the projects for you with one command. Have you got any suggestions as to how to make the process easier?
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby logandam » Fri May 30, 2014 8:32 am

Well I don't know how the internals of SA work but I don't see why you can't have multiple assemblies or targets in a project file, or maybe have a solution file tying up several project files like visual studio does just to consolidate things a bit better. Maybe I'm just lazy :D
logandam
 
Posts: 3
Joined: Fri May 23, 2014 11:27 am

Postby Brian Donahue » Wed Jun 04, 2014 8:27 am

It would not be easy - error reporting and other functions assume a one-to-one relationship between the project and the assembly.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests