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 Tag
client
Programming Python

File Transfer in Python 3

March 28, 2022 No Comments

In this post, we’ll check out file transfer in Python 3 with file size verification check.

In many Python scripts you’ll come across the need for sending and receiving files over the network, so I decided to make this tutorial for a simple yet stable set of scripts to implement whenever needed.

We’ll only use standard Python libraries included with a default installation: socket, time, os and sys.

One nice little detail we’ll implement is file size verification, so that the receiving party can be sure they received the file with the exact amount of bytes the sender intended.

Let’s check it out!

Continue reading
Reading time: 2 min
Share:
Written by: codeboss
Cross-platform Programming Python System

Python Control Server – Multiple Clients (5 of 8)

January 2, 2020 3 Comments

[ Part 1 – Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7 – Part 8 ]

We’re off to part five of our little Python control server.

I had been postponing this, but its time we implement multiple clients!

I knew we had to do this right and that it would most likely bloat the scripts as well, so it would also require breaking it down into specific modules.

So yeah, that’s what we’re doing, lets get into it!

But before that, let me give you guys some context into the code…

Modular Programming

Many times when working on a project, as it begins to expand and get into a few hundred lines of code we need to start breaking it up into modules.

For our project, so far, it seems most of the functionality is divided between server configuration and data encryption.

I figure, just for the sake of development and teaching proper methods to keep working in a program without feeling like its a labyrinth, we’ll go ahead and separate our code into a few modules.

Continue reading
Reading time: 2 min
Share:
Written by: codeboss
Cross-platform Programming Python System

Python Control Server – File Transfer and Encryption (4 of 8)

December 30, 2019 2 Comments

[ Part 1 – Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7 – Part 8 ]

What’s up guys?

In this part we’ll be implementing file transfer and encryption.

I use these programs on my own system and you absolutely have to be able to download and upload files in order to get anything done.

Now some of you might remember in part three I mentioned that our encrypted channel wasn’t stable enough to handle several megabytes of data without any mishaps.

Because of that, I had to implement file encryption and decryption in the client as well, since we’re already working with pyAesCrypt anyway.

This allows us to, at the very least, encrypt files locally before sending them over a standard tcp tunnel – or keep them encrypted on the system.

Like much of the functionality we’re going through here, these functions could be copied and used in other code without much hassle.

File Encryption

I’ve already made some posts regarding file encryption using pyAesCrypt in the blog, most notably: recursive file encryption in Python 3.

I recommend to check that one out if you haven’t seen it yet.

In any case, file encryption with pyAesCrypt is pretty straightforward. We are basically working with the following methods:

Continue reading
Reading time: 3 min
Share:
Written by: codeboss
Cross-platform Programming Python System

Python Control Server (1 of 8)

December 23, 2019 No Comments

[ Part 1 – Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7 – Part 8 ]

What’s going on guys?

We’re off to another series: Python Control Server.

Yes, there’s three series going on at once in the blog, so what! 😀

I like having multiple things going so that I don’t have to think much whenever I have some free time to code. I can just sit down and choose whichever series/project to work on at the moment.

Anyway, many people emailed me to post my old videos (from like 10 years ago) from this same series – written in Python 2.X.

However, with Python 2.X reaching end of life in January 2020, I figure: Why not just redo the whole thing in Python 3?

It’s also worth mentioning that some of the libraries I used back then have not been properly ported over to Python 3. Overall it just makes a lot of sense to redo the project using more current libraries.

Control Server

Why make a Python Control Server?

For many (ahem, very educational) reasons of course! Like for example, we are two days away from Christmas and many people enjoy taking vacations around this time. Well, why not setup a nice control server to have access to your systems while your away?

Sounds like a good idea time to me!

About Christmas though, I had my first batch of family visiting and let me tell you… its rather easy to get a cold when there’s a lot of people in the same household for hours at a time. So pardon my voice in the video.

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

Python Chat Server (6 of 7)

December 16, 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!

Watch the video for some code analysis!

Hey guys! Ready to write some code?

We’ve put a lot of work in these past five parts and today is no exception, however, we’ll try to take it easy after that insanity in the last article.

Looking back I probably should’ve broken that last article in more parts. At the same time, I guess it serves to separate the kittens from the lions. 😀

Enough jokes for now, let’s keep moving…

Today we’ll be implementing the second part to the text-based user interface which is what I call the active client chat screen.

Of course this also requires us to first implement the logging system for all of our clients, along with notifications as well.

Besides that we’ll add a few more features to wrap it up.

Dive Into The Code

I’m gonna focus on the main blocks of code added this time, so right off the bat, let’s jump into the new ‘active client chat screen’ interface…

Continue reading
Reading time: 3 min
Share:
Written by: codeboss
Page 1 of 212»

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

  • john on Data Recovery using Hex Editor
  • Someone1611 on Bind Shell in Python 3
  • Data Recovery using Hex Editor – CodeOnBy on Data Recovery using Recuva
  • Intro to SQL Injection (Lab #1) – CodeOnBy on Apache, MySQL & PHP Setup (Win/Linux) for SQL Injection Labs
  • Split File into Byte Chunks in Python – CodeOnBy on Introduction to Files 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