| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /tmp/smi-shot/ |
Upload File : |
const puppeteer=require('puppeteer'); const fs=require('fs');
const MOCK={success:true,data:{count:2,data:[
{id:'d1',first_name:'Jörg',last_name:'Müller',gender:'male',birthdate:'1965-02-22',age:61,country:'DE',city:'Hamburg',postal_code:'20095',address:'Gänsemarkt 1, 20095 Hamburg',email_dummy:'joerg.mueller1@example.com',phone_dummy:'+49 000 000000',synthetic:true,created_at:'2026-07-06T12:00:00+02:00'},
{id:'d2',first_name:'Anna',last_name:'García',gender:'female',birthdate:'1979-10-18',age:46,country:'ES',city:'Bilbao',postal_code:'48001',address:'Calle Mayor 117, 48001 Bilbao',email_dummy:'anna.garcia2@example.com',phone_dummy:'+34 000 000000',synthetic:true,created_at:'2026-07-06T12:00:01+02:00'}
]}};
(async()=>{const b=await puppeteer.launch({headless:'new',args:['--no-sandbox','--disable-setuid-sandbox','--host-resolver-rules=MAP www.safemyident.de 127.0.0.1','--ignore-certificate-errors']});
async function load(page,url){
await page.setCookie({name:'wordpress_logged_in_8ee7c555d1ecbc630d9be8fb20481a97',value:process.env.CVAL,domain:'www.safemyident.de',path:'/',httpOnly:true,secure:true});
await page.setRequestInterception(true);
page.on('request',r=>{if(r.method()==='POST'&&r.url().includes('admin-ajax.php'))r.respond({status:200,contentType:'application/json',body:JSON.stringify(MOCK)});else r.continue();});
await page.goto(url,{waitUntil:'networkidle2',timeout:60000});
}
// DE
const p=await b.newPage(); await load(p,'https://www.safemyident.de/tools/identitaets-generator/');
const dePh=await p.$eval('#smi-idg-city',el=>el.placeholder);
await p.click('#smi-idg-submit');
await p.waitForFunction(()=>document.querySelector('.smi-idg__card'),{timeout:15000}).catch(()=>{});
const csvHiddenCards=await p.$eval('#smi-idg-csv',el=>el.hidden);
await p.click('.smi-idg__view[data-view="table"]');
const csvShownTable=await p.$eval('#smi-idg-csv',el=>!el.hidden);
const csvLabel=await p.$eval('#smi-idg-csv',el=>el.textContent.trim());
// enable downloads
const client=await p.target().createCDPSession();
await client.send('Page.setDownloadBehavior',{behavior:'allow',downloadPath:'/tmp/smi-dl'});
await p.click('#smi-idg-csv');
await new Promise(r=>setTimeout(r,800));
let csv=''; const f='/tmp/smi-dl/safemyident-identities.csv';
if(fs.existsSync(f)) csv=fs.readFileSync(f,'utf8');
console.log('DE placeholder:', JSON.stringify(dePh));
console.log('CSV hidden in cards:', csvHiddenCards, '| shown in table:', csvShownTable, '| label:', JSON.stringify(csvLabel));
console.log('CSV file exists:', fs.existsSync(f), '| bytes:', csv.length);
console.log('CSV BOM:', csv.charCodeAt(0)===0xFEFF);
console.log('CSV head:', JSON.stringify(csv.replace(/^/,'').split('\r\n')[0]));
console.log('CSV row1:', JSON.stringify(csv.replace(/^/,'').split('\r\n')[1]));
// EN
const p2=await b.newPage(); await load(p2,'https://www.safemyident.de/en/tools/identity-generator/');
const enPh=await p2.$eval('#smi-idg-city',el=>el.placeholder);
const enCsv=await p2.$eval('#smi-idg-csv',el=>el.textContent.trim());
console.log('EN placeholder:', JSON.stringify(enPh), '| EN csv label:', JSON.stringify(enCsv));
await b.close();})().catch(e=>{console.error('ERR',e.message);process.exit(1);});