Skip to content

Commit

Permalink
Merge pull request #293 from CybercentreCanada/identify_js
Browse files Browse the repository at this point in the history
Identify js
  • Loading branch information
cccs-kevin authored Jul 13, 2021
2 parents 4105664 + 73ed268 commit 2a4ebed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions assemblyline/common/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
re.compile(rb'\.oneOfChild'),
re.compile(rb'unescape\('),
re.compile(rb'\.createElement\('),
re.compile(rb'submitForm\('),
],
'code/csharp': [
re.compile(rb'(^|\n)[ \t]*namespace[ \t]+[\w.]+'),
Expand Down
1 change: 1 addition & 0 deletions test/test_identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def test_constants():
(b".oneOfChild", ["code/javascript"]),
(b"unescape(", ["code/javascript"]),
(b".createElement(", ["code/javascript"]),
(b"submitForm(", ["code/javascript"]),
# C#
(b"namespace blah", ["code/csharp", "code/php"]),
(b"\nnamespace\tblah(", ["code/csharp", "code/php"]),
Expand Down

0 comments on commit 2a4ebed

Please sign in to comment.