This commit is contained in:
2025-06-06 01:40:17 +02:00
parent d800de05fb
commit e887de976a
46 changed files with 2970 additions and 1523 deletions

View File

@@ -3,4 +3,4 @@ FROM ghcr.io/puppeteer/puppeteer:latest
WORKDIR /home/pptruser/
COPY bot.js .
CMD ["node", "bot.js"]
CMD ["node", "bot.js"]

View File

@@ -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)
}