LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-06-2021, 05:08 AM   #1
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Rep: Reputation: Disabled
Browser spoofing


Hi, I'm trying to use Seamonkey, but some sites only want Firefox or Chrome, and seem to be using some other method than the useragent string to detect it - any ideas how to work around this?
 
Old 08-06-2021, 05:29 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,678

Rep: Reputation: Disabled
Are you sure it's really not User Agent? SeaMonkey uses the same web engine as Firefox, I don't think it would be easy for websites to tell them apart by any other means. Moreover, what would be the purpose of a website going to great lengths in order to distinguish between SeaMonkey and Firefox?

Perhaps, the SeaMonkey you're using just happens to be of much older version than Firefox?

Last edited by shruggy; 08-06-2021 at 05:35 AM.
 
Old 08-06-2021, 06:32 AM   #3
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
No, I'm not sure, but I've tried spoofing the useragent with a FF 90 string and it still says outdated browser - maybe I had the strings wrong though - will post here in a sec
 
Old 08-06-2021, 06:33 AM   #4
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
This is the string I used (in general.useragent.override) and it gave the same error: "Mozilla/5.0 (X11; Linux; x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
 
Old 08-06-2021, 07:24 AM   #5
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,627

Rep: Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556

Have you restarted the browser - I've noticed useragent overriding can be cached after first change. Check F12 > Network tab to confirm whether the value being sent matches your config.

If a site uses a server-side check to generate a HTML message, you can grep the output of curl to identify an [un]accepted value before making the actual change:

Code:
curl -LSs -A 'INSERT_USERAGENT_HERE' 'INSERT_URL_HERE' | grep -i browser
Unfortunately, many sites instead will always output the HTML then use JavaScript to hide/show it, so can't always do that. (It's probably more common that sites with bloated HTML and bloated JavaScript that can't be arsed to do basic graceful degradation and so show such messages.)


Last edited by boughtonp; 08-06-2021 at 07:29 AM.
 
Old 08-06-2021, 07:43 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,927
Blog Entries: 45

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Quote:
Originally Posted by Mantra View Post
This is the string I used (in general.useragent.override) and it gave the same error: "Mozilla/5.0 (X11; Linux; x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
You can use this site to check the user agent; https://www.whatismybrowser.com/dete...-my-user-agent

Hope this helps.
 
Old 08-06-2021, 07:44 AM   #7
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
Yes, restarted the browser (although Seamonkey doesn't seem to cache it - reloading a page such as https://gs.statcounter.com/detect shows the updated value immediately).

Not sure it affects the actual detection, but it seems to be handled with a redirect (the page in question is https://trader.degiro.nl/login/uk#/login which reloads a different page when it detects an "old" browser).
 
Old 08-06-2021, 03:36 PM   #8
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
What likely happened is that the site checked whether your browser supports what it actually needs to run, and the test was negative. They do this by executing JavaScript and looking at what fails. In that case, you actually do need a more up-to-date browser.

One question I have is: does the site actually not work, or does it just show a message that you can really ignore?
 
Old 08-07-2021, 02:54 AM   #9
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
The site won't load with the latest version of Seamonkey, but it will load with an outdated version of Midori! It doesn't show the login screen at all (and the actual login seems to be done with javascript, it doesn't seem to be possible to just load the target page by passing a username and password anywhere).
 
Old 08-07-2021, 03:03 AM   #10
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
And yes, I can just use Midori for the site instead. But at this point I want to work out what's happening out of curiosity!
 
Old 09-27-2021, 01:40 PM   #11
linux12345
LQ Newbie
 
Registered: Mar 2020
Distribution: Slackware, CentOS, Debian
Posts: 6

Rep: Reputation: Disabled
Look with Ctrl+U into the source code. Then you will find an inline script which tests browser features.
Code:
isSupportedDevice=!1;try{var fakeElement=document.createElement("div");fakeElement.style.display="grid";var featuresDetection=["grid"===fakeElement.style.display,eval("async () => ({})"),eval('({...{a: "a"}})'),"function"==typeof fetch,"function"==typeof IntersectionObserver,"function"==typeof Object.is,"function"==typeof Object.assign,"function"==typeof Array.prototype.find,"function"==typeof Array.prototype.findIndex,"function"==typeof Array.prototype.includes,"function"==typeof Array.from,"function"==typeof String.prototype.includes,"function"==typeof String.prototype.padEnd,"function"==typeof String.prototype.padStart,"function"==typeof Number.isNaN,"function"==typeof document.createElement("form").checkValidity,"object"==typeof document.createElement("input").validity,"function"==typeof document.addEventListener,"undefined"!=typeof WebSocket,"function"==typeof Object.fromEntries,"function"==typeof Promise.prototype.finally,"function"==typeof Intl.NumberFormat,"function"==typeof Intl.Collator,"function"==typeof Intl.DateTimeFormat,"function"==typeof Function.prototype.bind,"function"==typeof window.btoa,"function"==typeof window.requestAnimationFrame,"function"==typeof window.cancelAnimationFrame,void 0!==location.origin,"undefined"!=typeof localStorage,"undefined"!=typeof Worker,"undefined"!=typeof Blob,"undefined"!=typeof URL,matchMedia("(pointer: fine), (pointer: coarse), (pointer: none)").matches,"dataset"in fakeElement,"classList"in fakeElement,"withCredentials"in new XMLHttpRequest];isSupportedDevice=featuresDetection.every((function(e){return e}))}catch(e){}if(!isSupportedDevice){var pathname=location.pathname,loginRoot="/login/";return location.replace((0===pathname.indexOf(loginRoot)?loginRoot:"")+"unsupported-platform.html")}
I wonder if it is possible to write a rule for the Add-on Ublock Origin to block the execution of this special feature testing inline script? Or to save the code to disk and delete this test and make a local injection of the changed code? Or just make an 'on the fly' usage of those browser integrated web developer tools? Has anybody a nice solution how to deal with such annoyances?

Last edited by linux12345; 09-27-2021 at 02:09 PM.
 
Old 09-29-2021, 01:22 AM   #12
Mantra
Member
 
Registered: Jun 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
Good work digging that out! The ublock route sounds promising, I won't have time to look at it this weekend but hopefully next week. Progress!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ip spoofing !! freelinuxcpp Linux - Networking 4 03-01-2004 01:08 PM
IPtabls log, spoofing or isp error? Postalbunny Linux - Security 8 12-01-2002 02:02 PM
IP spoofing tied2 Linux - Security 4 07-30-2002 07:55 AM
IP Spoofing robeb Linux - Security 2 06-25-2002 12:08 AM
IP spoofing in Linux zLinuxz Linux - Security 1 04-19-2002 10:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration