Skip to content

Commit fa02e03

Browse files
committed
test nrd
1 parent 1f5818d commit fa02e03

File tree

5 files changed

+369
-4
lines changed

5 files changed

+369
-4
lines changed

.github/workflows/sync.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ jobs:
4848
script: "https://raw.githubusercontent.com/pkgforge-security/domains/refs/heads/main/scripts/sync_trickest_hf.sh"
4949
merge-script: "https://raw.githubusercontent.com/pkgforge-security/domains/refs/heads/main/scripts/merge_trickest_hf.sh"
5050

51+
- runner: "ubuntu-latest"
52+
source: "nrd"
53+
dest: "ghcr-hf"
54+
script: "https://raw.githubusercontent.com/pkgforge-security/domains/refs/heads/main/scripts/sync_nrd_ghcr_hf.sh"
55+
merge-script: "N/A"
56+
5157
- runner: "ubuntu-latest"
5258
source: "sni-ip-ranges"
5359
dest: "ghcr"

scripts/merge_certstream_ghcr_hf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ pushd "${TMPDIR}" &>/dev/null
307307
echo -e "[+] Cleaning up & Merging ${HF_REPO_LOCAL}/DATA/certstream/all_latest.txt ==> ${HF_REPO_LOCAL}/DATA/certstream/latest.txt"
308308
sort --version-sort --unique "${HF_REPO_LOCAL}/DATA/certstream/all_latest.txt" --output "${HF_REPO_LOCAL}/DATA/certstream/all_latest.txt"
309309
du -sh "${HF_REPO_LOCAL}/DATA/certstream/all_latest.txt"
310-
cat "${HF_REPO_LOCAL}/DATA/certstream/all_latest.txt" | tr -s '[:space:]' '\n' > "${HF_REPO_LOCAL}/DATA/certstream/latest.txt"
310+
cat "${HF_REPO_LOCAL}/DATA/certstream/all_latest.txt" | sed '/^[[:space:]]*#/d' | tr -s '[:space:]' '\n' > "${HF_REPO_LOCAL}/DATA/certstream/latest.txt"
311311
echo -e "[+] Filtering ..."
312312
cleanup_domains "${HF_REPO_LOCAL}/DATA/certstream/latest.txt"
313313
sort --version-sort --unique "${HF_REPO_LOCAL}/DATA/certstream/latest.txt" --output "${HF_REPO_LOCAL}/DATA/certstream/latest.txt"
@@ -343,7 +343,7 @@ pushd "${TMPDIR}" &>/dev/null
343343
echo -e "[+] Cleaning up & Merging ${HF_REPO_LOCAL}/DATA/certstream/all_weekly.txt ==> ${HF_REPO_LOCAL}/DATA/certstream/weekly.txt"
344344
sort --version-sort --unique "${HF_REPO_LOCAL}/DATA/certstream/all_weekly.txt" --output "${HF_REPO_LOCAL}/DATA/certstream/all_weekly.txt"
345345
du -sh "${HF_REPO_LOCAL}/DATA/certstream/all_weekly.txt"
346-
cat "${HF_REPO_LOCAL}/DATA/certstream/all_weekly.txt" | tr -s '[:space:]' '\n' > "${HF_REPO_LOCAL}/DATA/certstream/weekly.txt"
346+
cat "${HF_REPO_LOCAL}/DATA/certstream/all_weekly.txt" | sed '/^[[:space:]]*#/d' | tr -s '[:space:]' '\n' > "${HF_REPO_LOCAL}/DATA/certstream/weekly.txt"
347347
echo -e "[+] Filtering ..."
348348
cleanup_domains "${HF_REPO_LOCAL}/DATA/certstream/weekly.txt"
349349
sort --version-sort --unique "${HF_REPO_LOCAL}/DATA/certstream/weekly.txt" --output "${HF_REPO_LOCAL}/DATA/certstream/weekly.txt"

scripts/merge_sni-ip-ranges_ghcr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pushd "${TMPDIR}" &>/dev/null
185185
if [[ -s "${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt" && $(stat -c%s "${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt") -gt 100000 ]]; then
186186
echo -e "[+] Cleaning up & Merging ${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt ==> ${ORAS_LOCAL}/DATA/sni-ip-ranges/domains.txt"
187187
sort --version-sort --unique "${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt" --output "${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt"
188-
cat "${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt" |\
188+
cat "${ORAS_LOCAL}/DATA/sni-ip-ranges/all.txt" | sed '/^[[:space:]]*#/d' |\
189189
awk -F '[[:space:]]*--[[:space:]]*\\[|\\]' '{print $2}' | tr -s '[:space:]' '\n' |\
190190
sed -E '/^[[:space:]]*$/d; s/^[[:space:]]*\*\.?[[:space:]]*//; s/[A-Z]/\L&/g' |\
191191
sed -E '/([0-9].*){40}/d; s/^[[:space:]]*//; s/[[:space:]]*$//; s/[${}%]//g' | sed 's/[()]//g' |\

scripts/merge_sni-ip-ranges_hf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pushd "${TMPDIR}" &>/dev/null
174174
if [[ -s "${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt" && $(stat -c%s "${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt") -gt 100000 ]]; then
175175
echo -e "[+] Cleaning up & Merging ${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt ==> ${HF_REPO_LOCAL}/DATA/sni-ip-ranges/domains.txt"
176176
sort --version-sort --unique "${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt" --output "${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt"
177-
cat "${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt" |\
177+
cat "${HF_REPO_LOCAL}/DATA/sni-ip-ranges/all.txt" | sed '/^[[:space:]]*#/d' |\
178178
awk -F '[[:space:]]*--[[:space:]]*\\[|\\]' '{print $2}' | tr -s '[:space:]' '\n' |\
179179
sed -E '/^[[:space:]]*$/d; s/^[[:space:]]*\*\.?[[:space:]]*//; s/[A-Z]/\L&/g' |\
180180
sed -E '/([0-9].*){40}/d; s/^[[:space:]]*//; s/[[:space:]]*$//; s/[${}%]//g' | sed 's/[()]//g' |\

0 commit comments

Comments
 (0)