-
-
Notifications
You must be signed in to change notification settings - Fork 2
2104 lines (1677 loc) · 114 KB
/
blocklist-generate.yml
File metadata and controls
2104 lines (1677 loc) · 114 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# #
# @usage https://github.com/ConfigServer-Software/service-blocklists
# @type github workflow
# @updated 09.28.25
# @usage generates a list of ipsets which can then be used within host files, config server firewall, and various other apps
#
#
# @secrets secrets.SELF_TOKEN self github personal access token (fine-grained)
# secrets.SELF_TOKEN_CL self github personal access token (classic)
# secrets.NPM_TOKEN self npmjs access token
# secrets.PYPI_API_TOKEN self Pypi API token (production site) - https://pypi.org/
# secrets.PYPI_API_TEST_TOKEN self Pypi API token (test site) - https://test.pypi.org/
# secrets.SELF_DOCKERHUB_TOKEN self Dockerhub token
# secrets.CODECOV_TOKEN codecov upload token for nodejs projects
# secrets.API_GEOLITE2_KEY maxmind API token
# secrets.CF_ACCOUNT_ID cloudflare account id
# secrets.CF_ACCOUNT_TOKEN cloudflare account token
# secrets.ARTIFACTS_DOMAIN github artifacts domain name
# secrets.ARTIFACTS_PORT github artifacts port
# secrets.ARTIFACTS_GITHUB_SSH_PRIVATE_KEY github artifacts server ssh private key
# secrets.ORG_TOKEN org github personal access token (fine-grained)
# secrets.ORG_TOKEN_CL org github personal access token (classic)
# secrets.ORG_DOCKERHUB_TOKEN org dockerhub secret
# secrets.ORG_GITEA_TOKEN org gitea personal access token (classic) with package:write permission
# secrets.BOT_GPG_KEY_ASC bot gpg private key (armored) | BEGIN PGP PRIVATE KEY BLOCK
# secrets.BOT_GPG_KEY_B64 bot gpg private key (binary) converted to base64
# secrets.BOT_GPG_PASSPHRASE bot gpg private key passphrase
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_RELEASES discord webhook to report release notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_WORKFLOWS discord webhook to report workflow notifications from github to discord
# secrets.DISCORD_WEBHOOK_CHAN_GITHUB_UPDATES discord webhook to report activity notifications from github to discord
#
# @local these workflows can be tested locally through the use of `act`
# https://github.com/nektos/act
# Extract act to folder
# Add system env var with path to act.exe
# Run the commands:
# git pull https://github.com/username/repo
# act -W .github/workflows/blocklist-generate.yml -P ubuntu-latest=catthehacker/ubuntu:full-22.04
# act -W .github/workflows/blocklist-generate.yml -s TOKEN_CL=XXXXXXXXXX --pull=false
#
# 📄 bl-master.sh generate master ipset | URLs: VARARG
# 📄 bl-plain.sh generate ipset from online plain-text url / page | URLs: VARARG
# 📄 bl-json.sh generate ipset from json formatted web url. requires url and jq query | URLs: SINGLE
# 📄 bl-htmlip.sh generate ipset by fetching HTML in web url, pulls only ips with grep rule (cant be changed) | URLs: SINGLE
# 📄 bl-html.sh generate ipset by fetching HTML in web url, does not run its own grep, must be specified in command | URLs: VARARG
# 📄 bl-block.sh generate ipset by fetching locally specified file in /blocks/ repo folder
# 📄 bl-format.sh generate ipset by from an existing list of IPs. does not generate ips itself. only validates a list provided
# 📄 bl-spf.sh generate ipset by fetching _spf ips from domain
#
# local test requires the same structure as the github workflow
# 📁 .github
# 📁 blocks
# 📁 bruteforce
# 📄 01.ipset
# 📁 privacy
# 📄 01.ipset
# 📁 scripts
# 📄 bl-master.sh
# 📄 bl-plain.sh
# 📄 bl-json.sh
# 📄 bl-htmlip.sh
# 📄 bl-html.sh
# 📄 bl-block.sh
# 📄 bl-format.sh
# 📄 bl-spf.sh
# 📁 workflows
# 📄 blocklist-generate.yml
# #
name: '🧱 Blocklist › Generate'
run-name: '🧱 Blocklist › Generate'
# #
# triggers
# #
on:
# #
# Trigger › Workflow Dispatch
# #
workflow_dispatch:
inputs:
RUN_MODE:
description: '🧭 Run Mode'
required: true
default: core_only
type: choice
options:
- core_only
- daily_only
# #
# Trigger › Cron Schedule
# #
schedule:
# - cron: '0 2,8,14,20 * * *'
- cron: '0 */4 * * *'
- cron: '15 1 * * *'
# #
# concurrency
# #
concurrency:
group: blocklist-generate-${{ github.ref }}
cancel-in-progress: false
# #
# environment variables
# #
env:
ASSIGN_USER: Aetherinox
BOT_NAME_1: BinaryServ
BOT_NAME_DEPENDABOT: dependabot[bot]
BOT_NAME_RENOVATE: renovate[bot]
GPG_KEY_BASE64: ${{ secrets.ADMINSERV_GPG_KEY_B64 }}
GPG_KEY_PASSPHRASE: ${{ secrets.ADMINSERV_GPG_PASSPHRASE }}
# #
# jobs
# #
jobs:
# #
# Job › Setup
# #
blocklist-setup:
name: >-
📦 Setup
runs-on: ubuntu-latest
# runs-on: apollo-x64
timeout-minutes: 120
steps:
# #
# Job › Checkout
# #
- name: >-
☑️ Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
# #
# Job › Job Information
# #
- name: >-
🔄 Load Job
uses: qoomon/actions--context@v5
id: 'context'
# #
# Job › Start
# #
- name: >-
✅ Start
run: |
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo " Starting Job ${{ steps.context.outputs.job_name }}"
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
YEAR="$(date +'%Y')"
echo "YEAR=${YEAR}" >> $GITHUB_ENV
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
echo "NOW=${NOW}" >> $GITHUB_ENV
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "SHA1=${SHA1}" >> $GITHUB_ENV
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 15.52.35 > 15
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2)" # 15.52.35 > 15.52
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
sudo apt -qq update
sudo apt -qq install tree
echo ""
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
echo " Runner .............. ${{ runner.name }}"
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
echo " Run Number .......... ${{ github.run_number }}"
echo " Ref ................. ${{ github.ref }}"
echo " Ref Name ............ ${{ github.ref_name }}"
echo " Event Name .......... ${{ github.event_name }}"
echo " Repo ................ ${{ github.repository }}"
echo " Repo Owner .......... ${{ github.repository_owner }}"
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo " Triggered By ........ ${{ github.actor }}"
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
echo " SHA 3 (env.SHA1) .... ${SHA1}"
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
echo " Workspace ........... ${{ github.workspace }}"
echo " PWD ................. ${PWD}"
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
echo " Year ................ ${YEAR}"
echo " Now ................. ${NOW}"
echo " Now (Short) ......... ${NOW_SHORT}"
echo " Now (Long) .......... ${NOW_LONG}"
echo " Now (Docker) ........ ${NOW_DOCKER}"
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
echo ""
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
tree -I node_modules -I .git -I ./
echo ""
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
# #
# Generate › Install Packages
# #
- name: "🧱 Install Packages"
run: |
sudo apt-get install -y ipcalc ed html2text whois uuid-runtime autoconf
# #
# Generate › Cache Packages
# #
- name: "🧱 Cache Packages"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ipcalc ed html2text whois uuid-runtime
version: 1.0
# #
# Job › Blocklist › Master
# #
blocklist-generate:
name: >-
📋 Generate › Blocklist
runs-on: ubuntu-latest
# runs-on: apollo-x64
timeout-minutes: 120
needs: [ blocklist-setup ]
outputs:
artifact-name: ${{ steps.generate_artifact_zip.outputs.artifact-name }}
artifact-path: ${{ steps.generate_artifact_zip.outputs.artifact-path }}
steps:
# #
# Generate › Checkout
# #
- name: >-
☑️ Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
# #
# Generate › Job Information
# #
- name: >-
🔄 Load Job
uses: qoomon/actions--context@v4
id: 'context'
# #
# Generate › Start
# #
- name: >-
✅ Start
run: |
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo " Starting Job ${{ steps.context.outputs.job_name }}"
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
YEAR="$(date +'%Y')"
echo "YEAR=${YEAR}" >> $GITHUB_ENV
NOW="$(date +'%m-%d-%Y %H:%M:%S')" # 02-25-2025 12:49:48
echo "NOW=${NOW}" >> $GITHUB_ENV
NOW_SHORT="$(date +'%m-%d-%Y')" # 02-25-2025
echo "NOW_SHORT=${NOW_SHORT}" >> $GITHUB_ENV
NOW_LONG="$(date +'%m-%d-%Y %H:%M')" # 02-25-2025 12:49
echo "NOW_LONG=${NOW_LONG}" >> $GITHUB_ENV
NOW_DOCKER="$(date +'%Y%m%d')" # 20250225
echo "NOW_DOCKER=${NOW_DOCKER}" >> $GITHUB_ENV
NOW_DOCKER_TS="$(date -u +'%FT%T.%3NZ')" # 2025-02-25T12:50:11.569Z
echo "NOW_DOCKER_TS=${NOW_DOCKER_TS}" >> $GITHUB_ENV
SHA1="$(git rev-parse HEAD)" # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "SHA1=${SHA1}" >> $GITHUB_ENV
SHA1_GH="$(echo ${GITHUB_SHA})" # 71fad013cfce9116ec62779e4a7e627fe4c33627
echo "SHA1_GH=${SHA1_GH}" >> $GITHUB_ENV
PKG_VER_1DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-1)" # 15.52.35 > 15
echo "PKG_VER_1DIGIT=${PKG_VER_1DIGIT}" >> $GITHUB_ENV
PKG_VER_2DIGIT="$(echo ${{ env.IMAGE_VERSION }} | cut -d '.' -f1-2)" # 15.52.35 > 15.52
echo "PKG_VER_2DIGIT=${PKG_VER_2DIGIT}" >> $GITHUB_ENV
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
sudo apt -qq update
sudo apt -qq install tree
echo ""
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
echo " Runner .............. ${{ runner.name }}"
echo " Workflow ............ ${{ github.workflow }} (#${{ github.workflow_ref }})"
echo " Run Number .......... ${{ github.run_number }}"
echo " Ref ................. ${{ github.ref }}"
echo " Ref Name ............ ${{ github.ref_name }}"
echo " Event Name .......... ${{ github.event_name }}"
echo " Repo ................ ${{ github.repository }}"
echo " Repo Owner .......... ${{ github.repository_owner }}"
echo " Run ID .............. https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo " Triggered By ........ ${{ github.actor }}"
echo " SHA 1 (GITHUB_SHA) .. ${GITHUB_SHA}"
echo " SHA 2 (github.sha) .. ${{ github.sha }}"
echo " SHA 3 (env.SHA1) .... ${SHA1}"
echo " SHA 4 (env.SHA1_GH) . ${SHA1_GH}"
echo " Workspace ........... ${{ github.workspace }}"
echo " PWD ................. ${PWD}"
echo " Job Name ............ ${{ steps.context.outputs.job_name }}"
echo " Job ID .............. ${{ steps.context.outputs.job_id }}"
echo " Job URL ............. ${{ steps.context.outputs.job_url }}"
echo " Run ID .............. ${{ steps.context.outputs.run_id }}"
echo " Run Attempt ......... ${{ steps.context.outputs.run_attempt }}"
echo " Run Number .......... ${{ steps.context.outputs.run_number }}"
echo " Run URL ............. ${{ steps.context.outputs.run_url }}"
echo " Run Env ............. ${{ steps.context.outputs.environment }}"
echo " Run Env URL ......... ${{ steps.context.outputs.environment_url }}"
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
echo " Run Deployment URL .. ${{ steps.context.outputs.deployment_url }}"
echo " Run Deployment ...... ${{ steps.context.outputs.deployment_id }}"
echo " Run Runner Name ..... ${{ steps.context.outputs.runner_name }}"
echo " Run Runner ID ....... ${{ steps.context.outputs.runner_id }}"
echo " Year ................ ${YEAR}"
echo " Now ................. ${NOW}"
echo " Now (Short) ......... ${NOW_SHORT}"
echo " Now (Long) .......... ${NOW_LONG}"
echo " Now (Docker) ........ ${NOW_DOCKER}"
echo " Now (Docker TS) ..... ${NOW_DOCKER_TS}"
echo ""
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
tree -I node_modules -I .git -I ./
echo ""
echo ""
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo ""
echo ""
# #
# Generate › Install Packages
# #
- name: "🧱 Install Packages"
run: |
sudo apt-get install -y ipcalc ed html2text whois uuid-runtime autoconf
# #
# Generate › Cache Packages
# #
- name: "🧱 Cache Packages"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ipcalc ed html2text whois uuid-runtime
version: 1.0
# #
# Generate › Check Day by building date key
# #
- name: 'Build day key'
id: task_blocklist_generate_date_key
shell: bash
run: |
echo "day=$(date -u +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
# #
# Generate › Resolve Run Mode
# #
- name: 'Resolve run mode'
id: task_blocklist_generate_run_mode
run: |
run_core="false"
run_daily="false"
force_daily="false"
if [ "${{ github.event_name }}" = "schedule" ]; then
if [ "${{ github.event.schedule }}" = "0 */4 * * *" ]; then
run_core="true"
elif [ "${{ github.event.schedule }}" = "15 1 * * *" ]; then
run_daily="true"
fi
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
if [ "${{ inputs.RUN_MODE }}" = "core_only" ]; then
run_core="true"
elif [ "${{ inputs.RUN_MODE }}" = "daily_only" ]; then
run_daily="true"
force_daily="true"
fi
fi
echo "run_core=${run_core}" >> "$GITHUB_OUTPUT"
echo "run_daily=${run_daily}" >> "$GITHUB_OUTPUT"
echo "force_daily=${force_daily}" >> "$GITHUB_OUTPUT"
# #
# Generate › Configure
#
# this step installs packages we need to manage ipsets.
# - iprange
# this package allows us to convert ip ranges into a CIDR formatted ip
# 10.10.0.1-10.10.0.9 => 10.10.0.1
# 10.10.0.2/31
# 10.10.0.4/30
# 10.10.0.8/31
# https://github.com/firehol/iprange
# #
- name: '⚙️ Configure'
id: task_blocklist_generate_configure
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run: |
git clone https://github.com/firehol/iprange.git ./.temp/iprange
cd .temp/iprange
./autogen.sh
./configure --disable-man
sudo make && make install
# #
# Release › Dockerhub › Install Dependencies
# #
- name: '📦 Install Dependencies'
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run:
sudo apt-get install -qq dos2unix
# #
# Release › Dockerhub › Execute dos2unix
# #
- name: '🔐 Apply dos2unix'
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run: |
echo "⚠️⚠️⚠️ Running DOS2UNIX ⚠️⚠️⚠️"
find .github/scripts -type f -name "*.sh" -print0 | xargs -0 dos2unix --
echo "✅✅✅ Completed DOS2UNIX ✅✅✅"
# #
# Generate › Set Template Permissions
# #
- name: "☑️ Set Permissions"
id: task_blocklist_generate_perms
run: |
echo "🔧 Setting executable permissions for scripts"
num_success=0
num_failure=0
for f in .github/scripts/*.sh; do
echo "Setting executable permission on ${f}"
chmod 755 "${f}"
if [ -x "${f}" ]; then
echo " ✅ ${f} is executable"
num_success=$((num_success + 1))
else
echo "::error file=${f},line=1,title=Permission Failed::Failed to set executable bit"
num_failure=$((num_failure + 1))
fi
echo ""
done
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――"
echo "✅ ${num_success} successfully verified"
echo "❌ ${num_failure} failed"
echo "―――――――――――――――――――――――――――――――――――――――――――――――――――――"
if [ "${num_failure}" -gt 0 ]; then
exit 1
fi
echo "🎉 All script permissions verified"
# #
# Generate › Set Env Variables
# #
- name: "📦 Set Env Variables"
id: task_commit_pre
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run: |
useragent="${{ vars.BL_GENERAL_USERAGENT }}"
echo "USERAGENT=$(echo $useragent)" >> $GITHUB_ENV
# #
# Generate › Master
# #
- name: "🧱 Generate › Main"
id: task_blocklist_generate_master
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run: |
# #
# Main › Master
# #
./.github/scripts/bl-master.sh blocklists/master.ipset ${{ secrets.API_01_FILE_01 }} ${{ secrets.API_01_FILE_02 }} ${{ secrets.API_01_FILE_03 }} ${{ secrets.API_01_FILE_04 }} ${{ secrets.API_01_FILE_05 }} ${{ secrets.API_01_FILE_06 }} ${{ secrets.API_01_FILE_07 }} ${{ secrets.API_01_FILE_08 }} ${{ secrets.API_01_FILE_09 }}
# #
# Main › Highrisk
# #
HIGHRISK_URL=$( CFG_STDOUT=true ./.github/scripts/bl-htmlip.sh _highrisk_null.ipset "${{ vars.BL_MAIN_HIGHRISK_L1 }}" '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' )
HIGHRISK_LOCAL=$( CFG_STDOUT=true ./.github/scripts/bl-block.sh blocklists/highrisk.ipset highrisk )
HIGHRISK_LIST=$( echo -e "${HIGHRISK_URL}\n${HIGHRISK_LOCAL}" | sort -u )
echo "$HIGHRISK_LIST" | ./.github/scripts/bl-format.sh blocklists/highrisk.ipset
# #
# Main › BOGON
# #
CFG_SKIP_CIDR_DEDUPE=true ./.github/scripts/bogon.sh blocklists/bogon.ipset
# #
# Main › IANA Reserved
# #
./.github/scripts/iprange.sh blocklists/iana.ipset "${{ vars.BL_IANA_URL }}"
# #
# Main › TOR Exit Nodes
#
# @ref https://check.torproject.org/exit-addresses
# curl -sSL "${{ vars.BL_TOR_EXITNODES }}" \
# | grep '^ExitAddress' \
# | awk '{print $2}' \
# https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=1.1.1.1
# #
curl -sSL "${{ vars.BL_TOR_EXITNODES_BARE }}" \
| sort -u \
| .github/scripts/bl-format.sh blocklists/tor_exitnodes.ipset
# #
# Generate › Threats
# #
- name: "🧱 Generate › Threats"
id: task_blocklist_generate_threats
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run: |
# #
# Threats › C&C Bots
#
# @ref https://www.dshield.org/feeds_doc.html
# #
# #
# Generate › 3rd Party
# #
- name: "🧱 Generate › 3rd Party"
id: task_blocklist_generate_3rdparty
if: steps.task_blocklist_generate_run_mode.outputs.run_core == 'true'
run: |
# #
# 3rd Party › Alienvault
# #
curl -sSL "${{ vars.BL_3PARTY_ALIENVAULT_REPUTATION }}" \
| cut -d'#' -f1 \
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' \
| .github/scripts/bl-format.sh blocklists/3rdparty/alienvault/bad_reputation.ipset
# #
# 3rd Party › BBcan177
# #
curl -sSL "${{ vars.BL_3PARTY_BBCAN177_MS1 }}" \
| CFG_INCLUDE_COMMENTS=true .github/scripts/bl-format.sh blocklists/3rdparty/bbcan177/ms1.ipset
curl -sSL "${{ vars.BL_3PARTY_BBCAN177_MS3 }}" \
| CFG_INCLUDE_COMMENTS=true .github/scripts/bl-format.sh blocklists/3rdparty/bbcan177/ms3.ipset
# #
# 3rd Party › Binary Defense
# #
curl -sSL "${{ vars.BL_3PARTY_BINARYDEFENSE_L1 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/binarydefense/blocklist.ipset
# #
# 3rd Party › Bitwire-IT
#
# @ref https://github.com/bitwire-it/ipblocklist
# #
curl -sSL "${{ vars.BL_3PARTY_BITWIRE_INBOUND }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/bitwire/inbound.ipset
curl -sSL "${{ vars.BL_3PARTY_BITWIRE_OUTBOUND }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/bitwire/outbound.ipset
# #
# 3rd Party › Blacklist Monster
#
# @ref https://blackhole.monster/
# #
curl -sSL "${{ vars.BL_3PARTY_BLACKLIST_MONSTER_TODAY }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/blackhole.monster/blacklist_today.ipset
curl -sSL "${{ vars.BL_3PARTY_BLACKLIST_MONSTER_15D }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/blackhole.monster/blacklist_15d.ipset
curl -sSL "${{ vars.BL_3PARTY_BLACKLIST_MONSTER_30D }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/blackhole.monster/blacklist_30D.ipset
curl -sSL "${{ vars.BL_3PARTY_BLACKLIST_MONSTER_ALL}}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/blackhole.monster/blacklist_all.ipset
# #
# 3rd Party › Blocklist.de
# #
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_ALL }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/all.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_SSH }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_ssh.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_MAIL }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_mail.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_APACHE }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_apache.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_IMAP }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_imap.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_FTP }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_ftp.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_SIP }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_sip.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_BOTS }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_bots.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_LONGTERM }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_longterm.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_IRC }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_ircbot.ipset
curl -sSL "${{ vars.BL_3PARTY_BLOCKLISTDE_BRUTEFORCE }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/blocklist.de/attacks_bruteforce.ipset
# #
# 3rd Party › Botvrij
# #
curl -sSL "${{ vars.BL_3PARTY_BOTVRIJ_L1 }}" \
| CFG_INCLUDE_COMMENTS=true .github/scripts/bl-format.sh blocklists/3rdparty/botvrij/threats_ioc.ipset
# #
# 3rd Party › BruteForceBlocker (Daniel Gerzo)
#
# @ref https://danger.rulez.sk/index.php/bruteforceblocker/faq/
# #
curl -sSL "${{ vars.BL_3PARTY_BRUTEFORCEBLOCKER_L1 }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/bruteforceblocker/blocklist.ipset
# #
# 3rd Party › CINS Army (Collective Intelligence Network Security)
#
# @ref https://cinsscore.com/list/ci-badguys.txt
# #
curl -sSL "${{ vars.BL_3PARTY_CINSSCORE_BADGUYS }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/cinsscore/badguys.ipset
# #
# 3rd Party › DShield
#
# @ref https://www.dshield.org/feeds_doc.html
# #
curl -sSL "${{ vars.BL_3PARTY_DSHIELD_BLOCK }}" \
| grep -v '^#' \
| awk '$4 >= 50 {print $1 "/" $3}' \
| sort -u \
| .github/scripts/bl-format.sh blocklists/3rdparty/dshield/blocklist.ipset
# #
# 3rd Party › Emerging Threats
#
# @ref https://rules.emergingthreats.net/blockrules/compromised-ips.txt
# #
curl -sSL "${{ vars.BL_3PARTY_EMERGINGTHREATS_COMPROMISED }}" \
| grep -v '^#' \
| .github/scripts/bl-format.sh blocklists/3rdparty/emergingthreats/compromised.ipset
# #
# 3rd Party › Feodo Tracker › Botnet Command and Control (C2 or C&C)
#
# Dridex, Heodo (aka Emotet), TrickBot, QakBot (aka QuakBot / Qbot) and
# BazarLoader (aka BazarBackdoor) botnet command&control servers (C2s).
#
# blocklist_c2_recommended C&C IP addresses (avoid false positives)
# Only contains active botnet C&C servers or active in past hours.
# blocklist_ioc_normal Indicators Of Compromise (IOCs)
# Datasets contain additional info on tracked botnet C2s;
# also IP addresses acting as botnet C2 within last 30 days.
# blocklist_ioc_aggressive Comprehensive list of all botnet C2s Feodo Tracker has.
# IP addresses are re-used/recycled; false positive are much higher.
#
# @ref https://feodotracker.abuse.ch/blocklist/
# #
curl -sSL "${{ vars.BL_3PARTY_FEODOTRACKER_RECOMMENDED }}" \
| grep -v '^#' \
| .github/scripts/bl-format.sh blocklists/3rdparty/feodotracker/blocklist_c2_recommended.ipset
curl -sSL "${{ vars.BL_3PARTY_FEODOTRACKER_IOC_NORMAL }}" \
| grep -v '^#' \
| .github/scripts/bl-format.sh blocklists/3rdparty/feodotracker/blocklist_ioc_normal.ipset
curl -sSL "${{ vars.BL_3PARTY_FEODOTRACKER_IOC_AGGRESSIVE }}" \
| grep -v '^#' \
| .github/scripts/bl-format.sh blocklists/3rdparty/feodotracker/blocklist_ioc_aggressive.ipset
# #
# 3rd Party › Firehol
# #
curl -sSL "https://iplists.firehol.org/files/firehol_abusers_1d.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/abusers_1d.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_abusers_30d.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/abusers_30d.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_anonymous.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/anonymous.ipset
curl -sSL "https://iplists.firehol.org/files/bitcoin_nodes.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/bitcoin_nodes.ipset
curl -sSL "https://iplists.firehol.org/files/bitcoin_nodes_1d.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/bitcoin_nodes_1d.ipset
curl -sSL "https://iplists.firehol.org/files/bitcoin_nodes_7d.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/bitcoin_nodes_7d.ipset
curl -sSL "https://iplists.firehol.org/files/bitcoin_nodes_30d.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/bitcoin_nodes_30d.ipset
curl -sSL "https://iplists.firehol.org/files/botscout.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/botscout.ipset
curl -sSL "https://iplists.firehol.org/files/botscout_1d.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/botscout_1d.ipset
curl -sSL "https://iplists.firehol.org/files/botscout_7d.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/botscout_7d.ipset
curl -sSL "https://iplists.firehol.org/files/botscout_30d.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/botscout_30d.ipset
curl -sSL "https://iplists.firehol.org/files/cybercrime.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/cybercrime.ipset
curl -sSL "https://iplists.firehol.org/files/dshield.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/dshield.ipset
curl -sSL "https://iplists.firehol.org/files/dshield_1d.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/dshield_1d.ipset
curl -sSL "https://iplists.firehol.org/files/dshield_7d.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/dshield_7d.ipset
curl -sSL "https://iplists.firehol.org/files/dshield_30d.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/dshield_30d.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_level1.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/level1.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_level2.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/level2.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_level3.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/level3.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_level4.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/level4.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_proxies.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/proxies.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_webclient.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/webclient.ipset
curl -sSL "https://iplists.firehol.org/files/firehol_webserver.netset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/webservert.ipset
curl -sSL "https://iplists.firehol.org/files/greensnow.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/greensnow.ipset
curl -sSL "https://iplists.firehol.org/files/sblam.ipset" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/firehol/sblam.ipset
# #
# 3rd Party › GreenSnow
# #
curl -sSL "${{ vars.BL_3PARTY_GREENSNOW }}" \
| .github/scripts/bl-format.sh blocklists/3rdparty/greensnow/blocklist.ipset
# #
# 3rd Party › Hagezi
# #
curl -sSL "${{ vars.BL_3PARTY_HAGEZI_L1 }}" \
| cut -d'#' -f1 \
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' \
| .github/scripts/bl-format.sh blocklists/3rdparty/hagezi/threat_intelligence.ipset
# #
# 3rd Party › IPSum
# #
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L1 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level1.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L2 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level2.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L3 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level3.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L4 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level4.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L5 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level5.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L6 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level6.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L7 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level7.ipset
curl -sSL "${{ vars.BL_3PARTY_IPSUM_L8 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/ipsum/level8.ipset
# #
# 3rd Party › LinuxTracker
# #
curl -sSL "${{ vars.BL_3PARTY_LINUXTRACKER_L1 }}" \
| CFG_SKIP_BOGON_FILTER=true CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/linuxtracker/blocklist.ipset
# #
# 3rd Party › Mikrotik › Core
#
# Url https://github.com/multiduplikator/mikrotik_blocklist
# Entries ~20k
# Update Every 3 hours
# Sources Core threat feeds
# Tor Exit Nodes Tor exit node IPs https://github.com/SecOps-Institute/Tor-IP-Addresses
# Spamhaus DROP "Don't Route Or Peer" list https://www.spamhaus.org/drop/
# SSL Blacklist Botnet C&C servers https://sslbl.abuse.ch/
# Blocklist.de Fail2ban reported IPs https://lists.blocklist.de/
# Feodo Tracker Banking trojan C&C servers https://feodotracker.abuse.ch/
# FireHOL Level 1 Aggregated threat intelligence https://github.com/stamparm/ipsum
# #
curl -sSL "${{ vars.BL_3PARTY_MULTIDUPLIKATOR_CORE }}" \
| CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/multiduplikator/blocklist_core.ipset
# #
# 3rd Party › Mikrotik › Large
#
# Url https://github.com/multiduplikator/mikrotik_blocklist
# Entries ~25k
# Update Every 3 hours
# Sources Core + CINS Army
# Tor Exit Nodes Tor exit node IPs https://github.com/SecOps-Institute/Tor-IP-Addresses
# Spamhaus DROP "Don't Route Or Peer" list https://www.spamhaus.org/drop/
# SSL Blacklist Botnet C&C servers https://sslbl.abuse.ch/
# Blocklist.de Fail2ban reported IPs https://lists.blocklist.de/
# Feodo Tracker Banking trojan C&C servers https://feodotracker.abuse.ch/
# FireHOL Level 1 Aggregated threat intelligence https://github.com/stamparm/ipsum
# CINS Army Collective Intelligence Network Security https://cinsscore.com/
# #
curl -sSL "${{ vars.BL_3PARTY_MULTIDUPLIKATOR_LARGE }}" \
| CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/multiduplikator/blocklist_large.ipset
# #
# 3rd Party › Mikrotik › Extra Large
#
# Url https://github.com/multiduplikator/mikrotik_blocklist
# Entries ~68k
# Update Every 3 hours
# Sources Core + CINS Army + IPsum L1
# Tor Exit Nodes Tor exit node IPs https://github.com/SecOps-Institute/Tor-IP-Addresses
# Spamhaus DROP "Don't Route Or Peer" list https://www.spamhaus.org/drop/
# SSL Blacklist Botnet C&C servers https://sslbl.abuse.ch/
# Blocklist.de Fail2ban reported IPs https://lists.blocklist.de/
# Feodo Tracker Banking trojan C&C servers https://feodotracker.abuse.ch/
# FireHOL Level 1 Aggregated threat intelligence https://github.com/stamparm/ipsum
# CINS Army Collective Intelligence Network Security https://cinsscore.com/
# IPsum Level 1 Broader threat IPs (1+ hits) https://github.com/stamparm/ipsum
# #
curl -sSL "${{ vars.BL_3PARTY_MULTIDUPLIKATOR_EXLARGE }}" \
| CFG_TRUSTED_INPUT=true .github/scripts/bl-format.sh blocklists/3rdparty/multiduplikator/blocklist_extralarge.ipset
# #
# 3rd Party › Myip.ms › Full Database
# #
tmp_zip="$(mktemp)"
curl -sSL "${{ vars.BL_3PARTY_MYIPMS_FULL }}" -o "${tmp_zip}"
zip_entry="$(unzip -Z1 "${tmp_zip}" | grep -m1 -E '(^|/)full_blacklist_database\.txt$')"