mirror of
https://gitlab.com/robocopAlpha/pihole_lists.git
synced 2026-05-18 02:42:25 -07:00
Initial commit
This commit is contained in:
commit
439b5340fc
12 changed files with 508 additions and 0 deletions
40
comparison/compareBlocklists.R
Executable file
40
comparison/compareBlocklists.R
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
setwd("~/OneDrive - O365 Turun yliopisto/Git/Gitlab.DC/pihole_lists/comparison/Mirrors/")
|
||||
file.contents <- list.files(path = ".",pattern = "txt")
|
||||
|
||||
library(doParallel)
|
||||
myCluster <- makeCluster(4, type = "FORK",useXDR=F)
|
||||
print(myCluster)
|
||||
registerDoParallel(myCluster)
|
||||
results <- foreach(f = file.contents,.inorder = F) %dopar% {
|
||||
var <- list(readLines(f))
|
||||
names(var) <- f
|
||||
return(var)
|
||||
}
|
||||
stopCluster(myCluster)
|
||||
rm(file.contents)
|
||||
|
||||
dbl <- readLines("../dbl.oisd.txt")
|
||||
|
||||
print(paste("name","LEN","common","unique",sep=":"))
|
||||
for(i in seq_along(results)){
|
||||
l=results[[i]]
|
||||
name <- names(l)
|
||||
l <- l[[1]]
|
||||
print(paste(name,length(l),length(intersect(l,dbl)),length(setdiff(l,dbl)),sep=" : "))
|
||||
}
|
||||
|
||||
tmp <- unlist(results)
|
||||
print(paste(length(tmp),length(intersect(tmp,dbl)),length(setdiff(tmp,dbl)),length(setdiff(dbl,tmp)),sep = " : "))
|
||||
|
||||
var2 <- readLines('../StevenBlack.txt')
|
||||
var2 <- c(var2,readLines('../malwaredomains.domains.txt'))
|
||||
var2 <- var2[var2 != ""]
|
||||
|
||||
for(i in seq_along(results)){
|
||||
l=results[[i]]
|
||||
name <- names(l)
|
||||
l <- l[[1]]
|
||||
print(paste(name,length(l),length(intersect(l,var2)),length(setdiff(l,var2)),sep=" : "))
|
||||
}
|
||||
rm(i,l,name)
|
||||
|
||||
BIN
comparison/def vs full.png
Executable file
BIN
comparison/def vs full.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 109 KiB |
Loading…
Add table
Add a link
Reference in a new issue