Skip to content

Instantly share code, notes, and snippets.

@antirez

antirez/TM.md

Created Feb 23, 2018
Embed
What would you like to do?
TripMode TCP out of order bytes reproducing steps

Generate a payload.txt file using this Ruby script:

(1..1000000).each{|i| print "#{i} "}

The file will trivially contain "1 2 3 4 5 ..." so that out of order violations are trivial to spot.

  1. In one terminal open netcat in listen mode: nc -l 6379
  2. In another terminal execute netcat like this: cat payload.txt | nc 127.0.0.1 6379
  3. In the first terminal you should see like 20796 20797 20798 20799 20800... instead of 1 2 3 ...
  4. Does not happen always, so kill the netcat instances, and GOTO 10 to retry until it happens.

Note: my OSX is not the latest patchlevel, I run 10.13.1

Thanks for TM, it kinda saved my latest weeks of work because at the new office I've no cable connection yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.