In a recent article, I wrote about getting around in your wifi environment, using the airport utility available on the terminal, in this article, we will look at Network commands, starting from the most popular and quite mythical, ifconfig. Once you get more familiar with your Mac Terminal, the sky is the limit, you can do magical things, on your Mac with text-based access to your operating system using its command-line interface (and not just the basics, as creating files, directories, and assign permissions).

1. List available network interfaces

The ifconfig command will list all available network interfaces, including their IPV4 and IPV6 addresses, their…

Whenever a host needs to contact another host, either in its subnet or in another subnet or maybe on the internet, then it sends an ARP ( Address Resolution Request)

Let’s make this story short. Specific strings on your wireless SSID can make your iPhone freeze. It reminds me how cross-site scripting can do harm if your web app doesn’t sanitize the input and treats it as a code
Here is a short video I made. See what happens when I connect to that SSID

You can capture (sniff) packets of any traffic that travels on your FortiGate firewall using the command line. Very similar to TCP Dump

Why do we need to do that?

It allows you to have a low-level view, up to the hexadecimal representation of the different packets

You will see, if packets travel the way they should, if they are dropped and where. It is one of the best diagnostic tools available

We use the factorial function to multiply the whole number from a chosen number down to one.

So for example, 4 factorial (4!) is 4 times 3 times2 times 1, which is equal to 24.

In classic cryptography, we have 2 operations that are used throughout the history of hiding messages and turning plain text into a cipher message

Substitution and transposition

In the substitution algorithm( as used in Caesar cipher and vigenere cipher ) we replace one character with another by shifting its place in the alphabet with a pre-defined number of places

In the transposition algorithm, As the name implies, the plain text is re-ordered, we change the order of elements. But the character stays the same

Let us use the python pseudo-random number generator module to take plain text and use transposition operation, with the key being the random seed ( the initial value, where the random generator start its math operations )

We will start and import the random…

If you’re using an SSL VPN on your Fortigate Firewall, then you have 3 modes to choose from.

The first one is a Web mode, where you access resources through a web browser. But with a limited set of protocols.

In the second, Full tunnel mode, you get access to all the protocols and applications, but the traffic the full traffic will move through that tunnel. And sometimes it is not requested. ( Takes resources from your FortiGate firewall )

The third mode is a Split Tunnel mode where you can access specific resources, and the rest of the traffic will move through the public Internet.

Let’s look at a split tunnel mode.

Our topology is as follows. We have our LAN interface. And we…

Base 64 is used everywhere. It is the most known and famous encoding scheme that is used to represent binary data and transform it into an ASCII representation. Why do we use it? What is the algorithm? And how does it actually work?

We use base 64 as a method to encode binary data into an ASCII representation.


We do so since many systems and networks just don’t represent binary data as it is supposed to be shown. So how does it actually work?

Let’s do it by example. Let’s take the word FortiGate. Each character has an eight-bit representation.

Cryptography Handbook For Beginners

Let’s start with a question

You Enter your office and you need to enter a 4-character password

The keypad has 10 digits

The U.S president Thomas Jefferson was known for his curiosity and interest in the art of cryptography. his most famous crypto invention was the cipher wheel, which he didn’t believe at first that is secure enough, and actually choose another cryptosystem over it, although, his own system was far more secure

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