Update
This commit is contained in:
@@ -12,7 +12,7 @@ const getBrowser = async () => {
|
||||
}
|
||||
return await puppeteer.launch({
|
||||
headless: true,
|
||||
args: ['--js-flags=--jitless', '--no-sandbox', '--disable-setuid-sandbox']
|
||||
args: ['--js-flags=--jitless', '--no-sandbox', '--disable-setuid-sandbox', '--enable-logging', '--v=1']
|
||||
})
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@ const visitSubmission = async (id) => {
|
||||
const browser = await getBrowser()
|
||||
const page = await browser.newPage()
|
||||
const hostname = new URL(BASE_URL).hostname
|
||||
const fullUrl = BASE_URL + id;
|
||||
console.log('[+] Navigating to:', fullUrl);
|
||||
await page.setCookie({
|
||||
name: 'admin_flag',
|
||||
value: FLAG,
|
||||
@@ -36,8 +38,15 @@ const visitSubmission = async (id) => {
|
||||
secure: false
|
||||
})
|
||||
try {
|
||||
await page.goto(BASE_URL + id, { waitUntil: 'networkidle2', timeout: 5000 })
|
||||
}
|
||||
const response = await page.goto(fullUrl, {
|
||||
waitUntil: 'networkidle2',
|
||||
timeout: 5000
|
||||
});
|
||||
|
||||
console.log('[+] Navigation succeeded:', response.status());
|
||||
const finalUrl = page.url();
|
||||
console.log('[+] Final URL after redirects:', finalUrl);
|
||||
}
|
||||
catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user