Login Register






Simple Browser detection in JavaScript filter_list
Author
Message
Simple Browser detection in JavaScript #1
A simple method developed in JavaScript to detect browser type and version

Browser Info.html
Code:
<script> // Identify Browsers // By default browsers use misleading information, the solution is specify the version if (navigator.userAgent.indexOf("Firefox/54") != -1) {alert('Using Firefox v54');} if (navigator.userAgent.indexOf("rv:11.0") != -1) {alert('Using IE v11');} if (navigator.userAgent.indexOf("Version/5.1.7") != -1) {alert('Using Safari v5.1.7');} if (navigator.userAgent.indexOf("Edge/14") != -1) {alert('Using Edge v14');} if (navigator.userAgent.indexOf("OPR") != -1) {alert('Using Opera 46.0');} if (navigator.userAgent.indexOf("Chrome/59") != -1) {alert('Using Chrome v59');} </script>

Download:
https://www.file-up.org/5nm40aywb3k3

Virus Scan:
https://www.virustotal.com/#/file/fa488b.../detection

Reply

RE: Simple Browser detection in JavaScript #2
(02-12-2019, 02:32 PM)UplayAlts Wrote: I tried this and it seems to detect Brave under chrome, makes sense because it's chromium

Yes, that just a misconfiguration because the script is only looking for the word Chrome in the User Agent. If you want to create a detection script for Brave Browser just use the word Brave or specify a version if you are developing exploit kits. For example Brave/0.37 or brave/0.8

Here is an example of Brave Browser User Agent...
Code:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) brave/0.8.3 Chrome/49.0.2623.108 Brave/0.37.3 Safari/537.36
(This post was last modified: 04-09-2019, 03:47 PM by hacxx.)

Reply

RE: Simple Browser detection in JavaScript #3
Those who're Interested, here's a comprehensive list of user agent strings.
[Image: AD83g1A.png]

Reply