Permalink
Browse files

Clean up support files

Use namespaces, consolidate files, and move sslyze_output to vendors
folder
  • Loading branch information...
1 parent 1f15925 commit 2cd8d087b483a1327798f3b02c30bfcc865a2cd4 @bowsersenior bowsersenior committed Aug 4, 2012
View
9 lib/gauntlt/attack_adapters/support/cli_helper.rb
@@ -1,3 +1,5 @@
+require 'aruba/cucumber'
+
require 'English'
# English.rb adds human-readable names for things like $?, $!, etc.:
# http://www.ruby-doc.org/stdlib-1.9.3/libdoc/English/rdoc/English_rb.html
@@ -15,4 +17,9 @@ def ensure_cli_installed(bin)
end
end
end
-World(Gauntlt::Support::CliHelper)
+
+World(Gauntlt::Support::CliHelper)
+
+Before('@slow') do
+ @aruba_timeout_seconds = 10
+end
View
39 lib/gauntlt/attack_adapters/support/cookie_helper.rb
@@ -1,27 +1,32 @@
require 'curb'
-module CookieHelper
- def cookies_for(url)
- [].tap do |returner|
- c = Curl::Easy.perform(url) do |curl|
- curl.follow_location = true
- curl.enable_cookies = true
+module Gauntlt
+ module Support
+ module CookieHelper
+ def cookies_for(url)
+ [].tap do |returner|
+ c = Curl::Easy.perform(url) do |curl|
+ curl.follow_location = true
+ curl.enable_cookies = true
- curl.on_header do |header|
- returner << "#{$1}=#{$2}" if header =~ /^Set-Cookie: ([^=]+)=([^;]+;)/
+ curl.on_header do |header|
+ returner << "#{$1}=#{$2}" if header =~ /^Set-Cookie: ([^=]+)=([^;]+;)/
+ end
+ end
end
end
- end
- end
- def cookies
- raise "No cookies set" if @cookies.nil?
+ def cookies
+ raise "No cookies set" if @cookies.nil?
- @cookies
- end
+ @cookies
+ end
- def set_cookies(a)
- @cookies = a
+ def set_cookies(a)
+ @cookies = a
+ end
+ end
end
end
-World(CookieHelper)
+
+World(Gauntlt::Support::CookieHelper)
View
1 lib/gauntlt/attack_adapters/support/env.rb
@@ -1 +0,0 @@
-require 'aruba/cucumber'
View
3 lib/gauntlt/attack_adapters/support/hooks.rb
@@ -1,3 +0,0 @@
-Before('@slow') do
- @aruba_timeout_seconds = 10
-end
View
19 lib/gauntlt/attack_adapters/support/nmap_helper.rb
@@ -1,13 +1,18 @@
require 'aruba'
-module NmapHelper
- def run_nmap_attack(host, opts)
- args = opts.map{|k,v| "#{k} #{v}"}
+module Gauntlt
+ module Support
+ module NmapHelper
+ def run_nmap_attack(host, opts)
+ args = opts.map{|k,v| "#{k} #{v}"}
- command = "nmap #{args.join(' ')} #{host}"
+ command = "nmap #{args.join(' ')} #{host}"
- # run is from aruba
- run command
+ # run is from aruba
+ run command
+ end
+ end
end
end
-World(NmapHelper)
+
+World(Gauntlt::Support::NmapHelper)
View
21 lib/gauntlt/attack_adapters/support/profile_helper.rb
@@ -1,12 +1,17 @@
-module ProfileHelper
- def hostname
- raise "No host defined" if @hostname.nil?
+module Gauntlt
+ module Support
+ module ProfileHelper
+ def hostname
+ raise "No host defined" if @hostname.nil?
- @hostname
- end
+ @hostname
+ end
- def set_hostname(s)
- @hostname = s
+ def set_hostname(s)
+ @hostname = s
+ end
+ end
end
end
-World(ProfileHelper)
+
+World(Gauntlt::Support::ProfileHelper)
View
1 lib/gauntlt/attack_adapters/support/python_script_helper.rb
@@ -67,4 +67,5 @@ def ensure_python_script_installed(script_name, debug=false)
end
end
end
+
World(Gauntlt::Support::PythonScriptHelper)
View
0 ...ack_adapters/support/sslyze_output.README → vendor/sslyze_output.README
File renamed without changes.

0 comments on commit 2cd8d08

Please sign in to comment.