Class: Rex::Proto::MsDtyp::MsDtypSystemAuditObjectAceBody
- Inherits:
-
MsDtypAceObjectBody
- Object
- BinData::Record
- MsDtypAceObjectBody
- Rex::Proto::MsDtyp::MsDtypSystemAuditObjectAceBody
- Defined in:
- lib/rex/proto/ms_dtyp.rb
Overview
[2.4.4.11 SYSTEM_AUDIT_OBJECT_ACE](learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/c8da72ae-6b54-4a05-85f4-e2594936d3d5)
Instance Method Summary collapse
Instance Method Details
#calc_app_data_length ⇒ Object
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/rex/proto/ms_dtyp.rb', line 455 def calc_app_data_length ace_header = parent&.parent&.header ace_body = parent&.parent&.body return 0 if ace_header.nil? || ace_body.nil? ace_size = ace_header.ace_size return 0 if ace_size.nil? or (ace_size == 0) ace_header_length = ace_header.to_binary_s.length if ace_body.nil? return 0 # Read no data as there is no body, so either we have done some data misalignment or we shouldn't be reading data. else ace_body_length = ace_body.to_binary_s.length return ace_size - (ace_header_length + ace_body_length) end end |