This is a very simple implementation of an active timing attack on Tor. Please note that the Tor developers are aware of issues like this – https://blog.torproject.org/blog/one-cell-enough states: The Tor design doesn’t try to protect against an attacker who can see or measure both traffic going into the Tor network and also traffic coming out ...