• Difference Between Mutable and Immutable Objects in Python

    By George El.March 2019Reading time: 4 minutes

    In this post I will analyze the difference between mutable and immutable objects in python and how this affects variables and functions. Lets start by defining two variables a = 10 b = a what is the value of b? If you guessed 10, then you are correct. b points to the same memory address as a, and thus the contents of this address is 10.

    Read More...
  • How to Generate, Filter, Exclude IP Addresses Using List Comprehensions and More

    By George El.February 2019Reading time: 5 minutes

    In this post, I will show how to create a list of ip addresses using list comprehensions and also using the ipaddress module in python 3. Put it simply List Comprehensions is a way to create a list from another list or iterable. They provide an alternative to filter and map functions that can be found in other languages and python

    Read More...
  • Explaining how TLS/SSL and certificates work

    By George El.February 2019Reading time: 9 minutes

    In this post I will explain the basics of TLS, because there is a lot of misinformation on the internet and youtube especially. Then I will analyze a TLS connection with wireshark Transport Layer Security is the successor of SSL and provides confidentiality, data integrity, and (mutual) authentication. TLS runs on top of TCP, and sits between the transport layer and the application layer.

    Read More...
  • Difference Between Fast Forward and Recursive Merge

    By George El.February 2019Reading time: 3 minutes

    In this post I will clarify the difference between a fast-forward and a three-way or recursive merge and why you must use no fast-forward commmit in projects shared by many people. As you can see in the following graph I have two branches: branch master has 3 commits which correspond to changes 1,2,3 and branch branch1 has 3 commits which correspond to changes 4,5,6

    Read More...
  • How to Read and Write Json Files

    By George El.February 2019Reading time: 2 minutes

    In this post, I will show how to read, write and do operations on json data. I assume the I have the following json file. The first step is to make sure that this is valid json. There are many online validators, this is the one I recommend: https://jsoneditoronline.org/

    Read More...
  • Ten Git Commands Every Developer Should Know

    By George El.February 2019Reading time: 2 minutes

    In this post I will explain 10 commands for your workflow as developer. Inititalize the repo git init Add all files of your working directory in the staging area git add . Commit your changes with an informational message git commit -m "first commit" Upload your changes to github of course you need to have an account on github first, then you create a repo on github called myrepo

    Read More...
  • How to Ping Multiple Addresses Asynchronously Part I

    By George El.February 2019Reading time: 2 minutes

    In this post, I will show you how to ping many ip addresses synchronously, or asynchronously using threads. the following examples work only with python 3. First I will use a list comprehension to create a list of ip addresses ips = ["192.168.2.{}".format(i) for i in range(1,11)] the above code will create addresses 192.

    Read More...
  • How to Find Syn Packets without Syn Ack

    By George El.February 2019Reading time: 1 minute

    This post is based on a question on wireshark.org and all credit goes there to Kurt Knochner. I just thought it would be nice to test it. So I launched wireshark and I tried to connect to 8.8.8.8 port 80, which I know it won’t reply. if you use as display filter “tcp.

    Read More...
  • How to Decrypt Https in Wireshark

    By George El.February 2019Reading time: 1 minute

    In this post, I will show you how to decrypt an https session with wireshark. These instruction will only work with windows 10 and chrome or firefox browser. First I am going to browse to udemy.com and get a capture with wireshark. You see that wireshark cannot see above tcp layer because it is encrypted with TLSv1.

    Read More...
  • Analyzing an Ftp Connection With Wireshark

    By George El.February 2019Reading time: 3 minutes

    In this post we will analyze an ftp connection with wireshark. First we see that the client establishes a control connection to port 21 on the server. The server is the one with the public IP address. The RTT time is the difference between SYN and SYN-ACK and is 0.0849. (In order to see the time or delta between displayed packets you have to go to View, Time Display Format, Seconds since previous displayed packet)

    Read More...