This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 51660fb3 Option to show initiator
51660fb3 is described below
commit 51660fb3a6b1708b9ae6e7f5269792ac75226ca4
Author: Sebb <[email protected]>
AuthorDate: Sat Apr 20 15:04:14 2024 +0100
Option to show initiator
---
tools/scan-page.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/scan-page.js b/tools/scan-page.js
index f91107ce..6aa31787 100755
--- a/tools/scan-page.js
+++ b/tools/scan-page.js
@@ -6,7 +6,7 @@ module.paths.push('/usr/lib/node_modules')
const puppeteer = require('puppeteer');
-const target = process.argv[2] || 'http://apache.org/';
+const target = process.argv[2] || 'https://apache.org/';
const inithost = new URL(target).host;
const option = process.argv[3] || '';
@@ -40,6 +40,14 @@ if (!isASFhost(inithost)) {
if (option == 'all') {
console.log(url);
interceptedRequest.continue();
+ } else if (option == 'allref') {
+ let iniurl = interceptedRequest.initiator().url;
+ if (iniurl && !iniurl.startsWith(target)) { // second level
+ console.log(url + ' <= ' + iniurl);
+ } else {
+ console.log(url);
+ }
+ interceptedRequest.continue();
} else {
if (option == 'showurl') {
console.log(url);