From d6433887103d2b9c423c85d2d6f73005bbdd75fe Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Mon, 27 Apr 2020 10:39:30 +1000 Subject: [PATCH] Additional Edge fingerprinting fixes. Bumped min XP FF ver. --- .travis.yml | 2 +- core/main/constants/browsers.rb | 2 +- .../core/main/handlers/browser_details_handler_spec.rb | 8 +++++++- .../browserstack/windows/xp/xp_firefox_12.config.yml | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f13c792e1..94bd96344 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ env: # - CONFIG_FILE=windows/xp/xp_chrome_14.config.yml # - CONFIG_FILE=windows/xp/xp_chrome_28.config.yml # - CONFIG_FILE=windows/xp/xp_chrome_43.config.yml - - CONFIG_FILE=windows/xp/xp_firefox_12.config.yml + - CONFIG_FILE=windows/xp/xp_firefox_13.config.yml # - CONFIG_FILE=windows/xp/xp_firefox_25.config.yml # - CONFIG_FILE=windows/xp/xp_firefox_47.config.yml # - CONFIG_FILE=windows/xp/xp_ie_7.config.yml diff --git a/core/main/constants/browsers.rb b/core/main/constants/browsers.rb index 3be6c5c83..19c2d78b9 100644 --- a/core/main/constants/browsers.rb +++ b/core/main/constants/browsers.rb @@ -29,7 +29,7 @@ module Constants FRIENDLY_FF_NAME = 'Firefox' FRIENDLY_M_NAME = 'Mozilla' FRIENDLY_IE_NAME = 'Internet Explorer' - FRIENDLY_E_NAME = 'Microsoft Edge' + FRIENDLY_E_NAME = 'MSEdge' FRIENDLY_S_NAME = 'Safari' FRIENDLY_EP_NAME = 'Epiphany' FRIENDLY_K_NAME = 'Konqueror' 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 aaef0ff0c..391920f97 100644 --- a/spec/beef/core/main/handlers/browser_details_handler_spec.rb +++ b/spec/beef/core/main/handlers/browser_details_handler_spec.rb @@ -113,6 +113,12 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do response = RestClient.get "#{RESTAPI_HOOKS}/#{@session}?token=#{@token}" details = JSON.parse(response.body) - expect(@driver.browser.to_s.downcase).to eq(details['browser.name.friendly'].downcase).or eq('internet_explorer') + if details['browser.name.friendly'].downcase == 'internet explorer' + browser_name = 'internet_explorer' + else + browser_name = details['browser.name.friendly'].downcase + end + + expect(@driver.browser.to_s.downcase).to eq(browser_name) end end diff --git a/spec/support/browserstack/windows/xp/xp_firefox_12.config.yml b/spec/support/browserstack/windows/xp/xp_firefox_12.config.yml index 87f896e1e..6acc03244 100644 --- a/spec/support/browserstack/windows/xp/xp_firefox_12.config.yml +++ b/spec/support/browserstack/windows/xp/xp_firefox_12.config.yml @@ -1,7 +1,7 @@ server: "hub-cloud.browserstack.com" common_caps: - "build": "Windows XP Firefox 12" + "build": "Windows XP Firefox 13" "project": "BeEF" "browserstack.local": true "browserstack.video": false @@ -9,6 +9,6 @@ common_caps: browser_caps: - "browser": "firefox" - "browser_version": "12.0" + "browser_version": "13.0" "os": "windows" "os_version": "xp" \ No newline at end of file