|
Known solution for your issue is already given by Ashok. Based on definision,
'Obfuscation refers to the deliberate act of nondestructively changing either the source code of a computer program or machine code when the program is in some compiled or binary form, so that it is not easy to understand or read'
So once you apply this techinics in your source, it is very tough to read or understnd the flow of source or ideas invloved in it. Because it will rename with non identifiable string.
You can have a look at the give url also. Hope this will give you some more ideas in Obfuscation.Obfuscation[^]
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I have seen this so much it makes me sad. Do you really care if the person sees how you assign text to a Label? Hell NO! If you have propriety algorhytms, invest in a decent obfuscator/encrypter (not the crap u get for free), or hire a person that can code in C/C++, or learn yourself how to do it.
Now secondly, even if someone reconstructes the source code, if your application is so big, dont you think it will take quite a few man hours to figure it out, learn what the code does? I doubt anyone will bother, would be easier just to buy the application.
xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
|
|
|
|
|
Ok, thanx to all for your answer....ok, ok, i understand, it's not a problem it's a feature. But that feature makes my commercial projects in open source projects. I'll try to obsfucate my code or try native C++.
|
|
|
|
|
I just want to make it clear that there is no way, whatsoever, to completely protect your code from being reverse engineered. If code can be executed, it can be reversed. It does not matter whether it's written in .NET, native C++, VB, COBOL, or any other language.
I know it's a rather sobering fact, but it's one that all developers of commercial software need to realize. What you should do is worry less about this and try to focus on realistic security goals. You can't stop reverse engineering, but you can make it as boring and annoying as possible. Go ahead and use obfuscators/encryptors/packers, but make sure that they do not negatively affect the user experience. Test your app thoroughly after being protected. If you provide a trial or demo of your app, do no include full functionality. I don't mean disable some functions here. I mean don't include them at all. Disabled code can be enabled again. Finally, if you have some licensing or registration scheme, accept that pirates will be able to reverse it and shoot for simply trying to keep your users honest. If you are ambitious and have a significant amount of time, have your licensing use strong encryption implemented correctly. You can also use things like watermarks to track pirated copies of your software.
Basically, what you ask is impossible, but do your best and don't panic.
|
|
|
|
|
Hai,
I am having following queries regarding to C#.Please clear my Queries
1) Is C# fully dependendent of DotNet. With out dotnet C# don't have any existance?
2)Without using dotnet frame work's compiler can we compile a C# program.Any other compiler is there to compile a C# program.
3) Can we write stand alone programs in C# and compile?
4)Can we develop any application using C# alone in notepad editor and without using dotnet(including dotnet frame work)
5) What is the compiler compiles C# program in dotnet frame work?
Please give me a clear view in this.
Thank You,
Rahul.P.Menon.
SoftwareDeveloper(.NET)
|
|
|
|
|
As i know, C# runs in other frameworks rather MS .NET like: Mono, GTK#. C# is framework dependant (i think that's why we call it managed code, there's a lot of undercode, correct me if i'm wrong).If you have one of the above frameworks you can surely write apps in notepad.
That's all i can say for now (not too much).
|
|
|
|
|
Hello
Rahul.P.Menon wrote:
1) Is C# fully dependendent of DotNet. With out dotnet C# don't have any existance?
Is it possible to produce eggs without chickens ? No.
C# is a .NET language, so any program written on C# requires .NET framework.
Rahul.P.Menon wrote:
2)Without using dotnet frame work's compiler can we compile a C# program.Any other compiler is there to compile a C# program.
You can try to look on Mono[^] project, which allows you to write C# application on Linux and Windows too.
Rahul.P.Menon wrote:
3) Can we write stand alone programs in C# and compile?
Do you mean which does not require .NET framework ? No again.
Rahul.P.Menon wrote:
4)Can we develop any application using C# alone in notepad editor and without using dotnet(including dotnet frame work)
You can write your application in any editor, even in notepad if you are masochist. But, no, you will not be able to compile it without .NET Framework.
Rahul.P.Menon wrote:
5) What is the compiler compiles C# program in dotnet frame work?
csc.exe
With best regards,
Andrew
|
|
|
|
|
Hai,
Thanks much for the valuable information. But it really seems bad for powerful language like C# always depend on dotnet frame work.
Thank you,
Rahul.P.Menon
SoftwareDeveloper(.NET)
|
|
|
|
|
Rahul.P.Menon wrote:
But it really seems bad for powerful language like C# always depend on dotnet frame work.
Why?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Rahul,
Your statement is roughly analagous to saying:
"It seems bad for this lovely suede bucket seat to depend upon an engine, steering wheel, suspension, wheels, chassis and drive train to get around." Without the mechanical parts, there is no car no matter how lovely and soft the seat is (provided your last name isn't Flintstone).
The language is a tool for combining and expressing the contents of the framework in interesting or useful ways (or in completely boring or silly ways - makes no difference). It might be considered nothing more than a convenience or abstraction to save developers the time it would take to write IL directly, and that's really all it amounts to - semantic games to keep developers working and off Prozac.
Without the framework, C# or any of the other .Net languages would have little of the power they now offer in terms of rapid development. They would lack (among other things) a type system and a runtime environment - CLR and CTS are both considered parts of the framework. For giggles, imagine coding an application without any of the types in mscorlib.dll some time.
It might be easier to think in framework-centric terms. The framework is the necessary part of any managed code solution; the language is the variable/disposable part - it matters least.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hai,
Whatever you told is right.If a car engine is specific for particular wheel or a particular chasis or steering how we can say that we can depend on that car engine.If the car engine functions independendent of other things , a person can use accessories he like.
C++,VB,Java are using independantly to develop stand applications. Like that why C# alone is not using to develop applications.But C# is using with dotnet to develop application.
If the csc.exe compiler can compile C# program ,Can it use alone to develop applications.
I know using dotnet tool it is easy and rapid to make applications.So developing application without tool is out of scope and not necessary.Only because of this C# is not trying to use alone.
Because of my anxiety I raised these queries,so that I can correct my wrong I deas and aquire much information.Thank you very much for all the help and information provided.
Thank You,
Rahul.P.Menon
SoftwareDeveloper(.NET)
|
|
|
|
|
Rahul.P.Menon wrote:
C++,VB,Java are using independantly to develop stand applications.
Each of these is no different than C# or VB.NET or Managed C++.
Wrong. They all have their own run-time environments. Java is the closest cousin to the .NET Framework. The compilers for C++, C#, and VB.NET are built into the .NET Framework, exctly like Java's compiler is built into it's framework environment.
C# is just as "stand alone" as anything else...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It is powerful because it DOES depend on the .NET framework, as do C++.NET and VB.NET. Java depends just as greatly on the JRE, the only difference is terminology.
VB6 might be just a little more independent, but you could say that it depends on the Windows framework (system DLLs), they just happen to come with the operating system.
I can write a program in PowerBuilder 9 and compile it, but I must make sure the user has PBVM90.DLL and LIBJCC.DLL on the path for that executable. And if I want use Datawindows, PBDWE90.DLL. And if I want to use an ODBC database, PBODB90.DLL and PBODB90.INI. (The list goes on...) Those are PowerBuilder's "framework", although they don't call it that.
The advantage with C# (and C++ and VB) .NET is that you (the developer) don't have to worry about the framework being on the path, windows handles that for you. The user can install the .NET framework from the web, and you can just give them your EXE file. (Or whatever you developed).
Perhaps you are confused about the difference between the .NET framework and Visual Studio .NET? Your users don't have to have Visual Studio, they only need the .NET runtime, which is freely downloadable from Micorsoft.com.
|
|
|
|
|
look at the lines:
double x = double.MaxValue;
double y = double.MaxValue;
double what = (x+y)-y;
if c# select the double operator+(double,double), then what should be "PositiveInfinity"; but it is double.MaxValue!
Why does this happen? Is there a
decimal operator + (double,double)?
If there is, then there should be no " double operator +(double,double)".
Who knows the fact? Please help. Thanks.
|
|
|
|
|
I think that the compiler optimizes x+y-y to x.
---
b { font-weight: normal; }
|
|
|
|
|
nope.
(x+y)-y got the same result.
|
|
|
|
|
Here is the compiled code:
x = double.MaxValue;<br />
<br />
00000020 mov dword ptr [ebp-10h],0FFFFFFFFh<br />
00000027 mov dword ptr [ebp-0Ch],7FEFFFFFh<br />
<br />
y = double.MaxValue;<br />
<br />
0000002e mov dword ptr [ebp-18h],0FFFFFFFFh<br />
00000035 mov dword ptr [ebp-14h],7FEFFFFFh<br />
<br />
z = x + y - y;<br />
<br />
0000003c fld qword ptr [ebp-10h]<br />
0000003f fadd qword ptr [ebp-18h]<br />
00000042 fsub qword ptr [ebp-18h]<br />
00000045 fstp qword ptr [ebp-20h]
The actual calculation is done in the FPU, storing the result of the first calculation internally. It looks like the datatype used internally can handle larger values than a double, as the result of the calculation is correct.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I have a windows form application that works well in my computer in debug and release modes from IDE and windows explorer. I do XCOPY deployment on other computer. When I run the applicaiton there, it gives System.TypeInitialization exception.
As expected, this exception is thrown when I call a class with only public static variables...no constructors, propterties and methods.
How can I solve this issue?? Please help me
Cheers
CNU
|
|
|
|
|
This may seem stupid, but it's the most common mistake with XCOPY deployment. Did you make sure you copied all the .DLL files in the bin folder to the applications deployment folder? Did you reference some other assembly that's registered in the GAC on the development machine, but is not deployed to the target machine?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I solved that problem...and you are absolutely right.
One of the dll files used has CopyLocal value set to false. It worked in my system as the dll was copied to GAC.
Thanks a lot for your help.
|
|
|
|
|
No problem!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have written an AVLTree class and I was doing some benchmarking using System.Collections.Hashtable as a comparison. And I was surprised by the results. (I am self-taught and so I never had a college level data structures class so please excuse my ignorance.) I did an insert of 1,000,000 random integers into each (using System.Random with a maximum of 10,000,000) followed by 100,000 random (using System.Random with a maximum of 1,000,000) key searches on each. Each time the results were pretty much as follows:
AVLTree test:
Inserts: 951625 - Height: 23
Time: 10:435 sec - Memory: 45.892 KB
Hashtable test:
Inserts: 951803
Time: 4:977 - Memory: 46.723 KB
AVL lookup performance test
Found: 9514 - Time: 350 ms
Hashtable lookkup performance test
Found: 9422 - Time: 70 ms
I tried both Hashtable.ContainsKey and Hashtable.Item with the same "lookup" results. The only thing that seems to vary is that sometimes the Hashtable doesn't use up so much memory (I've seen as low as 32 KB).
I even ran ANTS Profiler on my code to improve the data structure's performance. But I don't see where I could squeeze out another 6 seconds on inserts and while 350 ms isn't anything to laugh at it's much more than 70 ms.
I thought that trees were super efficient data structures used for high speed updates/queries and large amounts of data. (I know this isn't the only application for trees but this is the problem I'm looking to solve). Based on what I had read I decided to put the time in to learn about trees and implement one in a scenario at work where I needed high performance.
So my question is, "When would I want to use a tree instead of a hashtable for heavy data indexing?". I may be a rookie on this one but I'm not proud so I would be happy to send the code in question to anyone interested in my question.
|
|
|
|
|
IMO Hashtables are best for this type of thing. Trees are better if you need partial matches.
One reason why Hashtable runs so fast, it has a native runtime implementation, so even if you duplicate the C# code for it, it will probably be 2-3 times slower.
I have run some benchmarks on a Blowfish implementation i did. Quite suprising results.
C#: 5MB/s
C# optimized: 12MB/s
MC++ optimized managed: 35MB/s
MC++ optimized mixed: 45MB/s
You can squeeze alot of speed using some native code.
xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
|
|
|
|
|
leppie wrote:
IMO Hashtables are best for this type of thing. Trees are better if you need partial matches.
By partial matches do you mean multi-column keys like in a database index? Or even breaking up a key into segments like you might do for an IP address?
leppie wrote:
One reason why Hashtable runs so fast, it has a native runtime implementation
Based on what you say, it makes sense that a hashtable would be faster because of native code, but I'm also interested in why a hashtable would be better in a general sense.
|
|
|
|
|
|