Skip to content

Instantly share code, notes, and snippets.

@dstd
Last active February 27, 2018 13:02
Show Gist options
  • Save dstd/952305bf2b3e498a0dba42a2a425ef2a to your computer and use it in GitHub Desktop.
Save dstd/952305bf2b3e498a0dba42a2a425ef2a to your computer and use it in GitHub Desktop.
[Fiddler] Sessions coloring
// ...
static function OnBeforeRequest(oSession: Session) {
// ...
var clientColors = ["red", "blue", "green", "gold", "orange", "purple"];
var clientId = oSession.oRequest.headers["User-Agent"] + oSession.oRequest.headers["Authorization"];
oSession["ui-color"] = clientColors[Math.abs(clientId.GetHashCode()) % clientColors.length];
// ...
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment