Python vs C# (Discussion)

Status
Not open for further replies.
Yes Valentinas25, this is what I have been thinking that if Python and even C# code is that much unsafe then why the heck people are coding big software these languages. Of course there is some work out to make the code safe (though at least I don't know about that).
 
Dont get it wrong, just because you can decompile it easy does not means its unsafe to use or that you will be a full target for crackers or w/e.

Have you ever decompiled any application before ? Do you know what xor is ? Have you tried to read an obfuscated code ?

There are many terms here, an obfuscated code in many cases will be unreadable and render the decompiled code useless some one WITH TONS and I MEAN TONS of time in their hands might be able to reproduce the application back it but image how long it would take for a huge obfuscated code to get there. At that time he might be thinking, I should have done one myself.

They might be able to cracked your lincese or w/e but there ways around it to protect it as well for instance not shipping your application with full code and having it download part of the code on the fly and several other ways.

That is why MANY MANY MANY MANY companies have been using and will most likely keep using it.

Also there are lots of other things that takes places but these were just samples.
 
I can not use python in my desktop programming. I only can use this for web programming only.
 
Have you ever decompiled any application before ? Do you know what xor is ? Have you tried to read an obfuscated code ?

There are many terms here, an obfuscated code in many cases will be unreadable and render the decompiled code useless some one WITH TONS and I MEAN TONS of time in their hands might be able to reproduce the application back it but image how long it would take for a huge obfuscated code to get there. At that time he might be thinking, I should have done one myself.

That goes for the languages that compile to native code only ;) For the rest, it 's decompile, deobfuscate et voila! - the code.
 
That goes for the languages that compile to native code only ;) For the rest, it 's decompile, deobfuscate et voila! - the code.

Yeah go ahead and un'xor some .net code that uses a custom xor method and we can discuss what you said above after ;)

And if that is the case, there is also IDA :) for native code, the same saying goes, as long as the programmer have the time and knowledge should be pie cake.
 
I second this. Java is my choice actually when doing automation stuff.

Java is probably what best fits your needs. It's faster than python for one. Python can only come close if you use pypy; which is currently in beta and only supports intel chips. Java can be deployed on all platforms. It also has component classes similar to c#, you could use the netbeans ide to build GUIs' http://netbeans.org/features/java/swing.html
You said also wanted to do automation, htmlunit http://htmlunit.sourceforge.net/ alternatively there's also selenium.
 
I think that was actually MAD trying to troll me as he knows full well about my everlasting hatred of all things Java.
 
I was thinking the same, after reading/searching in little depth about Python that Java is what I shall think of now. Well, I hope Java has GUI based IDE like Visual Studio for C# and of course don't want to carry frameworks like in C# ---

Python is good but the only thing that is stopping me from Python is that I have to make GUI in some separate software and write the source code in some other editor...May be it's because I am moving from C# and now I am habitual of using it this way!!!

Anyways, if nothing helped then lol C# is the last resort!!!!
 
Yes, I am downloading Java SE bundled with JDK 6 right now and for automation, going to download HtmlUnit... :)

Thanks a lot everyone for your help, suggestions and specially for your time. I'll update thread, if I face any trouble or have any other question.

This post has really helped me till now and I hope that this is what actually I'm looking for!
Java is probably what best fits your needs. It's faster than python for one. Python can only come close if you use pypy; which is currently in beta and only supports intel chips. Java can be deployed on all platforms. It also has component classes similar to c#, you could use the netbeans ide to build GUIs' http://netbeans.org/features/java/swing.html
You said also wanted to do automation, htmlunit http://htmlunit.sourceforge.net/ alternatively there's also selenium.
 
I second this. Java is my choice actually when doing automation stuff.

Friend, do you use HtmlUnit for automation or have any better/other suggestion? (I am starting off with Java SE ~ netbeans)
 
I have tried HtmlUnit it is good to some extent but still needs to mature more, you will most likely want to go for selenium or similar solutions depending on what site is your target.

I would say you could use HtmlUnit for about 75% more websites around.
 
C# and Python are not mutually exclusive, they compete in different domains. You should look at the problem you are trying to solve and use the proper language for the task.

C# is a compiled language, and as such, you get a lot of the niceties that comes with a statically typed language. Many errors are caught at compile time, and as a result, it makes you more rigorous in your approach. Similar to Java, you are forced to write OO code, which may or may not be a good thing. An improvement over Java, you can have anonymous closures, which allows you to be a little more expressive. Not to mention, LINQ is a godsend!

If you want to write a desktop application for Windows, you are better off with C# because of Visual studio (the best IDE out there in my opinion). For most other things, it's not a game changer for me. For most of what you will probably write, speed difference between C# (or Java) and Python is insignificant. You'll probably shave 1 or 2 seconds, even 15 seconds, it's not worth it.

As far as Python being harder, I disagree with this completely. Unless you've been writing in compiled languages for the past decade, Python is much easier to pick up. Being dynamically typed, things "just work." Here's the difference between Python and C#:

Python
Code:
print "Hello world"

C#
Code:
static class Program
{
    static void Main()
    {
        Console.WriteLine("Hello world");
    }
}

This is a stripped down version by having removed all the imports. Look at the difference in verbosity!

Regarding browser auto--mation (I'm not allowed to write that word :(), I would probably bet on PhantomJS (right tool for the right job). It uses headless webkit (think Chrome and Safari), so you have full JavaScript support with proper HTML parsing support. I wrote a twitter account creator in about 50 lines of JavaScript using PhantomJS, not bad.
 
Yeah go ahead and un'xor some .net code that uses a custom xor method and we can discuss what you said above after ;)

Well, since one can actually read the "custom xor" function (which is a rather inconsistent name, there 's only 1 definition of the xor truth table - else it 's not xor anymore), it can be of an arbitrary complexity you like. One will copy paste the code, run it over the string and decrypt it in < a minute :D
 
It is worth noting that your anti-reversing efforts more or less simply define the type of people who will end up taking your code apart rather than preventing it from happening completley. Reversing from machine code is not impossible as some would leave you to believe, especially when you are looking for a functional description rather than source that can be put back through a compiler.
 
i would use c# to build great multi-threaded applications, databases, scrapers, parsers - all complicated stuff as it has great debugging tools.
i would use python for form processing, text file processing - utility stuff as you can modify and fix it very fast in working environment without recompilation.

both c# & python require appropriate framework to be installed.
 
Well, since one can actually read the "custom xor" function (which is a rather inconsistent name, there 's only 1 definition of the xor truth table - else it 's not xor anymore), it can be of an arbitrary complexity you like. One will copy paste the code, run it over the string and decrypt it in < a minute :D

LMAO I would discuss with you but after what you said I dont think it will worth the time, nevertheless good lucky wasting your time.
 
Last edited:
Alot to take in for someone getting their feet wet in botting!

In Selenium, would it be possible to clear the brower cache/cookies and use a new proxy? Or am I barking up the wrong tree?
 
Alot to take in for someone getting their feet wet in botting!

In Selenium, would it be possible to clear the brower cache/cookies and use a new proxy? Or am I barking up the wrong tree?

Is it possible in HtmlUnit? (Using Java)
 
Alot to take in for someone getting their feet wet in botting!

In Selenium, would it be possible to clear the brower cache/cookies and use a new proxy? Or am I barking up the wrong tree?

Yes with google/firefox driver it is possible you would use private session basically.

Is it possible in HtmlUnit? (Using Java)

Yes it is.
 
Last edited:
Status
Not open for further replies.
Back
Top