Remove to_s inside #{}

bug/bundler_fix
Tod Beardsley 2014-01-23 14:21:48 -06:00
parent c403c521b3
commit 2ea3b46988
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
2 changed files with 6 additions and 6 deletions

View File

@ -369,7 +369,7 @@ describe Msfcli do
m = cli.init_modules
cli.engage_mode(m)
}
stdout.should =~ /#{Msf::Exploit::CheckCode::Unknown[1].to_s}/
stdout.should =~ /#{Msf::Exploit::CheckCode::Unknown[1]}/
end
it "should warn my auxiliary module isn't supported by mode 'p' (show payloads)" do

View File

@ -57,17 +57,17 @@ class Msftidy
##
def warn(txt, line=0)
line_msg = (line>0) ? ":#{line.to_s}" : ''
line_msg = (line>0) ? ":#{line}" : ''
puts "#{@full_filepath}#{line_msg} - [#{'WARNING'.yellow}] #{txt}"
end
def error(txt, line=0)
line_msg = (line>0) ? ":#{line.to_s}" : ''
line_msg = (line>0) ? ":#{line}" : ''
puts "#{@full_filepath}#{line_msg} - [#{'ERROR'.red}] #{txt}"
end
def fixed(txt, line=0)
line_msg = (line>0) ? ":#{line.to_s}" : ''
line_msg = (line>0) ? ":#{line}" : ''
puts "#{@full_filepath}#{line_msg} - [#{'FIXED'.green}] #{txt}"
end
@ -389,7 +389,7 @@ class Msftidy
end
if (ln.length > LONG_LINE_LENGTH)
warn("Line exceeding #{LONG_LINE_LENGTH.to_s} bytes", idx)
warn("Line exceeding #{LONG_LINE_LENGTH} bytes", idx)
end
if ln =~ /[ \t]$/
@ -440,7 +440,7 @@ class Msftidy
def check_vuln_codes
checkcode = @source.scan(/(Exploit::)?CheckCode::(\w+)/).flatten[1]
if checkcode and checkcode !~ /^Unknown|Safe|Detected|Appears|Vulnerable|Unsupported$/
error("Unrecognized checkcode: #{checkcode.to_s}")
error("Unrecognized checkcode: #{checkcode}")
end
end