CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/ms_nrtp/ms_nrtp_message.rb
Views: 18092
1
require 'rex/proto/ms_nrtp/ms_nrtp_header'
2
3
module Rex::Proto::MsNrtp
4
5
class MsNrtpMessage < BinData::Record
6
# see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrtp/750a0ae4-b3e7-4c0e-97b1-8b95cffd04c5
7
endian :little
8
9
uint32 :protocol_id, value: 0x54454E2E
10
uint8 :major_version, initial_value: 1
11
uint8 :minor_version, initial_value: 0
12
uint16 :operation_type
13
uint16 :content_distribution
14
uint32 :content_length, onlyif: -> { content_distribution == 0 }
15
array :headers, type: :ms_nrtp_header, read_until: -> { element.token == MsNrtpHeader::MsNrtpHeaderEnd::TOKEN }
16
end
17
end
18
19