From bf12f3ee8d7240bd33eec9262c5ef56e40be2dbe Mon Sep 17 00:00:00 2001 From: bcoles Date: Sun, 27 Apr 2025 02:09:41 +1000 Subject: [PATCH] modules/post/bsd: Resolve RuboCop violations --- modules/post/bsd/gather/hashdump.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/post/bsd/gather/hashdump.rb b/modules/post/bsd/gather/hashdump.rb index e49894ced1..2fd14a17bf 100644 --- a/modules/post/bsd/gather/hashdump.rb +++ b/modules/post/bsd/gather/hashdump.rb @@ -13,18 +13,23 @@ class MetasploitModule < Msf::Post update_info( info, 'Name' => 'BSD Dump Password Hashes', - 'Description' => %q{ Post module to dump the password hashes for all users on a BSD system. }, + 'Description' => %q{Post module to dump the password hashes for all users on a BSD system.}, 'License' => MSF_LICENSE, 'Author' => ['bcoles'], 'Platform' => ['bsd'], - 'SessionTypes' => ['shell', 'meterpreter'] + 'SessionTypes' => ['shell', 'meterpreter'], + 'Notes' => { + 'Stability' => [CRASH_SAFE], + 'SideEffects' => [], + 'Reliability' => [] + } ) ) end def run unless is_root? - fail_with Failure::NoAccess, 'You must run this module as root!' + fail_with(Failure::NoAccess, 'You must run this module as root!') end passwd = read_file('/etc/passwd').to_s