Update browsers with msie and Opera
This commit is contained in:
parent
71d8ee2113
commit
4b58048198
|
@ -60,6 +60,8 @@ browser_icons = {
|
|||
'Safari':'safari',
|
||||
'Firefox':'firefox',
|
||||
'Mozilla':'mozilla',
|
||||
'Internet Explorer':'msie',
|
||||
'Opera':'opera',
|
||||
}
|
||||
|
||||
class IWLADisplayBrowsers(IPlugin):
|
||||
|
|
|
@ -22,8 +22,6 @@ from iwla import IWLA
|
|||
from iplugin import IPlugin
|
||||
from display import *
|
||||
|
||||
import awstats_data
|
||||
|
||||
"""
|
||||
Display hook
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@ import re
|
|||
from iwla import IWLA
|
||||
from iplugin import IPlugin
|
||||
|
||||
import awstats_data
|
||||
|
||||
"""
|
||||
Post analysis hook
|
||||
|
||||
|
@ -55,15 +53,18 @@ Statistics deletion :
|
|||
None
|
||||
"""
|
||||
|
||||
browser_order = ['android', 'iphone', 'xbox', 'edge', 'chrome', 'safari', 'firefox', 'curl', 'wget', 'w3m']
|
||||
browser_order = ['android', 'iphone', 'xbox', 'edge', 'opera', 'chrome', 'safari', 'firefox', 'ie', 'mozilla', 'curl', 'wget', 'w3m']
|
||||
|
||||
browser_hashid = {
|
||||
'android':'Android',
|
||||
'iphone':'iPhone',
|
||||
'edge':'Edg',
|
||||
'chrome':'Chrom',
|
||||
'chrome':['Chrom', 'Chrome'],
|
||||
'safari':'Safari',
|
||||
'firefox':'Firefox',
|
||||
'ie':'MSIE',
|
||||
'mozilla':'Mozilla',
|
||||
'opera':'OPR',
|
||||
'xbox':'Xbox',
|
||||
'curl':'curl',
|
||||
'wget':'Wget',
|
||||
|
@ -77,6 +78,9 @@ browser_name = {
|
|||
'chrome':'Chrome',
|
||||
'safari':'Safari',
|
||||
'firefox':'Firefox',
|
||||
'ie':'Internet Explorer',
|
||||
'mozilla':'Mozilla',
|
||||
'opera':'Opera',
|
||||
'xbox':'Xbox',
|
||||
'curl':'Curl',
|
||||
'wget':'Wget',
|
||||
|
@ -101,9 +105,20 @@ class IWLAPostAnalysisBrowsers(IPlugin):
|
|||
|
||||
name = 'Unknown'
|
||||
for browser in browser_order:
|
||||
reference = browser_hashid[browser]
|
||||
if type(reference) == list:
|
||||
for ref in reference:
|
||||
if ref in user_agent:
|
||||
name = browser_name[browser]
|
||||
break
|
||||
if name != 'Unknown':
|
||||
break
|
||||
else:
|
||||
if browser_hashid[browser] in user_agent:
|
||||
name = browser_name[browser]
|
||||
break
|
||||
if name == 'Unknown' and 'Macintosh' in user_agent:
|
||||
name = 'Safari'
|
||||
super_hit['browser'] = name
|
||||
break
|
||||
else:
|
||||
|
|
BIN
resources/icon/browser/msie.png
Normal file
BIN
resources/icon/browser/msie.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 B |
BIN
resources/icon/browser/opera.png
Normal file
BIN
resources/icon/browser/opera.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 B |
Loading…
Reference in New Issue
Block a user