muaddib-scanner 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/muaddib.js +10 -0
- package/data/iocs.json +2162 -37
- package/package.json +1 -1
- package/src/ioc/scraper.js +420 -0
- package/vscode-extension/LICENSE +21 -0
- package/vscode-extension/muaddib-vscode-1.0.0.vsix +0 -0
package/bin/muaddib.js
CHANGED
|
@@ -4,6 +4,7 @@ const { run } = require('../src/index.js');
|
|
|
4
4
|
const { updateIOCs } = require('../src/ioc/updater.js');
|
|
5
5
|
const { watch } = require('../src/watch.js');
|
|
6
6
|
const { startDaemon } = require('../src/daemon.js');
|
|
7
|
+
const { runScraper } = require('../src/ioc/scraper.js');
|
|
7
8
|
|
|
8
9
|
const args = process.argv.slice(2);
|
|
9
10
|
const command = args[0];
|
|
@@ -58,6 +59,7 @@ if (!command) {
|
|
|
58
59
|
Defaut: high (fail sur HIGH et CRITICAL)
|
|
59
60
|
--webhook [url] Envoie une alerte Discord/Slack
|
|
60
61
|
muaddib daemon [options] Lance le daemon de surveillance
|
|
62
|
+
muaddib scrape Scrape les advisories pour nouveaux IOCs
|
|
61
63
|
`);
|
|
62
64
|
process.exit(0);
|
|
63
65
|
}
|
|
@@ -88,6 +90,14 @@ if (command === 'scan') {
|
|
|
88
90
|
console.log('muaddib update - Met a jour les IOCs');
|
|
89
91
|
} else if (command === 'daemon') {
|
|
90
92
|
startDaemon({ webhook: webhookUrl });
|
|
93
|
+
} else if (command === 'scrape') {
|
|
94
|
+
runScraper().then(result => {
|
|
95
|
+
console.log(`[OK] ${result.added} nouveaux IOCs ajoutes (total: ${result.total})`);
|
|
96
|
+
process.exit(0);
|
|
97
|
+
}).catch(err => {
|
|
98
|
+
console.error('[ERREUR]', err.message);
|
|
99
|
+
process.exit(1);
|
|
100
|
+
});
|
|
91
101
|
} else {
|
|
92
102
|
console.log(`Commande inconnue: ${command}`);
|
|
93
103
|
process.exit(1);
|