use virtualbox image in IS //////////////////////////////////////// login/passwd for virtual OS - user/PA197 //////////////////////////////////////// Section mitmproxy - terminal (su) + Firefox - Firefox proxy config: localhost:8080 for all protocols - open zriha.cz (should fail) - run mitmproxy - open mitm.it select "other" and install certificate - retry zriha.cz - in mitmproxy browse the queries (up, down, enter, q + tab, up, down) - open http://www.fi.muni.cz/~zriha/form/ - fill the form and submit - browse the command/response - go back; test age of 200 - set modify filter in mitmproxy: i -> ~q - resubmit form with age small - see the request: enter, e, form, 20->200, q, a - see the response in firefox - cancel the modify filter in mitmproxy (i) - autoreplace: mitmproxy --replace /~q/age=33/age=333 - test with age 30 and age 33 - quit mitmproxy //////////////////////////////////////// Section tinyproxy: - view /etc/tinyproxy/tinyproxy.conf (port is 8888) - configure firefox (localhost:8888) - run tinyproxy: systemctl start tinyproxy.service - run tail -f /var/log/tinyproxy/tinyproxy.log - visit zriha.cz in firefox (and see the log in tinyproxy) - dnf download --source tinyproxy - rpm -i tiny*.rpm - cd ~/rpmbuild/SPECS - yum install asciidoc - rpmbuild -bc tinyproxy.spec - cd /root/rpmbuild/BUILD/tinyproxy-1.8.3/src - systemctl stop tinyproxy.service - ./tinyproxy -d - reload a webpage (it should work) - ctrl+c - vi reqs.c - in function relay_connection() after last_access = time (NULL) add a new line (~line 1176): printf("Request: '%s'\n", connptr->request_line); - make - ./tinyproxy -d - reload a webpage (should work and tinyproxy shows lines on screen)