build: remove oisd

This commit is contained in:
MDLeom 2024-10-13 03:20:14 +00:00
parent 1158cb1f72
commit c1da46d7da
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 0 additions and 39 deletions

View File

@ -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()