added HTML and Javascript spam/malware detection
This commit is contained in:
parent
4ea2a01806
commit
3088f558d8
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vscode/settings.json
|
||||||
4
scan.py
4
scan.py
@ -242,6 +242,7 @@ scoring = {
|
|||||||
'SOCIALS': (50, u'Email addresses, links and social networking'),
|
'SOCIALS': (50, u'Email addresses, links and social networking'),
|
||||||
'EITEST': (65, u'Eitest'),
|
'EITEST': (65, u'Eitest'),
|
||||||
'CRYPTO': (65, u'Cryptocurrency Miners'),
|
'CRYPTO': (65, u'Cryptocurrency Miners'),
|
||||||
|
'HTML_JS': (20, u'HTML & Javascript Malware'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -554,6 +555,9 @@ def is_hacked(filename):
|
|||||||
if re.compile('User-Agent.*cpuminer').match(l) \
|
if re.compile('User-Agent.*cpuminer').match(l) \
|
||||||
or 'stratum+tcp' in l:
|
or 'stratum+tcp' in l:
|
||||||
score.append(('CRYPTO', ''))
|
score.append(('CRYPTO', ''))
|
||||||
|
|
||||||
|
if 'width: 0; height: 0; display: none; visibility: hidden;' in l:
|
||||||
|
score.append(('HTML_JS', ''))
|
||||||
previous_line = l
|
previous_line = l
|
||||||
|
|
||||||
if line_num < 20:
|
if line_num < 20:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user