Change #compatible? method name because it's used by Module

bug/bundler_fix
jvazquez-r7 2014-02-09 19:02:21 -06:00 committed by Spencer McIntyre
parent af568c856a
commit dcd0e77f9e
2 changed files with 10 additions and 10 deletions

View File

@ -143,7 +143,7 @@ module Exploit::CmdStager
def select_cmdstager(opts = {}) def select_cmdstager(opts = {})
self.flavor = select_flavor(opts) self.flavor = select_flavor(opts)
raise ArgumentError, "Unable to select CMD Stager" if flavor.nil? raise ArgumentError, "Unable to select CMD Stager" if flavor.nil?
raise ArgumentError, "The CMD Stager selected isn't compatible with the target" unless compatible?(flavor) raise ArgumentError, "The CMD Stager selected isn't compatible with the target" unless compatible_flavor?(flavor)
self.decoder = select_decoder(opts) self.decoder = select_decoder(opts)
end end
@ -246,7 +246,7 @@ module Exploit::CmdStager
# #
# @param f [Symbol] The flavor to check # @param f [Symbol] The flavor to check
# @returns [Boolean] true if compatible, false otherwise. # @returns [Boolean] true if compatible, false otherwise.
def compatible?(f) def compatible_flavor?(f)
return true if target_flavor.nil? return true if target_flavor.nil?
case target_flavor.class.to_s case target_flavor.class.to_s
when 'String' when 'String'

View File

@ -233,7 +233,7 @@ describe Msf::Exploit::CmdStager do
end end
end end
describe "#compatible?" do describe "#compatible_flavor?" do
context "when there isn't target flavor" do context "when there isn't target flavor" do
@ -246,7 +246,7 @@ describe Msf::Exploit::CmdStager do
end end
it "is compatible" do it "is compatible" do
expect(subject.compatible?(flavor)).to be_true expect(subject.compatible_flavor?(flavor)).to be_true
end end
end end
@ -262,7 +262,7 @@ describe Msf::Exploit::CmdStager do
end end
it "is compatible" do it "is compatible" do
expect(subject.compatible?(flavor)).to be_true expect(subject.compatible_flavor?(flavor)).to be_true
end end
end end
@ -272,7 +272,7 @@ describe Msf::Exploit::CmdStager do
end end
it "isn't compatible" do it "isn't compatible" do
expect(subject.compatible?(flavor)).to be_false expect(subject.compatible_flavor?(flavor)).to be_false
end end
end end
end end
@ -289,7 +289,7 @@ describe Msf::Exploit::CmdStager do
end end
it "is compatible" do it "is compatible" do
expect(subject.compatible?(flavor)).to be_true expect(subject.compatible_flavor?(flavor)).to be_true
end end
end end
@ -299,7 +299,7 @@ describe Msf::Exploit::CmdStager do
end end
it "isn't compatible" do it "isn't compatible" do
expect(subject.compatible?(flavor)).to be_false expect(subject.compatible_flavor?(flavor)).to be_false
end end
end end
end end
@ -316,7 +316,7 @@ describe Msf::Exploit::CmdStager do
end end
it "is compatible" do it "is compatible" do
expect(subject.compatible?(flavor)).to be_true expect(subject.compatible_flavor?(flavor)).to be_true
end end
end end
@ -326,7 +326,7 @@ describe Msf::Exploit::CmdStager do
end end
it "isn't compatible" do it "isn't compatible" do
expect(subject.compatible?(flavor)).to be_false expect(subject.compatible_flavor?(flavor)).to be_false
end end
end end