@ -337,9 +337,18 @@ fn smb_common_header(jsb: &mut JsonBuilder, state: &SMBState, tx: &SMBTransactio
jsb . set_uint ( "stub_data_size" , x . stub_data_ts . len ( ) as u64 ) ? ;
jsb . set_uint ( "stub_data_size" , x . stub_data_ts . len ( ) as u64 ) ? ;
jsb . close ( ) ? ;
jsb . close ( ) ? ;
if let Some ( ref ifaces ) = state . dcerpc_ifaces {
if let Some ( ref ifaces ) = state . dcerpc_ifaces {
for i in ifaces {
// First filter the interfaces to those
if i . context_id = = x . context_id {
// with the context_id we want to log to
jsb . open_object ( "interface" ) ? ;
// avoid creating an empty "interfaces"
// array.
let mut ifaces = ifaces
. iter ( )
. filter ( | i | i . context_id = = x . context_id )
. peekable ( ) ;
if ifaces . peek ( ) . is_some ( ) {
jsb . open_array ( "interfaces" ) ? ;
for i in ifaces {
jsb . start_object ( ) ? ;
let ifstr = uuid ::Uuid ::from_slice ( & i . uuid ) ;
let ifstr = uuid ::Uuid ::from_slice ( & i . uuid ) ;
let ifstr = ifstr . map ( | ifstr | ifstr . to_hyphenated ( ) . to_string ( ) ) . unwrap ( ) ;
let ifstr = ifstr . map ( | ifstr | ifstr . to_hyphenated ( ) . to_string ( ) ) . unwrap ( ) ;
jsb . set_string ( "uuid" , & ifstr ) ? ;
jsb . set_string ( "uuid" , & ifstr ) ? ;
@ -347,6 +356,7 @@ fn smb_common_header(jsb: &mut JsonBuilder, state: &SMBState, tx: &SMBTransactio
jsb . set_string ( "version" , & vstr ) ? ;
jsb . set_string ( "version" , & vstr ) ? ;
jsb . close ( ) ? ;
jsb . close ( ) ? ;
}
}
jsb . close ( ) ? ;
}
}
}
}
} ,
} ,