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
python
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
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
Cross-platform Linux macOS Programming Python System Windows

Python Chat Server (5 of 7)

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

Check out the video for details on the code!

How you doing today?

I hope you’re well because this video is about to bang you on the head!

Not in a bad way of course, we’re about to learn a lot of cool stuff; but, I must warn you, grab your drink in advance and strap in that chair. 🙂

In this episode, as promised, we’re going to merge both the server and client script into one and add a bunch of functionality as well.

Analysis Before Coding

Since there’s a lot of ground to cover, let’s take a deep breath first and think about some components before diving into the code.

In the last part, we concluded the server thread and I mentioned we would work on the client thread this time. Which we will. However, before that we must port over some functions from the client script into the server script.

For example, the connect back functionality from the client script will be ported over and improved upon to allow the user to either start a new connection or be used programmatically in the main server.

Only then we’ll be able to consider firing up those client threads…

Now about the main server: we’ll have to place it inside its own function. The main reason is so we can run it in the background as a thread. This will allow us to shut it down once we finish establishing a connection and quickly fire it up again to listen for the next client.

Finally we’ll implement the text-based user interface since all of our main components are now running in the background as daemons: the server threads, the client threads and the main server.

I think that’s enough context for now so let’s jump into some code!

Continue reading
Reading time: 8 min
Share:
Written by: codeboss
Page 4 of 5« First...«2345»

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