From b0416990e4db121bfa1c056b023fea5d28b53ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melih=20Kaan=20Y=C4=B1ld=C4=B1z?= Date: Mon, 6 Feb 2023 20:39:16 +0300 Subject: [PATCH] Update probe.js (#44) This probe has the issue stated in the link below * https://github.com/mandatoryprogrammer/xsshunter-express/issues/11 This commit fixes it. --- probe.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/probe.js b/probe.js index 4d2f9ac..a87fd7e 100644 --- a/probe.js +++ b/probe.js @@ -304,12 +304,25 @@ try { probe_return_data['injection_key'] = ''; } -probe_return_data['title'] = document.title; +try{ + probe_return_data['title'] = document.title; +} catch( e ){ + probe_return_data['title'] = ''; +} -//probe_return_data['text'] = get_dom_text(); +try{ + probe_return_data['text'] = get_dom_text(); +} catch( e ){ + probe_return_data['text'] = ''; +} +try{ + probe_return_data['was_iframe'] = !(window.top === window) +} catch( e ){ + probe_return_data['was_iframe'] = ''; + +} -probe_return_data['was_iframe'] = !(window.top === window) async function hook_load_if_not_ready() { try {