Skip to content

Commit e480210

Browse files
committed
Test of source.csv and csv_import.sh v0.1.1
empty files!!! --------- Thanks to Jetbrains for Sponsoring My Privacy DNS with their Open Source software licenses. Their software helps us develop and maintain My Privacy DNS and other project as they made writing code easier.
1 parent a2ff6ec commit e480210

File tree

6 files changed

+38
-23
lines changed

6 files changed

+38
-23
lines changed

.editorconfig

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
; Check http://editorconfig.org/ for more information's
2+
3+
root = true
4+
5+
[*]
6+
trim_trailing_whitespace = true
7+
end_of_line = LF
8+
insert_final_newline = true
9+
charset = utf-8
10+
indent_style = space
11+
indent_size = 4
12+
tab_width = 4
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.{yaml,yml}]
18+
indent_size = 2
19+
tab_width = 2
20+
21+
[*.list]
22+
indent_size = 2

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# Should ensure submitted domain.list are encode with LF (\n) on gitlab
1515
/**/domain.list text eol=lf
1616
/**/wildcard.list text eol=lf
17+
/**/domain.csv text eol=lf
18+
/**/wildcard.csv text eol=lf
1719

1820
# Ensure the non-standard windows understand files ending....
1921
# PS: Before you comments on this comment... *nix is bar far the most used OS

scripts/csv_import.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,17 @@ while IFS="," read -r name type url; do
4646
# mkdir -p "${git_dir}/test/data/$name"
4747

4848
mkdir -p "${git_dir}/test/data/"
49+
ls -lha "${git_dir}/test/data/"
4950

5051
if [ "$type" == rfc954 ]; then
51-
# fetch "$url" | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' >"${git_dir}/test/data/$name.csv"
52-
echo "rfc954"
52+
ls -lha "${git_dir}/test/data/"
53+
fetch "$url" | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/test/data/$name.csv"
54+
ls -lha "${git_dir}/test/data/"
5355

5456
elif [ "$type" == 'domain' ]; then
55-
fetch "$url" | awk '/localhost/{next}; /^(#|$)/{ next }; { printf("%s\n",tolower($1)) | "sort -i | uniq -u -i " }' | more #>"${git_dir}/test/data/$name.csv"
57+
ls -lha "${git_dir}/test/data/"
58+
fetch "$url" | awk '/localhost/{next}; /^(#|$)/{ next }; { printf("%s\n",tolower($1)) | "sort -i | uniq -u -i " }' > "${git_dir}/test/data/$name.csv"
59+
ls -lha "${git_dir}/test/data/"
5660
fi
5761
echo "imported $name"
5862
echo ""

scripts/dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ bash -c "$(curl -sL https://raw.githubusercontent.com/ilikenwf/apt-fast/master/q
2727

2828
apt-fast update -yqq
2929
#apt-fastdist-upgrade -yqq
30-
apt-fast install -yqq openssh-client curl wget ldnsutils \
30+
apt-fast install -yqq openssh-client curl wget dos2unix ldnsutils \
3131
libdomain-publicsuffix-perl

scripts/import.sh

+5-19
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,14 @@ echo "Imported $name"
329329
name="mineNu"
330330
mkdir -p "${git_dir}/data/$name/"
331331
c https://hostsfile.mine.nu/hosts0.txt | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
332+
dos2unix -f -r -S "${git_dir}/data/$name/domain.csv"
332333
echo "Imported $name"
333334

334335
# HostsFileOrg
335336
name="HostsFileOrg"
336337
mkdir -p "${git_dir}/data/$name/"
337338
c https://hostsfile.org/Downloads/hosts.txt | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
339+
dos2unix -f -r -S "${git_dir}/data/$name/domain.csv"
338340
echo "Imported $name"
339341

340342
# digitalside | This list is not public available
@@ -379,29 +381,13 @@ mkdir -p "${git_dir}/data/$name/"
379381
c https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
380382
echo "Imported $name"
381383

382-
#
383-
name=""
384+
# BarbBlock
385+
name="BarbBlock"
384386
mkdir -p "${git_dir}/data/$name/"
385-
c | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
387+
c https://paulgb.github.io/BarbBlock/blacklists/domain-list.txt | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
386388
echo "Imported $name"
387389

388-
#
389-
name=""
390-
mkdir -p "${git_dir}/data/$name/"
391-
c | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
392-
echo "Imported $name"
393390

394-
#
395-
name=""
396-
mkdir -p "${git_dir}/data/$name/"
397-
c | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
398-
echo "Imported $name"
399-
400-
#
401-
name=""
402-
mkdir -p "${git_dir}/data/$name/"
403-
c | awk '/localhost/{next}; /^(#|$)/{ next }; { if ( $1 ~ /^[0-9]/ ) printf("%s\n",tolower($2)) | "sort -i | uniq -u -i " }' > "${git_dir}/data/$name/domain.csv"
404-
echo "Imported $name"
405391
echo ""
406392
echo ""
407393
echo "The script ${0}"

scripts/source.csv

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ AssoEchap,domain,https://raw.githubusercontent.com/AssoEchap/stalkerware-indicat
44
KADhosts_azet12,domain,https://raw.githubusercontent.com/FiltersHeroes/KADhosts/master/KADomains.txt
55
phishing-block-list,domain,https://raw.githubusercontent.com/chainapsis/phishing-block-list/main/block-list.txt
66
adblock-nocoin-list,rfc954,https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
7+
BarbBlock,domain,https://paulgb.github.io/BarbBlock/blacklists/domain-list.txt

0 commit comments

Comments
 (0)