Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up support files

Use namespaces, consolidate files, and move sslyze_output to vendors
folder
  • Loading branch information...
commit 2cd8d087b483a1327798f3b02c30bfcc865a2cd4 1 parent 1f15925
Mani Tadayon bowsersenior authored
9 lib/gauntlt/attack_adapters/support/cli_helper.rb
View
@@ -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
39 lib/gauntlt/attack_adapters/support/cookie_helper.rb
View
@@ -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)
1  lib/gauntlt/attack_adapters/support/env.rb
View
@@ -1 +0,0 @@
-require 'aruba/cucumber'
3  lib/gauntlt/attack_adapters/support/hooks.rb
View
@@ -1,3 +0,0 @@
-Before('@slow') do
- @aruba_timeout_seconds = 10
-end
19 lib/gauntlt/attack_adapters/support/nmap_helper.rb
View
@@ -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)
21 lib/gauntlt/attack_adapters/support/profile_helper.rb
View
@@ -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)
1  lib/gauntlt/attack_adapters/support/python_script_helper.rb
View
@@ -67,4 +67,5 @@ def ensure_python_script_installed(script_name, debug=false)
end
end
end
+
World(Gauntlt::Support::PythonScriptHelper)
0  ...ntlt/attack_adapters/support/sslyze_output.README → vendor/sslyze_output.README
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.