Sha256: a1d70c7c9c7dc9c032790e00f3f4f6b1949fd30da52c8308fd1517f5042c2547
Contents?: true
Size: 881 Bytes
Versions: 2
Compression:
Stored size: 881 Bytes
Contents
require 'ronin/exploits/web_exploit' require 'spec_helper' describe Exploits::WebExploit do describe "targeted_url" do it "should create a targeted URL using the host param" do host = 'www.example.com' exploit = Exploits::WebExploit.new(:host => host) exploit.targeted_url.host.should == host end it "should create a targeted URL using the host param and the url_path property" do host = 'www.example.com' path = '/' exploit = Exploits::WebExploit.new(:host => host, :url_path => path) exploit.targeted_url.host.should == host exploit.targeted_url.path.should == path end it "should raise a MissingParam exception if host params is missing" do exploit = Exploits::WebExploit.new(:url_path => '/') lambda { exploit.targeted_url }.should raise_error(Parameters::MissingParam) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ronin-exploits-0.1.1 | spec/exploits/web_exploit_spec.rb |
ronin-exploits-0.1.0 | spec/exploits/web_exploit_spec.rb |