From 63f691994e67c1384d915d7c6cb3c2b269f42f4e Mon Sep 17 00:00:00 2001 From: wheatley Date: Sat, 23 Sep 2023 14:09:13 +1000 Subject: [PATCH 01/18] Update win10_chrome_81.config.yml --- .../browserstack/windows/win10/win10_chrome_81.config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml b/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml index 2b532ff61..bf8d3ad09 100644 --- a/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml +++ b/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml @@ -1,7 +1,7 @@ server: "hub-cloud.browserstack.com" common_caps: - "build": "Windows 10 Chrome 81" + "build": "Windows 11 Chrome 103" "project": "BeEF" "browserstack.local": true "browserstack.video": false @@ -9,6 +9,6 @@ common_caps: browser_caps: - "browser": "chrome" - "browser_version": "81.0" + "browser_version": "103.0" "os": "windows" - "os_version": "10" \ No newline at end of file + "os_version": "11” \ No newline at end of file From ffd8b1b6708893ec0f4a69babb9986221658fb90 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 13:13:54 +1000 Subject: [PATCH 02/18] Update win10_chrome_81.config.yml --- .../browserstack/windows/win10/win10_chrome_81.config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml b/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml index bf8d3ad09..d1cfbe880 100644 --- a/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml +++ b/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml @@ -11,4 +11,4 @@ browser_caps: "browser": "chrome" "browser_version": "103.0" "os": "windows" - "os_version": "11” \ No newline at end of file + "os_version": "11" \ No newline at end of file From 1f0c5d7ee95fc25b4d769b2fbd230ee467d41b15 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 13:23:28 +1000 Subject: [PATCH 03/18] updated file name to match config --- .../{win10_chrome_81.config.yml => win11_chrome_103.config.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spec/support/browserstack/windows/win10/{win10_chrome_81.config.yml => win11_chrome_103.config.yml} (100%) diff --git a/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml b/spec/support/browserstack/windows/win10/win11_chrome_103.config.yml similarity index 100% rename from spec/support/browserstack/windows/win10/win10_chrome_81.config.yml rename to spec/support/browserstack/windows/win10/win11_chrome_103.config.yml From 727d422bd4755e122b93940288d39464ad8fb05e Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 13:32:03 +1000 Subject: [PATCH 04/18] updated to make new file name --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ac2c2aa4d..514f439c2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -35,7 +35,7 @@ end TASK_ID = (ENV['TASK_ID'] || 0).to_i print_info ENV['CONFIG_FILE'] -CONFIG_FILE = ENV['CONFIG_FILE'] || 'windows/win10/win10_chrome_81.config.yml' +CONFIG_FILE = ENV['CONFIG_FILE'] || 'windows/win10/win11_chrome_103.config.yml' CONFIG = YAML.safe_load(File.read("./spec/support/browserstack/#{CONFIG_FILE}")) CONFIG['user'] = ENV['BROWSERSTACK_USERNAME'] || '' CONFIG['key'] = ENV['BROWSERSTACK_ACCESS_KEY'] || '' From ca933d76c438932e5480e5a9d08db990918bff8f Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 13:58:26 +1000 Subject: [PATCH 05/18] downgrading version due to change in how it operates --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ac82d2671..7f7680ecc 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 4.12' + gem 'selenium-webdriver', '~> 4.0' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From bfbc73c989553040e42c6b4582dc00cbdcd15cdf Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 14:02:49 +1000 Subject: [PATCH 06/18] downgrading again to see if these will run --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 7f7680ecc..0db3d5216 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 4.0' + gem 'selenium-webdriver', '~> '3.8' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From 471d025bae406d22998fa510df874f3c245f0a04 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 14:07:12 +1000 Subject: [PATCH 07/18] fixed syntax error --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 0db3d5216..152d52807 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> '3.8' + gem 'selenium-webdriver', '~> 3.8' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From 86c3b5e6cc81268e5b7a25c5e51e64859a3ea65f Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 20:40:12 +1000 Subject: [PATCH 08/18] revert to older version --- .../windows/win10/win10_chrome_81.config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spec/support/browserstack/windows/win10/win10_chrome_81.config.yml diff --git a/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml b/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml new file mode 100644 index 000000000..2b532ff61 --- /dev/null +++ b/spec/support/browserstack/windows/win10/win10_chrome_81.config.yml @@ -0,0 +1,14 @@ +server: "hub-cloud.browserstack.com" + +common_caps: + "build": "Windows 10 Chrome 81" + "project": "BeEF" + "browserstack.local": true + "browserstack.video": false + +browser_caps: + - + "browser": "chrome" + "browser_version": "81.0" + "os": "windows" + "os_version": "10" \ No newline at end of file From 5f9efcb455fe68a89eb5901e1ec34ee6c22a14fd Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 20:40:52 +1000 Subject: [PATCH 09/18] revert changes --- .../windows/win10/win11_chrome_103.config.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 spec/support/browserstack/windows/win10/win11_chrome_103.config.yml diff --git a/spec/support/browserstack/windows/win10/win11_chrome_103.config.yml b/spec/support/browserstack/windows/win10/win11_chrome_103.config.yml deleted file mode 100644 index d1cfbe880..000000000 --- a/spec/support/browserstack/windows/win10/win11_chrome_103.config.yml +++ /dev/null @@ -1,14 +0,0 @@ -server: "hub-cloud.browserstack.com" - -common_caps: - "build": "Windows 11 Chrome 103" - "project": "BeEF" - "browserstack.local": true - "browserstack.video": false - -browser_caps: - - - "browser": "chrome" - "browser_version": "103.0" - "os": "windows" - "os_version": "11" \ No newline at end of file From aba70bbfaecff7938d0c34e3cc299710e2c74e9a Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 20:45:25 +1000 Subject: [PATCH 10/18] reverted to old file name --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 514f439c2..ac2c2aa4d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -35,7 +35,7 @@ end TASK_ID = (ENV['TASK_ID'] || 0).to_i print_info ENV['CONFIG_FILE'] -CONFIG_FILE = ENV['CONFIG_FILE'] || 'windows/win10/win11_chrome_103.config.yml' +CONFIG_FILE = ENV['CONFIG_FILE'] || 'windows/win10/win10_chrome_81.config.yml' CONFIG = YAML.safe_load(File.read("./spec/support/browserstack/#{CONFIG_FILE}")) CONFIG['user'] = ENV['BROWSERSTACK_USERNAME'] || '' CONFIG['key'] = ENV['BROWSERSTACK_ACCESS_KEY'] || '' From 6e13b1aedc7293e3a8577d4cf40e0f48a645fb4d Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 21:19:08 +1000 Subject: [PATCH 11/18] experimenting with version 4 of the driver --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 152d52807..7f7680ecc 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 3.8' + gem 'selenium-webdriver', '~> 4.0' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From 6e944a0c2ca7c5416ddd28afd4197c6f4a9c2cc0 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 21:23:43 +1000 Subject: [PATCH 12/18] reverting version to web driver version 3.1 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 7f7680ecc..8549afa85 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 4.0' + gem 'selenium-webdriver', '~> 3.0' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From f359ad52836a4d9ec69ff317510fc988a7433860 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sun, 24 Sep 2023 21:34:05 +1000 Subject: [PATCH 13/18] experimenting 3.9 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 8549afa85..0fa374fda 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 3.0' + gem 'selenium-webdriver', '~> 3.9' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From 4dddb2d0f78a1063185684b535b9b478f9cd5549 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sat, 30 Sep 2023 19:03:13 +1000 Subject: [PATCH 14/18] updated webdriver to use selenium4 params --- .../autorun_engine/autorun_engine_spec.rb | 22 +---- .../handlers/browser_details_handler_spec.rb | 27 +----- .../websocket_hooked_browser_spec.rb | 22 +---- .../modules/debug/test_beef_debugs_spec.rb | 84 +------------------ 4 files changed, 4 insertions(+), 151 deletions(-) diff --git a/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb b/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb index a4634abdb..425f8e50c 100644 --- a/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb +++ b/spec/beef/core/main/autorun_engine/autorun_engine_spec.rb @@ -84,7 +84,7 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do @driver = Selenium::WebDriver.for(:remote, url: "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub", - desired_capabilities: @caps) + options: @caps) # Hook new victim print_info 'Hooking a new victim, waiting a few seconds...' wait = Selenium::WebDriver::Wait.new(timeout: 30) # seconds @@ -96,16 +96,6 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do sleep 1 until wait.until { @driver.execute_script('return window.beef.session.get_hook_session_id().length') > 0 } @session = @driver.execute_script('return window.beef.session.get_hook_session_id()') - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end end @@ -115,15 +105,5 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do it 'AutoRunEngine is working' do expect(@session).not_to be_nil - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - expect(BeEF::Filters.is_valid_hook_session_id?(@driver.execute_script('return window.beef.session.get_hook_session_id()'))).to eq true - end end end diff --git a/spec/beef/core/main/handlers/browser_details_handler_spec.rb b/spec/beef/core/main/handlers/browser_details_handler_spec.rb index 23c523326..d516f861a 100644 --- a/spec/beef/core/main/handlers/browser_details_handler_spec.rb +++ b/spec/beef/core/main/handlers/browser_details_handler_spec.rb @@ -78,7 +78,7 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do @driver = Selenium::WebDriver.for(:remote, url: "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub", - desired_capabilities: @caps) + options: @caps) # Hook new victim print_info 'Hooking a new victim, waiting a few seconds...' wait = Selenium::WebDriver::Wait.new(timeout: 30) # seconds @@ -90,15 +90,6 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do sleep 1 until wait.until { @driver.execute_script('return window.beef.session.get_hook_session_id().length') > 0 } @session = @driver.execute_script('return window.beef.session.get_hook_session_id()') - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end end @@ -108,16 +99,6 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do it 'can successfully hook a browser' do expect(@session).not_to be_nil - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - expect(BeEF::Filters.is_valid_hook_session_id?(@driver.execute_script('return window.beef.session.get_hook_session_id()'))).to eq true - end end it 'browser details handler working' do @@ -132,11 +113,5 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do end expect(@driver.browser.to_s.downcase).to eq(browser_name) - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace.each { |stack| puts stack }}" - exit 0 end end diff --git a/spec/beef/extensions/websocket_hooked_browser_spec.rb b/spec/beef/extensions/websocket_hooked_browser_spec.rb index c752fa31a..54955f364 100644 --- a/spec/beef/extensions/websocket_hooked_browser_spec.rb +++ b/spec/beef/extensions/websocket_hooked_browser_spec.rb @@ -74,7 +74,7 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do @driver = Selenium::WebDriver.for(:remote, url: "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub", - desired_capabilities: @caps) + options: @caps) # Hook new victim print_info 'Hooking a new victim, waiting a few seconds...' wait = Selenium::WebDriver::Wait.new(timeout: 30) # seconds @@ -86,16 +86,6 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do sleep 1 until wait.until { @driver.execute_script('return window.beef.session.get_hook_session_id().length') > 0 } @session = @driver.execute_script('return window.beef.session.get_hook_session_id().length') - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end end @@ -115,15 +105,5 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do it 'can successfully hook a browser' do expect(@session).not_to be_nil - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.stacktrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - expect(BeEF::Filters.is_valid_hook_session_id?(@driver.execute_script('return window.beef.session.get_hook_session_id()'))).to eq true - end end end diff --git a/spec/beef/modules/debug/test_beef_debugs_spec.rb b/spec/beef/modules/debug/test_beef_debugs_spec.rb index 4283cc9eb..7ebf45c89 100644 --- a/spec/beef/modules/debug/test_beef_debugs_spec.rb +++ b/spec/beef/modules/debug/test_beef_debugs_spec.rb @@ -72,10 +72,9 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do @caps['name'] = self.class.description || ENV['name'] || 'no-name' @caps['browserstack.local'] = true @caps['browserstack.localIdentifier'] = ENV['BROWSERSTACK_LOCAL_IDENTIFIER'] - @driver = Selenium::WebDriver.for(:remote, url: "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub", - desired_capabilities: @caps) + options: @caps) # Hook new victim print_info 'Hooking a new victim, waiting a few seconds...' wait = Selenium::WebDriver::Wait.new(timeout: 30) # seconds @@ -119,16 +118,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Return ASCII Characters command module successfully executes' do @@ -138,16 +127,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Return Image command module successfully executes' do @@ -157,16 +136,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Test HTTP Redirect command module successfully executes' do @@ -176,16 +145,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Test Returning Results/Long String command module successfully executes' do @@ -196,17 +155,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - print_info "Exception Message: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Test Network Request command module successfully executes' do @@ -224,16 +172,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Test DNS Tunnel command module successfully executes' do @@ -244,16 +182,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end it 'The Test CORS Request command module successfully executes' do @@ -267,15 +195,5 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do content_type: :json result_data = JSON.parse(response.body) expect(result_data['success']).to eq 'true' - rescue StandardError => e - print_info "Exception: #{e}" - print_info "Exception Class: #{e.class}" - print_info "Exception Message: #{e.message}" - print_info "Exception Stack Trace: #{e.backtrace}" - if @driver.execute_script('return window.beef.session.get_hook_session_id().length').nil? - exit 1 - else - exit 0 - end end end From 82f733783a8c91c5ad81b3f478cd1d1280598646 Mon Sep 17 00:00:00 2001 From: wheatley Date: Sat, 30 Sep 2023 19:10:47 +1000 Subject: [PATCH 15/18] revert to original selenium version --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 0fa374fda..ac82d2671 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 3.9' + gem 'selenium-webdriver', '~> 4.12' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev From 9992499bae2680da600274a302eda80137e0945f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Sep 2023 19:27:12 +1000 Subject: [PATCH 16/18] Bump selenium-webdriver from 4.12.0 to 4.13.1 (#2938) Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.12.0 to 4.13.1. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES) - [Commits](https://github.com/SeleniumHQ/selenium/commits) --- updated-dependencies: - dependency-name: selenium-webdriver dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index ac82d2671..94655b60e 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :test do # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior # gem 'selenium' # Requires old version of selenium which is no longer available gem 'geckodriver-helper', '~> 0.24.0' - gem 'selenium-webdriver', '~> 4.12' + gem 'selenium-webdriver', '~> 4.13' # nokogiri is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev diff --git a/Gemfile.lock b/Gemfile.lock index b55933b4f..4a5a89ac9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -170,7 +170,7 @@ GEM rushover (0.3.0) json rest-client - selenium-webdriver (4.12.0) + selenium-webdriver (4.13.1) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -220,11 +220,11 @@ GEM unf_ext (0.0.8.2) unicode-display_width (2.4.2) webrick (1.8.1) - websocket (1.2.9) + websocket (1.2.10) websocket-client-simple (0.6.1) event_emitter websocket - xmlrpc (0.3.2) + xmlrpc (0.3.3) webrick xpath (3.2.0) nokogiri (~> 1.8) @@ -264,7 +264,7 @@ DEPENDENCIES rubocop (~> 1.56.3) rubyzip (~> 2.3) rushover (~> 0.3.0) - selenium-webdriver (~> 4.12) + selenium-webdriver (~> 4.13) sinatra (~> 3.0) slack-notifier (~> 2.4) sqlite3 (~> 1.6) @@ -273,7 +273,7 @@ DEPENDENCIES thin (~> 1.8) uglifier (~> 4.2) websocket-client-simple (~> 0.6.1) - xmlrpc (~> 0.3.2) + xmlrpc (~> 0.3.3) BUNDLED WITH 2.4.8 From 5e2b60ae001d7fca1ea6a9bac1d2bfe8a60d5fa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 30 Sep 2023 19:36:27 +1000 Subject: [PATCH 17/18] Bump rubocop from 1.56.3 to 1.56.4 (#2939) Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.56.3 to 1.56.4. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.56.3...v1.56.4) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 94655b60e..6b9262226 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'espeak-ruby', '~> 1.1.0' # Text-to-Voice gem 'rake', '~> 13.0' gem 'otr-activerecord', '~> 2.1', '>= 2.1.2' gem 'sqlite3', '~> 1.6' -gem 'rubocop', '~> 1.56.3', require: false +gem 'rubocop', '~> 1.56.4', require: false # Geolocation support group :geoip do diff --git a/Gemfile.lock b/Gemfile.lock index 4a5a89ac9..baa55ceb5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -150,7 +150,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.56.3) + rubocop (1.56.4) base64 (~> 0.1.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -261,7 +261,7 @@ DEPENDENCIES rdoc (~> 6.5) rest-client (~> 2.1.0) rspec (~> 3.12) - rubocop (~> 1.56.3) + rubocop (~> 1.56.4) rubyzip (~> 2.3) rushover (~> 0.3.0) selenium-webdriver (~> 4.13) From 23a2b79020d56b6febea5d6048aa642c0e52f18e Mon Sep 17 00:00:00 2001 From: wheatley Date: Sat, 30 Sep 2023 19:42:16 +1000 Subject: [PATCH 18/18] Update github_actions.yml (#2937) --- .github/workflows/github_actions.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index de0ba7a17..e08d574ce 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -44,13 +44,17 @@ jobs: with: ruby-version: 3.0.3 # Not needed with a .ruby-version file - - name: 'Build and run tests' + - name: 'Update and Install Dwpendencies' run: | sudo apt update sudo apt install libcurl4 libcurl4-openssl-dev + - name: 'Configure Bundle testing and install gems' + run: | bundle config unset --local without bundle config set --local with 'test' 'development' bundle install + - name: 'Run BrowserStack simple verification' + run: | bundle exec rake browserstack --trace - name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection