Skip to content

Commit

Permalink
Merge pull request #735 from CybercentreCanada/AL-3098-file-pulls-dow…
Browse files Browse the repository at this point in the history
…n-js-expecting-malicious-js-but-were-not-seeing-it-that-way

Al 3098 file pulls down js expecting malicious js but were not seeing it that way [dev]
  • Loading branch information
cccs-kevin authored Jun 14, 2024
2 parents 358f7af + 772aa81 commit 8dc302d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/malwarejail/env/web/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ function run_data_function(url, data) {
try {
if (is_domain_geo(url)) {
data(domain_geo_response);
} else if (url.indexOf("proxy") !== -1) {
data("http://example.com/");
} else {
data();
}
Expand Down
4 changes: 4 additions & 0 deletions tools/malwarejail/env/web/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,10 @@ fetch = function (url) {
if (is_domain_geo(url)) {
var response = new Response(JSON.stringify(domain_geo_response));
return response;
}
else if (url.indexOf("proxy") !== -1) {
var response = new Response("http://example.com/");
return response;
} else {
return new Response();
}
Expand Down

0 comments on commit 8dc302d

Please sign in to comment.