CookieViz on Mac OS X in more than 128 words

CookieViz is a visualization tool that measures the impact of cookies on your own browsing.

The page is git is

I install MAMP:

MAMP is a compilation of free open source software to manage dynamic websites on computers running macOS or Windows: Apache, the web server; MySQL, the database management system; phP, Perl or Python, programming languages used for web development.

Install Homebrew: Homebrew is a free open source software management system that simplifies the installation of software on Apple's macOS and Linux operating system.

/usr/bin/ruby -e "$(curl -fsSL"

The script asks to switch to superuser mode via the sudo command and asks to type the password several times.

At the end of the installation you get a successful installation!

I install mitmdump which is in the mitmproxy package

brew install mitmproxy

Validate the installation by tapping mitmdump –version

mitmdump --version
 Mitmproxy: 4.0.4
 Python: 3.7.5
 OpenSSL: OpenSSL 1.1.1d 10 Sep 2019
 Platform: Darwin-17.7.0-x86_64-i386-64bit

I start MAMP and not MAMP PRO which is paid

I get the home page of my Apache web server that is booted on port 8888 by default I can reach by typing localhost:8888 as url in my browser.

If I go into the MAMP -Preferences menu I can change the ports used.

I downloaded from the github source of cookieViz via the Clone and download link. It is also possible to start a terminal and place yourself at the root of the WEB Apache server.

By default the root is in /Applications/MAMP/htdocs/ but you can change it via the MAMP graphical interface

cd /Applications/MAMP/htdocs/
git clone

By default the default user of the database is "root" and password "root" To change t
he password by default: https://docume /App
lications/MAMP/Library/bin/mysqladmin -u root -p password

Adding a user phpmyadmin – mysql – user 'add a user' tab User Accounts

I added a user 'cookvi' with password 'cookvi'

I edited the file via a text editor or nano control

 The database server used by CookieViz.
 Default is 'localhost' and should be fine for most cases.
 If 'localhost' doesn't work and the database runs locally, try ''.
define ('DB_SERVER', '');


define ('DB_USER', 'cookvi');

 The password of the CookieViz database user.
define ('DB_PASSWD', 'cookvi');

I then edited the nano monitor_mitmdump.php file of the directory /soft

cd /Applications/MAMP/htdocs/CookieViz/soft/
nano monitor_mitmdump.php 

I went to http://localhost:8888/phpmyadmin/ and I created a new CookieViz base

I clicked on the created database and i used the "import" function and loaded the file /Applications/MAMP/htdocs/CookieViz/cookieviz/sql/url_referer-1.sql which contains the table structure

Edit the four values below
$PROXY-HOST – "localhost"; Proxy server addre
ss $PROXY-PORT – "8082"; Proxy server p
ort $PROXY-USER -""; Userna
me $PROXY-PASS -""; Password

CookieViz is php5 compatible and not phpt7 you should expect changes in the code:


$link - mysql_connect ('localhost', '', '') by $link - mysqli_connect ('', 'cookvi', 'cookvi','CookieViz') 
mysql_select_db ('CookieViz') by mysqli_select_db ($link, 'CookieViz')
mysql_error() by mysqli_connect_error()
mysql_query ($query) by mysqli_query ($link, $query)
mysql_fetch_assoc ($result) by mysqli_fetch_assoc ($result) 
mysql_close ($link) by mysqli_close ($link)  

Start a server mitmdump on port 8082: mit
mdump -p 8082 -w mitmdump.log

I am now launching the php script /Applications/MAMP/htdocs/CookieViz/soft/monitor_mitmdump.php

At the firefox level I went into network preference sets in the general settings and I configured the proxy

We find that we have connections that pass through the proxy Prox
y server listening at http://:8081
49915: clientconnect
5: CONNECT< cannot="" establis
h="" tls="" with="" client="" (sni:="""" tlsexception("ssl="" handshake="" error:="" error()")="[(‘SSL routines’, ‘ssl3_read_bytes’, ‘sslv3 alert bad certificate’)]" 1"" clientconnect="""" clientdisconnect=
"""" get=""
t="">< 200="" ok="" 8b="" 127.0
.0.1:49919:="" clientconnect="" 12"" clientconnect="""" get=""""
>< 200="" ok="" 8b="" 127.0.0.
1:49920:="" get="""">< 200 O
K 8b 200="" ok=""></ 200 OK 8b>

The results can then be viewed on the web server http://localhost:8888/CookieViz/cookieviz/