Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1.         local http_headers_proto = Proto("http_extra", "Extra analysis of the HTTP protocol");
  2.         http_headers_proto.fields.hdr_len = ProtoField.uint32("http.hdr_len", "HTTP Header length (bytes)")
  3.         http_headers_proto.fields.request_headers = ProtoField.string("http.request_headers", "HTTP Request Headers")
  4.         http_headers_proto.fields.response_headers = ProtoField.string("http.response_headers", "HTTP Request Headers")
  5.  
  6.         local tcp_dissector_table = DissectorTable.get("tcp.port")
  7.         local original_http_dissector = tcp_dissector_table:get_dissector(80)
  8.  
  9.         function http_headers_proto.dissector(tvb, pinfo, treeitem)
  10.                 original_http_dissector:call(tvb, pinfo, treeitem)
  11. -- ...
  12.         end
  13.  
  14.         tcp_dissector_table:add(80, http_headers_proto)
  15.  
  16.         local http_response_headers = Field.new("http.response_headers")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement