Skip to content

Instantly share code, notes, and snippets.

View mhils's full-sized avatar

Maximilian Hils mhils

View GitHub Profile
@mhils
mhils / template.md
Last active March 21, 2023 12:02
Mitmproxy GSoC Application Template

Mitmproxy GSoC Application Template

Your Background

Your Name:
Slack Username:
Email Address:
Primary Spoken Language:

1. Please describe your preferred coding languages and experience.

"""
Memory Finder
- Use case: Find out what's holding on to a flow to troubleshoot garbage collection
- Holds a reference to the first flow in a capture
- Prints out who else is holding on to the flow every 5 seconds
"""
import threading
import weakref
import gc
@mhils
mhils / memfinder.py
Last active September 5, 2018 11:19
"""
Memory Finder
- Use case: Find out what's holding on to a flow to troubleshoot garbage collection
- Holds a reference to the first flow in a capture
- Prints out who else is holding on to the flow every second
"""
import threading
import weakref
import gc
@mhils
mhils / refs
Created September 5, 2018 09:53
##########
----------
frame@78956848:<frame object at 0x04B4C930>
frame@78956848:<frame object at 0x04B4C930>
----------
----------
dict@81651152:{'obj': <HTTPFlow; request = Request(GET localhost:8000/);
frame@78956848:<frame object at 0x04B4C930>
----------
Reply@81574576:<mitmproxy.controller.Reply object at 0x04DCBAB0>
@mhils
mhils / refs
Created September 5, 2018 09:51
##########
----------
frame@79434160:<frame object at 0x04BC11B0>
frame@79434160:<frame object at 0x04BC11B0>
----------
----------
; request = Request(GET localhost:8000/)
frame@79434160:<frame object at 0x04BC11B0>
----------
Reply@81924912:<mitmproxy.controller.Reply object at 0x04E21330>
@mhils
mhils / refs
Last active September 5, 2018 09:38
##########
----------
[<HTTPFlow
request = Request(GET example.org:80/)
response = Response(200 OK, text/html; charset=UTF-8, 1.24k)
client_conn = <ClientConnection: 127.0.0.1:58429>
server_conn = <ServerConnection: example.org:80>>]
[[<HTTPFlow
request = Request(GET example.org:80/)
response = Response(200 OK, text/html; charset=UTF-8, 1.24k)
@mhils
mhils / after
Last active September 5, 2018 09:37
##########
----------
[<HTTPFlow
request = Request(GET example.org:80/)
response = Response(200 OK, text/html; charset=UTF-8, 1.24k)
client_conn = <ClientConnection: 127.0.0.1:58429>
server_conn = <ServerConnection: example.org:80>>]
[[<HTTPFlow
request = Request(GET example.org:80/)
response = Response(200 OK, text/html; charset=UTF-8, 1.24k)
@mhils
mhils / animatedScrollTo.js
Last active April 10, 2017 18:03
Image Presentation
(function (window) {
var requestAnimFrame = (function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};})();
var easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) return c/2*t*t + b;
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
λ ssh [email protected]
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-71-generic i686)
root@ubuntu-512mb-fra1-01:~# sudo apt-get install python-pip
root@ubuntu-512mb-fra1-01:~# pip install h2
Downloading/unpacking h2
Downloading h2-2.1.0.tar.gz (49Kb): 49Kb downloaded
Running setup.py egg_info for package h2
error in h2 setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
Complete output from command python setup.py egg_info:
error in h2 setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
9861d7596d3dae02befaddedada43721