Skip to content

Commit

Permalink
Merge pull request #345 from CybercentreCanada/id_vbs
Browse files Browse the repository at this point in the history
Adding strong indicators for vbs
  • Loading branch information
cccs-kevin authored Sep 2, 2021
2 parents 09c2bdf + 9a0240b commit 15a2ab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assemblyline/common/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
re.compile(rb'(^|\n)ExecuteGlobal'),
re.compile(rb'(^|\n)REM[ \t]+'),
re.compile(rb'(ubound|lbound)\('),
re.compile(rb'CreateObject\('),
re.compile(rb'Set[ \t]+\w+[ \t]*='),
],
'code/javascript': [
re.compile(rb'function([ \t]*|[ \t]+[\w]+[ \t]*)\([\w \t,]*\)[ \t]*{'),
Expand Down
5 changes: 5 additions & 0 deletions test/test_identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def test_constants():
(b"\nREM\t", ["code/vbs"]),
(b"ubound(", ["code/vbs"]),
(b"lbound(", ["code/vbs"]),
(b"CreateObject(", ["code/vbs"]),
(b"Set blah =", ["code/vbs"]),
(b"Set\tblah\t=", ["code/vbs"]),
(b"Set\tblah=", ["code/vbs"]),
(b"Setblah=", []),
# JS
(b"function(){", ["code/javascript"]),
(b"function( ) {", ["code/javascript"]),
Expand Down

0 comments on commit 15a2ab4

Please sign in to comment.