From c1da46d7da112e1e3a7547897105e447914d0ffd Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Sun, 13 Oct 2024 03:20:14 +0000 Subject: [PATCH] build: remove oisd --- src/build.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/build.js b/src/build.js index e53a510..cff09a5 100644 --- a/src/build.js +++ b/src/build.js @@ -28,20 +28,6 @@ const projects = [ 'botnet-filter', // 'pup-filter' ] -const oisdFilters = { - 'https://abp.oisd.nl/basic/': 'oisd_abp_light.txt', - 'https://abp.oisd.nl/': 'oisd_abp.txt', - 'https://dbl.oisd.nl/basic/': 'oisd_dbl_light.txt', - 'https://dbl.oisd.nl/': 'oisd_dbl.txt', - 'https://dblw.oisd.nl/': 'oisd_dblw_light.txt', - 'https://dblw.oisd.nl/basic/': 'oisd_dblw.txt', - 'https://hosts.oisd.nl/basic/': 'oisd_hosts_light.txt', - 'https://hosts.oisd.nl/': 'oisd_hosts.txt', - 'https://dnsmasq.oisd.nl/basic/': 'oisd_dnsmasq_light.txt', - 'https://dnsmasq.oisd.nl/': 'oisd_dnsmasq.txt', - 'https://rpz.oisd.nl/basic/': 'oisd_rpz_light.txt', - 'https://rpz.oisd.nl/': 'oisd_rpz.txt', -} const pipelineStatus = async (url) => { console.log(`Checking pipeline from "${url}"`) @@ -100,23 +86,6 @@ const dl = async (project) => { } } -const oisdDl = async (link, filename) => { - const txtPath = join(publicPath, filename) - console.log(`Downloading ${filename} from "${link}"`) - try { - await pipeline( - Readable.fromWeb((await fetch(link)).body), - createWriteStream(txtPath) - ) - } catch ({ message }) { - console.error(JSON.stringify({ - error: message, - link, - filename - })) - } -} - const f = async () => { await mkdir(tmpPath, { recursive: true }) await mkdir(publicPath, { recursive: true }) @@ -132,12 +101,4 @@ const f = async () => { })) } -const oisd = async () => { - await mkdir(publicPath, { recursive: true }) - if (Object.hasOwn(envVar, 'CI_PROJECT_PATH') && envVar.CI_PROJECT_PATH === 'malware-filter/malware-filter') { - await Promise.all(Object.entries(oisdFilters).map(([link, filename]) => { return oisdDl(link, filename) })) - } -} - f() -oisd()