Which language should I choose for creating bots? Python or C#?

kevinlewontin

Registered Member
Joined
Apr 25, 2016
Messages
64
Reaction score
33
Hey, guys.

I want to code bots to automate tasks. I have a rather limited knowledge of programming. I'm strong in basics and OOP concepts. Not an expert, though. I've only created console apps so far. So, I have no idea how to create bots with GUI. I did a bit of research, and I found out a lot of people in BHW suggest C#. However, some people seem to suggest Python too. I can get started with anything.

I would like to have a few questions answered.

1. Which language should I use and why?
2. Which one provides the best performance?
3. Which one is the best for multithreading?
4. Where can I learn GUI programming quickly?
5. What other things should I know before I start coding bots?
 
Last edited:
1. They are both very robust solutions for coding bots.
2. Same performance as long as you know what you're doing.
3. They both support multithreading.
4. There's no "quick" way to learn anything.
5. So many other skills which I won't go into detail here, but depending on what you need, these should be useful:

Automating Websites
- Network protocols (primarily HTTP)
- Web Scraping (HTML / DOM parsing)
- Reverse Engineering (Javascript / Network Traffic)
- Digital Footprints (Cookies, Browser Fingerprinting, IPs, etc)

Automating Software / Games
- Network protocols
- Packet Sniffing
- API Hooking
- Memory management
- Reverse Engineering

I think choosing one of these 2 languages will heavily depend on what your intentions are in terms of software design and deployment.

Looks like you're starting from zero so this is what I -again- * I * would do in your situation which isn't necessarily the right option for everyone:

Are you coding a private tool only for yourself?
> No GUI? > Python
> GUI - Desktop Based? > C# or Python (depending on target platform and desired GUI - although both can be multi-platform)
> GUI - Web Based? > Python + Django

Are you coding a tool that you want to distribute in the future?
> Desktop Based? > C# or Python (note that both languages can be easily disassembled and cracked)
> Web Based - Scalable? Python + Django + Celery

Choosing between Desktop (client-side) and Web Based (server-side) will depend on things like:
- Whether or not you want your code to be reverse engineered and cracked.
- Whether or not you can host the whole tool & processing on your servers.
- Whether or not your target audience want to host their own copy of the software.

Hope that helps.
 
> Desktop Based? > C# or Python (note that both languages can be easily disassembled and crack3d)

Is there any way to not get your bot crack3d? I want to make money off of coding bots. Crackabl3 bots doesn't make much money, right?
 
As a rule of thumb, anything that runs on client-side (e.g. your computer) can be reverse engineered and manipulated. There's no point in fighting crackers, no matter what you do, you can't win. If you think you can, well... Adobe might be interested in buying your licensing system because since 1982 they have yet to come up with a viable so- called "anti cracking solution".

What you can do is design your system wisely in a way that it depends, as much as possible, on server-side programming. This means fully web based tools or maybe desktop tools that rely on dynamic data pulled from your server on a daily basis.

Crackable bots are still profitable, if not check the marketplace, most of the tools being sold there are easily crackable. People still buy their license because:

* they want to support the developer
* they are scared of downloading infected cracks
* they need daily/weekly updates and support

The latter seems to be a pretty popular business model nowadays. You need to find a way to provide value to your customers on a daily basis and they will surely purchase your license.
 
I guess I must develop bots in C# and a server-side scripting language then. I know a little bit of PHP and NodeJS. Not everything. But enough to get up and running soon. Which one do you suggest?
 
Last edited:
There are only 10 kinds of people in this world: those who know binary and those who don?t. ;)
 
I write my bots in pyhton simply because I put them on my raspberry pi and use crons to trigger them, I don't need a GUI for them. I'm thinking of creating one using Windows IoT and C#, but haven't had the time to create one. I think that C# offers a bit more protection against cracks and the drag and drop IDE in visual studio is really good when you want a GUI for your bots.
 
For GUI go for C#.
For Console go for Python.
For speed go for one of them.

Anyway, even thought Python is recommended for such things, I'd go for C# for multiple reasons.
 
It wouldn't be too very difficult to make a GUI using something like Django, though.
 
Talking about bots and GUI I thought about using Go and as for GUI just run a local http server the moment the bot is launched and server all GUI in a browser. For me, web technology is the ultimate solution for GUI :)
 
Python is easier, and if you're targeting more than just Microsoft Windows, it's what you're going to want to use given those two choices.

C# is a more advanced language though, and in my opinion has better multithreaded/async features than python which go a long way when writing bots.

I write a LOT of Ruby code, but I write almost all of my bots in Java/Clojure because parallel and async are so much better.
 
C rocks. You can compile your code for Linux as though Linux systems cost cheaper if you think about growing your business to very large scales. Java may be alternative for portability if you are a person who likes easy-coding.

But my favourite one is C#.
 
Talking about bots and GUI I thought about using Go and as for GUI just run a local http server the moment the bot is launched and server all GUI in a browser. For me, web technology is the ultimate solution for GUI :)
This is also how I work. Take a look at atom.io
 
I would go with Python - it's just simplier so a lot less headaches
 
Choose whatever language. The hard part won't be learning the language itself (although it depends on your previous programming experience). The hard part will be everything else. As Shirko already pointed out, there are many skills that you will need to obtain before you can make a bot; especially a bot that you can sell to other people.

Just to answer some of your questions.
1. Which language should I use and why?
If you are very new to programming, use Python. It's just great. Python is a megahyped language for beginners.
However, if you have any solid experience in programming, choose whatever you like, seriously, it won't matter, because:

- You won't have to care about performance, you aren't making a resource-heavy application
- Both languages offer solid abstractions, you won't have to care about pointers or memory management
- Both C# and Python have a good knowledge base, anything from Stackoverflow threads to docs and guides
- Both support multithreading.

If you want to write a GUI for Win systems quickly, C# is the way to go.

P.S. my five cents on your concerns about application security. Every system can be cracked, don't be bothered by making your application secure, it will only make things harder both for you and your future customers.
 
Every system can be cracked, don't be bothered by making your application secure, it will only make things harder both for you and your future customers.
Wait, what? Why should he not bother about application security? Let's say he had an API, then you would tell him to leave the doors open? "Every system can be cracked" - yes, but it doesn't mean you should not bother at all, you can lose money by laziness and no one wants that. Okay, I know he's a beginner, but you said "future customers", so I assume you're talking about selling an (insecure) application.
 
Wait, what? Why should he not bother about application security? Let's say he had an API, then you would tell him to leave the doors open? "Every system can be cracked" - yes, but it doesn't mean you should not bother at all, you can lose money by laziness and no one wants that. Okay, I know he's a beginner, but you said "future customers", so I assume you're talking about selling an (insecure) application.

I am talking about goofing around with a custom DRM when you are a beginner, not about leaving an unprotected databse on :3306.
 
Back
Top