Add CSS inspection, add Vuetify detection

main
Elbert Alias 4 years ago
parent 8540730ba6
commit e619fce6e9

@ -97,6 +97,19 @@
}
]
},
"css": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/definitions/non-empty-non-blank-string"
}
},
{
"$ref": "#/definitions/non-empty-non-blank-string"
}
]
},
"robots": {
"oneOf": [
{

@ -0,0 +1,6 @@
<svg width="295" height="295" viewBox="0 0 295 295" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M146.67 0H86.55L146.67 142.1" fill="#1697F6"/>
<path d="M146.67 183.81V294.1L18 42.89H85.4" fill="#7BC6FF"/>
<path d="M146.67 0H206.79L146.67 142.1" fill="#1867C0"/>
<path d="M146.67 183.81V294.1L275.34 42.89H207.94" fill="#AEDDFF"/>
</svg>

After

Width:  |  Height:  |  Size: 350 B

@ -47,6 +47,25 @@ const Content = {
: resolve()
))
// CSS rules
let css = []
try {
for (const sheet of Array.from(document.styleSheets)) {
for (const rules of Array.from(sheet.cssRules)) {
css.push(rules.cssText)
if (css.length >= 3000) {
break
}
}
}
} catch (error) {
// Continue
}
css = css.join('\n')
// Script tags
const scripts = Array.from(document.scripts)
.filter(({ src }) => src)
@ -69,7 +88,7 @@ const Content = {
Content.driver('onContentLoad', [
location.href,
{ html, scripts, meta },
{ html, css, scripts, meta },
language,
])

@ -139,6 +139,13 @@ const Driver = {
}
},
/**
* Wrapper for analyze
*/
analyze(...args) {
return analyze(...args)
},
/**
* Analyse JavaScript variables
* @param {String} url
@ -216,13 +223,13 @@ const Driver = {
let certIssuer = ''
if (browser) {
if (typeof browser !== 'undefined') {
// Currently only works in Firefox
// See https://stackoverflow.com/a/50484642
const { certificates } = await browser.webRequest.getSecurityInfo(
request.requestId,
{
certificateChain: true,
certificateChain: false,
rawDER: false,
}
)

@ -979,6 +979,16 @@
"scripts": "/([\\d.rc-]+)?/angular-material(?:\\.min)?\\.js\\;version:\\1",
"website": "https://material.angularjs.org"
},
"Vuetify": {
"cats": [
66
],
"icon": "Vuetify.svg",
"implies": "Vue.js",
"html": "<div data-app[^>]+class=\"v-application",
"css": "\\.v-application \\.d-block ",
"website": "https://vuetifyjs.com"
},
"AngularDart": {
"cats": [
18

@ -180,7 +180,17 @@ const Wappalyzer = {
* Initialize analyzation.
* @param {*} param0
*/
analyze({ url, html, robots, meta, headers, certIssuer, cookies, scripts }) {
analyze({
url,
html,
css,
robots,
meta,
headers,
certIssuer,
cookies,
scripts,
}) {
const oo = Wappalyzer.analyzeOneToOne
const om = Wappalyzer.analyzeOneToMany
const mm = Wappalyzer.analyzeManyToMany
@ -193,6 +203,7 @@ const Wappalyzer = {
flatten([
oo(technology, 'url', url),
oo(technology, 'html', html),
oo(technology, 'css', css),
oo(technology, 'robots', robots),
oo(technology, 'certIssuer', certIssuer),
om(technology, 'scripts', scripts),
@ -221,6 +232,7 @@ const Wappalyzer = {
cats,
url,
html,
css,
robots,
meta,
headers,
@ -243,6 +255,7 @@ const Wappalyzer = {
headers: transform(headers),
cookies: transform(cookies),
html: transform(html),
css: transform(css),
certIssuer: transform(certIssuer),
robots: transform(robots),
meta: transform(meta),