Board Evaluation and Minimax Algorithm

Photo by GR Stocks on Unsplash

How I tried harder to attain my Offensive Security Certified Professional (OSCP) certification


Last week, I sat for and passed the Offensive Security Certified Professional (OSCP) exam from Offensive Security. I managed to root 4 out of 5 of the boxes, and achieve 90 out of 100 possible points (70 were required to pass).

Manipulating Decrypted Plaintext

Photo by Seth Doyle on Unsplash

Cipher Block Chaining (CBC)

Block ciphers such as AES encrypt blocks of text at a time, rather than encrypting one bit at a time as in stream ciphers.

Booleanization and XML Crawling

Photo by Caleb Jones on Unsplash


XPath is a query language that locates elements in an XML document. Conceptually, it is similar to SQL. Most web applications use relational databases and SQL to store and query large amounts of data. …

ARP scans and TCP scans with Scapy

Photo by Kaur Kristjan on Unsplash

What is Network Scanning?

Network Scanning is the process of gathering information about devices in a computer network, through employing network protocols. It is especially relevant for network administrators, penetration testers and, well… hackers.


You should know basic Python. Other than that, not much! I will be writing on some basic network theory before getting into the actual code, so if you already know this stuff, feel free to skip ahead!

Protocols, Protocols, Protocols

Communications over networks use what we call a protocol stack — building higher-level, more sophisticated conversations on top of simpler, more…

Socket programming + Tkinter GUI

Photo by Volodymyr Hryshchenko on Unsplash


You should know basic Python. Other than that, nothing! In the process of creating this application, you…

A more elegant approach to doing the same thing

Photo by Maxwell Nelson on Unsplash

There should be one — and preferably only one — obvious way to do it.

But in Python, there are in fact many ways to achieve the same objective. Of course, some ways are more elegant than others and in most cases, it should be obvious which way is better.

Basic List Comprehension

Say I want to create a list of numbers from 1…

Implementations and Explanations

We are going to look at 4 different sorting algorithms and their implementation in Python:

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Quicksort
Photo by Edu Grande on Unsplash

1. Bubble Sort

Time complexity: O(n²)


def bubble(lst):
no_swaps = False
while no_swaps == False:
no_swaps = True
n = 0
for i in range(len(lst) - 1 - n):
if lst[i] > lst[i + 1]:
lst[i], lst[i + 1] = lst[i + 1], lst[i]
no_swaps = False
n += 1

How It Works

  1. Iterate through the elements in the array
  2. If there are adjacent elements in the wrong order, swap them
  3. If we have reached the end of the array and there have been no swaps in this iteration, then the array is sorted. Else, repeat from step 1.

How you can make yourself one with the Twilio API

Photo by Chris Barbalis on Unsplash

Easily create, delete and switch between virtual environments.

What Is a Virtual Environment?

A virtual environment is an isolated Python environment. Working on a project in an isolated Python environment ensures that project dependencies are kept separate, and allows you to manage Python packages for different projects without breaking system tools or other projects.

Zhang Zeyu

Simple is better than complex. Complex is better than complicated.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store