CodeOnBy - In Between Bytes
  • Home
  • Programming
    • JavaScript
    • Python
  • System
    • Cross-platform
    • Linux
    • macOS
    • Windows
  • Gear
  • About Me
Home
Programming
    JavaScript
    Python
System
    Cross-platform
    Linux
    macOS
    Windows
Gear
About Me
CodeOnBy - In Between Bytes
  • Home
  • Programming
    • JavaScript
    • Python
  • System
    • Cross-platform
    • Linux
    • macOS
    • Windows
  • Gear
  • About Me
Browsing Category
Cross-platform Linux macOS Programming Python System Windows

Python Chat Server (2 of 7)

December 12, 2019 No Comments

[ Part 1 (Overview) – Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7 ]

Welcome to my blog’s first tutorial series!

Make sure to watch for in depth code analysis.

In the first part of this project, the overview, we looked at the finished program, how it’s going to look once we wrap up the last part along with a lot of details about everything we’ll be covering along the way.

If you haven’t checked out the first part, go ahead right now, I’ll wait…

Also make sure you have all the required software: Python 2.7.

Done? Alright, grab your beverage of choice and get ready!

Setting Up Our Script

From this point forward, all the information is in the video guide, assuming you have already installed a text editor (like Sublime Text or Notepad++)…

Let’s begin by creating a nice folder to save our script. I decided to name mine PyCS.py (as in Python Chat Server, abbreviated accordingly).

Since we’re going to develop two scripts separately at first, I recommend having that folder so you don’t make things messy in your desktop.

It’s also useful in case you need to backup one of the scripts along the way.

Let’s Write Some Code

I will not go fully in depth on each line of code here in the blog, since I made a 30 minute video where everything is explained clearly.

In any case, I will lay down explanations for individual blocks of code here.

Also if you don’t care about writing the code yourself, I will leave the script for download at the bottom of each post for easy access. 😉

Continue reading
Reading time: 5 min
Share:
Written by: codeboss
Cross-platform Linux macOS Programming Python System Windows

Python Chat Server Overview (1 of 7)

December 11, 2019 No Comments

[ Part 1 (Overview) – Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7 ]

Welcome to my blog’s first tutorial series!

Here you can enjoy the video version of this blog; and keep on reading for further details about the overall project and what you’ll learn along the way.

In this project we will program a Python chat server using threads to make sure we can receive any number of connections while still being able to handle many clients as well – using a single script as the final product for simplicity.

While searching the web, I was unable to find many tutorials that worked like this, so grab some coffee and get ready to start writing some code ayyy!

Fire up your favorite text editor!

Wait, hold up, not so fast there…

Before getting our hands dirty, let’s take a look at some details about this project, for example, what software we’ll need, what will you learn along the way, how exactly is this program going to operate, and so on.

Required Software

First of all, you will need Python 2.7 (as of right now, the current version is actually 2.7.17). Go ahead and install it from their official page. Note that older versions should work also, but you will be responsible for minor syntax changes.

Second thing you’ll need, of course, is a solid text editor. I highly recommend Sublime Text for many reasons which I could devote a whole post to (and I just might in the future!). In any case, Notepad++ is a solid choice too.

Alright, that’s all the software we need. On to the project…

What you will learn

The main goal of this project is to teach different components, such as:

  • Using timestamps
  • User input and output
  • Text-based user interface (TUI)
  • Handling multiple threads for client/server
  • Understanding socket connections in networking
  • Keeping track of logs for the system and conversations
  • …among others that I’m lazy to think of right this moment 😉
Continue reading
Reading time: 3 min
Share:
Written by: codeboss
Page 8 of 8« First...«5678

Recent Posts

  • Python for Data Recovery
  • Data Recovery using Hex Editor
  • File Transfer in Python 3
  • Intro to SQL Injection (Lab #1)
  • Apache, MySQL & PHP Setup (Win/Linux) for SQL Injection Labs

Recent Comments

  • Brian on Brute-Force VeraCrypt Encryption
  • zhiftyDK on ARP Spoofing with Scapy
  • Alex on Python for Data Recovery
  • john on Data Recovery using Hex Editor
  • Someone1611 on Bind Shell in Python 3

About me

My name is Felipe! I’m a programmer from NY.

Blogs about coding, operating systems, network and security.

Hosting

© 2020 Copyright CodeOnBy // All rights reserved
In Between Bytes