Simple implementation of man-in-the-middle attack

using openssl library

step-by-step flow: Snagit Imgur