나는 wireshark와 그 lua api에 익숙하지 않다. 포트 443에서 패킷을 캡처하고 내용 중 일부를 수정 한 다음 대상으로 보낸다.Wireshark 루아 디시 터에서 패킷의 TLS 버전/체크섬에 액세스하는 방법은 무엇입니까?
-- create myproto protocol and its fields
p_myproto = Proto ("myproto","My Protocol")
local f_command = ProtoField.uint16("myproto.command", "Command", base.HEX)
local f_data = ProtoField.string("myproto.data", "Data", FT_STRING)
p_myproto.fields = {f_command}
-- myproto dissector function
function p_myproto.dissector (buf, pkt, root)
print ('packet captured')
-- validate packet length is adequate, otherwise quit
if buf:len() == 0 then return end
pkt.cols.protocol = p_myproto.name
local colss = pkt.cols
--pkt.cols.info:append(" " .. tostring(pkt.dst).." -> "..tostring(pkt.src))
print ("" .. tostring(pkt.dst))
print ("" .. tostring(pkt.src_port))
print ("" .. tostring(pkt.dst_port))
end
-- Initialization routine
function p_myproto.init()
end
-- register a chained dissector for port 8002
local tcp_dissector_table = DissectorTable.get("tcp.port")
dissector = tcp_dissector_table:get_dissector(443)
-- you can call dissector from function p_myproto.dissector above
-- so that the previous dissector gets called
tcp_dissector_table:add(443, p_myproto)
내가 DST, SRC, dst_port 등 전체 목록 here 수 있습니다처럼 필드에 액세스 할 수 있습니다 나는 내 필요에 따라 수정 한 스크립트 here를 발견했다. 하지만 내가 어디에 액세스 할 수있는/패킷, 선택한 암호 스위트 등 체크섬을 수정하는 방법에 대한 참조를 찾을 수 없습니다. 그들은 교통 계층에 존재하지만 액세스 할 수있는 모든 문서를 찾을 수 없습니다/수정 이 값들.
내가 뭘 잘못하고 있니? 이와 관련하여 도움이 될 것입니다!
감사합니다.
아, 맞습니다. wireshark 디스플레이 필터 참조 페이지는 찾을 수 없습니다. 감사! –