java versus c# - which one is safer in terms of security? [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I and some buddies have an argument here -
in which langauge is it safer by terms of writing a code that cannot be hacked?
by hacked I mean that after the code is encrypted, or turned into executable , it can be reversed enginered into some kind of intermidate code (like java byte code) , or even the real high level program code itself .
This agruments aruse in general because one of us is about to start a big software project,but he's afraid that his competitors will steal some of his very-efficient algorithams.
It would be nice if any of you could present some pros and cons for each langauge .
thanks.

I don't really get to work with Java so I'm more familiar with C#.
In C# (or other .net languages) you can use easy and free tools like Reflector to see ALL of the code written inside an executable or dll.
You can always try obfuscating the code with the most advanced tools, so this won't be revealed easily, but I'm pretty sure that if the code is worth enough for someone to hack/reverse-engineer, It WILL be, and it's just a matter of time till that happens!
Even with lower level languages like C/C++, if the code is worth it, the people interested will find out how it works.
Bottom line : EVERYTHING IS HACKABLE/REVERSE-ENGINEERABLE!
:)

Both Java and C# can be decompiled to (mostly) your original source code. In .Net you have Reflector, in Java you have DJ's Decompiler. It works both ways.
In the end, it doesn't really matter. If someone is determined, they can always dis-assemble your code and still get the "efficient algorithms". Any code readable by the CPU is readable by a human.

Since by "security" you seem to mean protection against reverse-engineering, your best bet is probably native code like C/C++... most interpreted languages are much easier to decompile than native code, although you can obfuscate them to make it harder.

Related

Picking a parser generator for building an interpreter for a custom language using C#? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
This is the first time I go into actually trying to implement a Domain Specific Language.
I know the basics of language grammars and Abstract Syntax Trees, however I didn't get my hands dirty in implementing them before.
I want to build a small language, simple variables/arrays and conditional statements. I want to interpret and execute the user entered code via an interpreter I build by C#. Something pretty similar in spirit to PHP tho way simpler.
I searched and I became confused.
Best parser generators I found which had good C# supports were Gold and Irony. I also found ANTLR but I saw too many people complaining about problems with C# suppots. Also, the three of those seem to lack good documentation.
My main fear is to begin working with one of them and then discovering its not usable for the task, either because of lack of good C# support, or good documentation or something else. I want something that I can begin working with "confidently" to get myself kickstarted in the project.
Could anyone help me to pick something that does the job well and guaranteed to work well with C# ?
I suggest you to use ANTLR. I wrote my own compiler (for MSIL) using it.
ANTLR has C# support and i did not found any problems with it.
U can also look at my source code (i can not be working sample, but it has ANTLT .g file) for sample.
I suggest you try TinyPG. It compiles to C#, and you can provide C# directly in the grammar.

What is the difference between C#.Net and VB.Net (Except Syntax)? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Please let me know the difference between C#.Net and VB.Net. I use C#.Net for my projects, but when ever I met with some other programmers they often called VB.Net more powerful and easy, than C#.Net. I always asked them "Why it is more powerful then C#, since it uses the same framework?" but still I didn't get any helpful answers.
Pointers (C#)
XML literals (VB.NET)
VB6 leftovers (VB.NET)
A few other syntax differences
In the end, not a whole lot. Although, some say C# programmers are better paid (never looked into it, but it's possible).
It also depends on your definition of 'powerful' and 'easy'. Both are powerful at their jobs. C# may have a slight advantage in terms of performance since it has pointers.. but they are rarely used in most cases.
Technically, there is no difference except the syntax. Both use the Common Language Runtime (wikipedia) (msdn). They are just two different languages that use the same libraries, and actually compile to the same thing. This is one of the reasons you can write a library in VB.net, compile it to a dll, and include that dll in a c# program.
There are some small differences, but for the most part, the choice of one over the other is almost entirely personal preference. Personally, I find the c# syntax to be less prone to errors, but some people like the "english-ness" of VB.
It's the same thing. I don't even know why Microsoft have C# and VB since it really does the same things.

what is UPX's best compression method [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I Have been trying out different EXE packers recently. I tried out ASPack, UPX, mPress etc.. While trying out half a dozen packers, i observed that most of the packed EXE's can trigger false virus signatures. Even UPX is no exception. Still, my choice is UPX. Can anybody, please, suggest me what is the best possible compression / packing method available in UPX.?
I am quite satisfied with UPX --lzma myEXE.eXE
still, would love to hear for you people on this.
I am not comfortable with UPX --ultra --brute myEXE.EXE since it eats up hours to do the trick.
I used UPX a lot, and there was not a big difference between the versions.
The latest --lzma setting produces very good results, and --ultra --brute is indeed not worth the time spent. At best, 1% of better compression rate... you should better subsample your internal bitmaps or refactorize the code.
But, especially with Delphi applications, I do not use UPX any more. You spoke about anti-virus software false positive, and it is a huge problem. For instance, it sounds like if some "cheap" anti-virus software introduced very simple (and false) heuristic patterns, like "UPX+Delphi=potential malware" or "Delphi+size<300KB=potential malware".
If you try to submit such executable files to http://virustotal.com, you'll find out that about 8% of the anti-virus engines are doing such wrong guess.
I've seen some of my web sites flagged as "malware URI", because of this. I've seen some customers complaining about my deliveries to be infecting their computers. Not worth it.
To reduce the executable size, I therefore rely rather:
On embedding most resources (textual, bitmaps, even external dll) as .zip inside the .exe, and uncompress them on purpose;
On using our LVCL library, which is able to create some very small executable (if your UI needs are simple, e.g. for a setup or update program) - see here the latest source code for Delphi 5-2007.

Best place to learn C++ for a C# programmer [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have been developing using c# now since the first release of .NET. I have never really spent time on C or C++ and thought it would be a good idea to get a little more awareness. Does anyone have any recommendations for sites that would provide a good learning/tutorial for someone that has c# experience to venture into C++ a little?
Thanks
Warning: C++ is not C and the following is related only with C++.
If you are already a c# developer I think you should work in three different directions:
1) copy semantic, memory management and const keyword, these are the main differences between c# and c++.
Make yourself familiar with copy constructor, destructor and assignment operator. Learn how to use RAII idiom.
Study the differences between passing a variable by: value, reference and pointer.
I will suggest Effective C++ http://www.amazon.com/Effective-Specific-Improve-Programs-Designs/dp/0321334876 also guru of the week it is a great source.
In More Effective C++ there is a nice chapter on the difference between pointer and reference.
2) you need to make yourself familiar with the standard library, in my opinion this is a really good book http://www.amazon.co.uk/Standard-Library-Tutorial-Reference/dp/0201379260/ref=sr_1_4?ie=UTF8&qid=1314957062&sr=8-4
3) the standard library is great but not enough, you will soon need boost.
I am reading this book at the moment http://www.amazon.co.uk/Beyond-Standard-Library-Introduction-Boost/dp/0321133544/ref=sr_1_1?ie=UTF8&qid=1314957541&sr=8-1
I haven't finished it yet, but it looks good so far.
Keep practise, you are going to love coding in c++.
You've already been given several good suggestions, but the wealth of information available on StackOverflow alone may be a bit overwhelming, so I'll give you a very specific bit of advice.
Rather than look for a tutorial on the web get a good book such as "C++ Primer" by Lippman, Lajoie & Moo. It is useful both as a tutorial and as a reference and is currently the most modern among the good, thorough books about C++.
This tutorial is good Teach Yourself C++ in 21 days.
21 Days is an overstatement by the way, you can breeze through that tutorial a lot faster, but it's comprehensive and easily understandable, and I recommend it.
Good luck!

Opensource projects to learn from [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I often read that one of the best ways to continue learning how to programme is to study great opensource projects out there in the wild. Can somewhere recommend a good open source C# project that they learned a lot from. I've been coding a couple of years, both windows and web apps, pretty standard stuff, sql server, asp .net. I'm particulary interested in improving my skills in building well architectured n tier apps
Thanks,
Brendan
Microsoft's own ASP.Net MVC project is open source. It's under their own license, which is probably pretty restrictive about what you can actually do with the code. But it's a pretty large project and interesting to look at.
Have you looked at Codeplex? There are over 800 open source C# projects there.
At the general level, I've found that standard library code is often good to learn from. Reading the source to application code is certainly useful. However, reading the code to STL, or D's std.algorithm or something that is similar, teaches you how to think on a higher level, and to create generic, reusable code. In contrast, application code is often more ad-hoc and heavier on boilerplate, and therefore not as educational.
For your specific case, I'd read the code to the libraries/frameworks you're using. It's interesting in and of itself to know how these things work instead of taking them as magic, and they're written by top-tier programmers and probably much higher quality and much more dense in terms of significant programming concepts per line than most application code.
MediaPortal. Some of it is fabulous, some of it is bad. However, if there is anything you want to do, its in there somewhere.
How about the OpenJDK (the open source version of the
Java Development Kit)?
Here is OpenJDK 6
Here is OpenJDK 7 (release planned for 2010 or so)
Have a look at the NHibernate code its fantastic
their repository is here

Categories

Resources