Make ternary operator more readable

bug/bundler_fix
jvazquez-r7 2014-11-25 13:44:50 -06:00
parent be566e5ad3
commit 31a84ef6ff
1 changed files with 1 additions and 2 deletions

View File

@ -38,7 +38,6 @@ class Metasploit3 < Msf::Auxiliary
end
def run
print_status("#{peer} - Grabbing the server and domain name...")
db_server_name = get_server_name
if db_server_name.nil?
@ -191,7 +190,7 @@ class Metasploit3 < Msf::Auxiliary
# Convert number to hex and fix order
principal_id_hex = "%02X" % principal_id
principal_id_hex_pad = (principal_id_hex.size.even? ? principal_id_hex : ("0"+ principal_id_hex))
principal_id_hex_pad = principal_id_hex.size.even? ? principal_id_hex : "0#{principal_id_hex}"
principal_id_clean = principal_id_hex_pad.scan(/(..)/).reverse.flatten.join
# Add padding