Create your own Python server (for beginners)

Hello 0x00sec!

Many of the people who are new to the hacking world often wonder whether they are good enough to be a hacker. Well, what i think is that you cannot be a hacker without any practical application and only understanding things by reading is a total waste of time.

Maybe some you novice hackers will be fascinated by this source code of the Python server and Python client I am posting, but i would recommend you to read the code and understand what it does actually and try to create your own. Work in pairs as in this code my friend helped me mostly.

Note: Without port forwarding, you cannot use it with the Internet although it works like a charm on LAN.

Functions of this Server:
1.Connect to it with the help of the client.
2.Start the famous ‘make directory’ loop in the specified directory!
3.Use up to 12 Shell commands.
3.Delete files.

Server/Client link:


Could use some explanations.
To be honest, I haven’t read the code in full, but I saw that you didn’t write any comments. As I understood it, your intention was to teach people Python by example, and a comment here and there would not hurt that cause.

Furthermore, “understanding things by reading is a total waste of time” is a notion I have to oppose strongly. Of course, actually using your knowledge for, say, pentesting or programming or the like is essential, but it doesn’t make the acquiring of knowledge by reading useless. Theory is also an important part of hacking (and the connected world in general), for example how the stack and the heap work or what binary / hexadecimal is (and many more topics of course).

But apart from this, I’d like to thank you for your contribution. Python is one of the most commonly used languages in hacking and building a client/server - application and understanding how networking works is essential for every hacker.


Hey @Neo ,
I added an ‘only’ just to clarify what i mean from reading and just understanding. Only reading and calling yourself a geek doesn’t make you one. You have to show that you can do things. Although thanks for noticing! :relaxed:

Thank you so much! I remember when I had started learning Python as my first language, and I had become terribly confused! Beginners need tutorials like the ones above to help themselves further. Of course with Python I’m not a beginner, but it still included things I didn’t know about, so for that I thank you. :smile:

1 Like

Thanks for the contribution! In future you should consider using github/ to host your files, heck even pastebin. Google Drive isn’t that suited to code. You could also explain it line by line by embedding it in the post itself Check out the “how to format your code post”.

1 Like

Sad the link you gave isn’t available anymore. :frowning:

If you want to set up a Python webserver, read my Linux Article. Read method 2 Trix' with Linux 0x02 - Sharing files like a Boss!


This topic was automatically closed after 30 days. New replies are no longer allowed.