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

Ionic 4 – How To Make a Simple Card Matching Game (3 of 4)

January 1, 2020 No Comments

[ Part 1 (Introduction) – Part 2 – Part 3 – Part 4 ]

What’s up guys?

We are back with another part of our Ionic 4 card matching game.

In the previous parts we broke down the basics of the Ionic framework, did the groundwork for our little game, added some images and coded the basic functions for matching cards on-screen.

Although we have a lot of functionality in the game already we’re lacking screens for when the player loses, wins and for loading.

That’s what we’ll be working on this time.

One more twist we’ll be adding is time. Let’s give the player something like sixty seconds to match all the cards otherwise he loses.

Coding Summary

To start off we have to add a bunch of variables to support the new screens we’re adding and to control time inside our game.

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 – Traffic Encryption (3 of 8)

December 28, 2019 No Comments

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

What’s going on guys?

Welcome to part three of the Python control server series.

In part one we created our simple server and client with about 20 lines of code each (Python 3). Then in part two, we’ve added basic AES encryption to our traffic using pyAesCrypt.

Given the nature of encryption using pyAesCrypt, we we’re unable to receive any data on the server over 1024 bytes with encryption. The main reason for this is that length needs to be passed for the decryption method.

In this part we will be fixing this issue, so let’s get with it.

Traffic Encryption

What exactly is the issue we have here? Why is less than 1024 bytes ok?

Both in our server and client we are sending 1024 bytes at a time. This means that whenever we send a message containing less than 1024 bytes, we won’t run into any issues.

Now considering we have to pass a length argument for decryption, if we send a message that is 1500 bytes, the server will receive the first 1024 bytes and attempt to decrypt it – resulting in an error.

This is where we have a few different options: receive all the encrypted data and then decrypt it all at once; or, receive smaller chunks of data and decrypt on-demand. Both options have their merits, I decided this latter one would be easier to program for a encryption noob like me. 🙂

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

Python Control Server – Traffic Encryption (2 of 8)

December 27, 2019 No Comments

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

What’s up guys?

Welcome to part two of the Python control server series.

In the first part of the series we made a simple plaintext control server. It allows you to run commands and control your systems from a distance.

This time we’re stepping it up and adding AES encryption to it.

Traffic Encryption

Since the plan is to eventually add more functionality to our server such as file transfer and reading documents over public networks, traffic encryption is definitely essential to the project.

Imagine you are downloading a file from your computer at home to your laptop using a hotel’s public wireless connection. It’s hard to feel safe about it without using some form of encryption.

For this and other reasons, we’ll be using pyAesCrypt to encrypt the connection to our server using AES both ways (server and client).

I have a few posts already on the topic. One specifically for recursive file encryption and another for encrypted data over the network.

This time, however, we’ll be using in-memory encryption stream to make sure our connection is safe from the server to the client and vice versa.

Continue reading
Reading time: 2 min
Share:
Written by: codeboss
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
Page 5 of 8« First...«4567»...Last »

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