CodeOnByte - 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
CodeOnByte - In Between Bytes
  • Home
  • Programming
    • JavaScript
    • Python
  • System
    • Cross-platform
    • Linux
    • macOS
    • Windows
  • Gear
  • About Me
Browsing Tag
tutorial
Programming Python

Split File into Byte Chunks in Python

March 12, 2022 No Comments

Whats up guys?

In this post we’ll take a look at a Python script to break a file (image, executable, whatever) into several chunks of raw bytes and another one to merge those chunks together and reassemble that file back.

Since I’ve been doing a cloud security certification, it mentioned a technique widely employed in cloud of storing chunks of files into different virtual machines for security purposes (kind of like a RAID setup).

That made me think: ah, this could be a cool Python script to code! Hence, this tutorial. 🙂

Each script is less than 20 lines of code and not difficult at all, just basic file manipulation of raw bytes.

In any case, I have made an introduction to files in Python to get you started – if you are new to programming and/or Python, check it out since it should be all that you need for this tutorial.

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

Introduction to Files in Python 3

March 11, 2022 1 Comment

What’s going on guys?

In this post we’ll do a brief introduction into handling files in Python 3.

We’ll be looking at the following file operations:

  • Opening files for read mode
  • Opening files for write mode
  • Basic file operation functions
  • Reading files in binary mode

This isn’t necessarily an in-depth tutorial, just something to get you started.

Let’s begin!

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

Netcat Tricks for iPhone

April 29, 2020 No Comments

Whats up guys!

In this post we’ll take a look at 3 cool tricks using netcat on the iPhone.

Note that you will need a jailbroken device in order to follow along; alternatively, you can just use a laptop/desktop with netcat installed.

Using checkra1n jailbreak, this has become trivial for most devices.

Networking Tools for iPhone

In order to use a lot of the networking tools in the iPhone, you’ll need to download them from Cydia first.

Go under Terminal Support and choose a terminal of your choice.

I went ahead with NewTerm.

Then make sure you have netcat installed from Networking section.

That’s everything we’re going to need.

Continue reading
Reading time: 1 min
Share:
Written by: codeboss
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 – 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
Page 2 of 4«1234»

Recent Posts

  • VPN Server on Ubuntu VPS
  • Secure VPN Traffic With No Leaks
  • Brute-Force Bitcoin Wallet Recovery AI
  • Python for Data Recovery
  • Data Recovery using Hex Editor

Recent Comments

  • Python for Data Recovery – CodeOnByte on Data Recovery using Hex Editor
  • Eddie on Brute-Force VeraCrypt Encryption
  • grant on Python for Data Recovery
  • grant on Python for Data Recovery
  • Grant on Python for Data Recovery

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