Update browsers with msie and Opera
This commit is contained in:
parent
71d8ee2113
commit
4b58048198
|
@ -60,6 +60,8 @@ browser_icons = {
|
||||||
'Safari':'safari',
|
'Safari':'safari',
|
||||||
'Firefox':'firefox',
|
'Firefox':'firefox',
|
||||||
'Mozilla':'mozilla',
|
'Mozilla':'mozilla',
|
||||||
|
'Internet Explorer':'msie',
|
||||||
|
'Opera':'opera',
|
||||||
}
|
}
|
||||||
|
|
||||||
class IWLADisplayBrowsers(IPlugin):
|
class IWLADisplayBrowsers(IPlugin):
|
||||||
|
|
|
@ -22,8 +22,6 @@ from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
from display import *
|
from display import *
|
||||||
|
|
||||||
import awstats_data
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Display hook
|
Display hook
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ import re
|
||||||
from iwla import IWLA
|
from iwla import IWLA
|
||||||
from iplugin import IPlugin
|
from iplugin import IPlugin
|
||||||
|
|
||||||
import awstats_data
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Post analysis hook
|
Post analysis hook
|
||||||
|
|
||||||
|
@ -55,15 +53,18 @@ Statistics deletion :
|
||||||
None
|
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 = {
|
browser_hashid = {
|
||||||
'android':'Android',
|
'android':'Android',
|
||||||
'iphone':'iPhone',
|
'iphone':'iPhone',
|
||||||
'edge':'Edg',
|
'edge':'Edg',
|
||||||
'chrome':'Chrom',
|
'chrome':['Chrom', 'Chrome'],
|
||||||
'safari':'Safari',
|
'safari':'Safari',
|
||||||
'firefox':'Firefox',
|
'firefox':'Firefox',
|
||||||
|
'ie':'MSIE',
|
||||||
|
'mozilla':'Mozilla',
|
||||||
|
'opera':'OPR',
|
||||||
'xbox':'Xbox',
|
'xbox':'Xbox',
|
||||||
'curl':'curl',
|
'curl':'curl',
|
||||||
'wget':'Wget',
|
'wget':'Wget',
|
||||||
|
@ -77,6 +78,9 @@ browser_name = {
|
||||||
'chrome':'Chrome',
|
'chrome':'Chrome',
|
||||||
'safari':'Safari',
|
'safari':'Safari',
|
||||||
'firefox':'Firefox',
|
'firefox':'Firefox',
|
||||||
|
'ie':'Internet Explorer',
|
||||||
|
'mozilla':'Mozilla',
|
||||||
|
'opera':'Opera',
|
||||||
'xbox':'Xbox',
|
'xbox':'Xbox',
|
||||||
'curl':'Curl',
|
'curl':'Curl',
|
||||||
'wget':'Wget',
|
'wget':'Wget',
|
||||||
|
@ -101,9 +105,20 @@ class IWLAPostAnalysisBrowsers(IPlugin):
|
||||||
|
|
||||||
name = 'Unknown'
|
name = 'Unknown'
|
||||||
for browser in browser_order:
|
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:
|
if browser_hashid[browser] in user_agent:
|
||||||
name = browser_name[browser]
|
name = browser_name[browser]
|
||||||
break
|
break
|
||||||
|
if name == 'Unknown' and 'Macintosh' in user_agent:
|
||||||
|
name = 'Safari'
|
||||||
super_hit['browser'] = name
|
super_hit['browser'] = name
|
||||||
break
|
break
|
||||||
else:
|
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