403Webshell
Server IP : 167.235.67.158  /  Your IP : 216.73.216.95
Web Server : Apache
System : Linux ubuntu-8gb-nbg1-1 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : upstairsbar.co.uk ( 982)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/bc.the-word.com/pi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/bc.the-word.com/pi/index.js
const fs = require('fs');

// Load the full pi digits from a text file (replace 'pi.txt' with the actual path)
const piDigits = fs.readFileSync('pi.txt', 'utf8');

// Split the digits into chunks of 1000
const chunkSize = 100;
let chunks = [];
for (let i = 0; i < piDigits.length; i += chunkSize) {
    let chunk = piDigits.slice(i, i + chunkSize);
    chunks.push(chunk);
}

// Create a directory to store the chunks if it doesn't exist
const dir = './pi_chunks';
if (!fs.existsSync(dir)) {
    fs.mkdirSync(dir);
}

// Write each chunk into a separate JSON file
chunks.forEach((chunk, index) => {
    const json = JSON.stringify({ digits: chunk });
    fs.writeFileSync(`${dir}/pi_chunk_${index + 1}.json`, json);
    console.log(`Chunk ${index + 1} saved.`);
});

console.log('All chunks saved!');

Youez - 2016 - github.com/yon3zu
LinuXploit