SSL Annotation Of Trace Visualization With Python

| | Comments (0)


import Ace_Tool

def ssl_message_label (msg):
return

def ssl_packet_label (npk):
for layer in npk.get_layers():

summary = layer.get_summary ()
index = summary.find("Client Hello")
if (index >= 0):
npk.add_label("Client Hello", "Client Hello", "")
return

index = summary.find("Server Hello")
if (index >= 0):
npk.add_label("Server Hello", "Server Hello", "")
return

index = summary.find("Client Key Exchange")
if (index >= 0):
npk.add_label("Key Exchange", "Key Exchange", "")
return

index = summary.find("Application Data")
if (index >= 0):
npk.add_label("App Data", "App Data", "")
return

index = summary.find("Continuation Data")
if (index >= 0):
npk.add_label("Continuation", "Continuation", "")
return

index = summary.find("GET")
if (index >= 0):
npk.add_label("HTTP Get", "HTTP Get", "")
return

index = summary.find("POST")
if (index >= 0):
npk.add_label("HTTP Post", "HTTP Post", "")
return

def ssl_color_init (colors, names):
colors[:] = ["#ff00ff", "#ff8000", "#ffff00", "#0000ff", "Red", "#ffffff", "#00FF00", "#808080"]
names[:] = ["Client Hello", "Server Hello", "Key Exchange", "App Data", "Continuation Data", "HTTP Get", "HTTP Post", "Other"]

def ssl_packet_color (npk):

for layer in npk.get_layers():

summary = layer.get_summary ()
index = summary.find("Client Hello")
if (index >= 0):
return 0

index = summary.find("Server Hello")
if (index >= 0):
return 1

index = summary.find("Client Key Exchange")
if (index >= 0):
return 2

index = summary.find("Application Data")
if (index >= 0):
return 3

index = summary.find("Continuation Data")
if (index >= 0):
return 4

index = summary.find("GET")
if (index >= 0):
return 5

index = summary.find("POST")
if (index >= 0):
return 6


return 7



def ssl_message_color (msg):
npk = msg.get_network_packet (0)
return ssl_packet_color (npk)


Leave a comment

About this Entry

This page contains a single entry by klsh published on May 1, 2007 5:51 PM.

RDP Over SSH Tunnel Which Encrypts The RDP Session was the previous entry in this blog.

Open Source SSL VPN is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01