>./omniscient_

Introduction:

My OSINT project involves creating a scraping tool to collect all messages from a person on a public Discord server. These messages are then analyzed by a linguistic model to generate a profile or summary of the person. The tool helps gather Open Source Intelligence (OSINT) from public Discord conversations. It’s important to use this tool responsibly, respecting legal, ethical considerations, and privacy.

How it works:

The instruction:

You must replace this link const url = "https://discord.com/channels/1234/1234" with the link of the initial channel where you want to scrap.

After that, you just need to enter the name of the user in the search-tab of discord.

all smessages will be saved in the previously created csv named results.csv

The script:

    const puppeteer = require('puppeteer');
    const fs = require('fs');
    const readline = require('readline').createInterface({
        input: process.stdin,
        output: process.stdout
    })
    
    async function StartScrapingDiscord(){
        const url = "https://discord.com/channels/1234/1234"
    
        await puppeteer
        .launch({
            headless: false,
            userDataDir: "browser",
        })
        .then(async (browser) => {
            const page = await browser.newPage();
    
            await page.setViewport({
                width: 1366,
                height: 768,
            });
    
        page.on("response", async (response) => {
            if (response.url().includes("search?author_id")){
                const Messages = await response.json()
                console.log(Messages);
                for(const [oneMessage] of Messages.messages){
                    console.log(oneMessage.content);
                    fs.appendFileSync('results.csv', `${oneMessage.content}\n`);
                }
            }
        });
    
        await page.goto(url, {
            waitUntil: "load",
            timeout: 0,
        });
    
        });
    }
    StartScrapingDiscord()
            

You can make a macro to automatically skip the next page of the targeted user.