@@ -327,13 +327,13 @@ def action_read
327
327
328
328
print_status ( 'Certificate Template:' )
329
329
print_status ( " distinguishedName: #{ obj [ 'distinguishedname' ] . first } " )
330
- print_status ( " displayName: #{ obj [ 'displayname' ] . first } " ) if obj [ 'displayname' ] . first . present?
330
+ print_status ( " displayName: #{ obj [ 'displayname' ] . first } " ) if obj [ 'displayname' ] . present?
331
331
if obj [ 'objectguid' ] . first . present?
332
332
object_guid = Rex ::Proto ::MsDtyp ::MsDtypGuid . read ( obj [ 'objectguid' ] . first )
333
333
print_status ( " objectGUID: #{ object_guid } " )
334
334
end
335
335
336
- mspki_flag = obj [ 'mspki-certificate-name-flag' ] . first
336
+ mspki_flag = obj [ 'mspki-certificate-name-flag' ] & .first
337
337
if mspki_flag . present?
338
338
mspki_flag = [ obj [ 'mspki-certificate-name-flag' ] . first . to_i ] . pack ( 'l' ) . unpack1 ( 'L' )
339
339
print_status ( " msPKI-Certificate-Name-Flag: 0x#{ mspki_flag . to_s ( 16 ) . rjust ( 8 , '0' ) } " )
@@ -358,7 +358,7 @@ def action_read
358
358
end
359
359
end
360
360
361
- mspki_flag = obj [ 'mspki-enrollment-flag' ] . first
361
+ mspki_flag = obj [ 'mspki-enrollment-flag' ] & .first
362
362
if mspki_flag . present?
363
363
mspki_flag = [ obj [ 'mspki-enrollment-flag' ] . first . to_i ] . pack ( 'l' ) . unpack1 ( 'L' )
364
364
print_status ( " msPKI-Enrollment-Flag: 0x#{ mspki_flag . to_s ( 16 ) . rjust ( 8 , '0' ) } " )
@@ -387,7 +387,7 @@ def action_read
387
387
end
388
388
end
389
389
390
- mspki_flag = obj [ 'mspki-private-key-flag' ] . first
390
+ mspki_flag = obj [ 'mspki-private-key-flag' ] & .first
391
391
if mspki_flag . present?
392
392
mspki_flag = [ obj [ 'mspki-private-key-flag' ] . first . to_i ] . pack ( 'l' ) . unpack1 ( 'L' )
393
393
print_status ( " msPKI-Private-Key-Flag: 0x#{ mspki_flag . to_s ( 16 ) . rjust ( 8 , '0' ) } " )
@@ -413,7 +413,7 @@ def action_read
413
413
end
414
414
end
415
415
416
- mspki_flag = obj [ 'mspki-ra-signature' ] . first
416
+ mspki_flag = obj [ 'mspki-ra-signature' ] & .first
417
417
if mspki_flag . present?
418
418
mspki_flag = [ obj [ 'mspki-ra-signature' ] . first . to_i ] . pack ( 'l' ) . unpack1 ( 'L' )
419
419
print_status ( " msPKI-RA-Signature: 0x#{ mspki_flag . to_s ( 16 ) . rjust ( 8 , '0' ) } " )
0 commit comments