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
Python
Cross-platform Programming Python System

Encrypted Data over the Network in Python 3 (pyAesCrypt)

December 25, 2019 No Comments

What’s going on guys?

I have a short encryption tutorial for you today, which is kind of a continuation from my recursive file encryption post a while back.

In that post we did encryption of multiple files recursively, while this time we’ll be doing in-memory AES encryption over the network.

This tutorial will be limited in scope in the sense that we’ll only send the data one way for now (from client to server); however, the plan is to incorporate it into my python control server series soon.

We’ll be using Python 3 for this tutorial (as one should by now). For the encryption side of things we’re using pyAesCrypt, which can be easily installed with pip by running the following command in a terminal:

python -m pip install pyaescrypt

In the video above, after going through the code and explanations, I also fire up wireshark and show the difference from both a plaintext server/client traffic to the encrypted data we’re implementing here.

Continue reading
Reading time: 4 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
Programming Python System Windows

Code a Time-lapse Wallpaper in Python 3 for Windows 10

December 20, 2019 No Comments

What’s going on guys?

I got a nice and short tutorial this time for coding a time-lapse wallpaper using Python 3 – kind of like a customizable live wallpaper.

If you’ve followed my recent posts, you might remember of a Python background changer for dual monitors I made a while back.

Well, this tutorial is kind of building up on that post. Remember, if you just want to download the files, head down to the end of the post.

Time-lapse Wallpaper

Now that pretty much any smartphone already comes with built-in time-lapse features in their cameras and software, I thought:

“Wouldn’t it be cool to have a little script to instantly turn any time-lapses into a wallpaper? That can’t be too difficult!” 😀

That is basically the story for this video tutorial.

It turns out, it wasn’t too difficult after all, just about ~40 lines of code in Python 3 – with some comments here and there, so maybe even 30ish.

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

Recursive File Encryption in Python 3

December 18, 2019 3 Comments

Hello there, how’s it going? (Download script here)

In today’s post, I want to show you a short script to do recursive file encryption in Python 3 – using pyAesCrypt with AES encryption.

Its amazing how powerful this programming language is, really. This is mostly what I wanted to show you guys this time and one of the main reasons I keep coming back time after time to Python.

Using about 20 lines of code, we’re able to encrypt many files in seconds.

Anyway, this post will basically function as a introduction into encryption in Python 3. I had many posts about using encryption in my previous blog with PyCrypto – and I’m still a big fan. However, with Python 2.X in the midst of sunsetting, I figure its time to start looking at newer libraries.

I know there are recent forks for PyCrypto such as PyCryptodome, but in any case, its always good to have some variety in your arsenal.

With that said, pyAesCrypt seems to work rather seamlessly and provides a few different options for functionality – file encryption, stream encryption and in-memory encryption (sounds spicy ay?).

Encryption Using pyAesCrypt

Before we get into the recursive file encryption script, let’s take a look at their brief, yet effective example of basic file encryption:

Continue reading
Reading time: 3 min
Share:
Written by: codeboss
Programming Python System Windows

Python Background Changer in Windows 10 (Dual Monitor)

December 17, 2019 No Comments

What’s up guys? Got a sweet and short tutorial for you today!

Python Background Changer in Windows 10 (Dual Monitor)

Before we begin, I want to clarify this tutorial is for Windows 10. I’m pretty sure it should work for other Windows version as well. I will probably make a Linux version for it soon too, so watch out for it! If you’re interested in it for a different operating system, leave a comment below.

Also, if you just want the script and don’t care about the article, head all the way down to the end of the post where you will find a download for either the Python 2.7 version or Python 3 scripts. Please watch the video though, so you know the instructions to get the script working (its easy!).

Yesterday I was looking for a way to automatically change the background / wallpaper of both my monitors using a Python script (every X seconds).

Although I was able to find a few sources to change the background, it would change the background for both of my monitors at once.

I then ran into this stackoverflow post, where a user replied suggesting merging two images into one and then setting the background as a tiled image using Win32 API functions – thank you fine sir.

Well, luckily I had some previous experience with Win32 API and its functionality under Python and I also had some experience working with images in Python using Python Imaging Library (PIL).

I decided this could be a fun little challenge and set out to do it. 😉

Continue reading
Reading time: 2 min
Share:
Written by: codeboss
Page 4 of 6« First...«3456»

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