Compare commits
73 Commits
efbcec4c5e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 880da3b79d | |||
| 61e7560952 | |||
| 56ac33b666 | |||
| d2838646b3 | |||
| 8c61f4a51c | |||
|
|
75cb35b954 | ||
|
|
f572e9f10e | ||
|
|
6fde3dd9be | ||
|
|
a3842d9dc7 | ||
|
|
f82a8f5f39 | ||
|
|
daa6a5f9d5 | ||
|
|
29598232b4 | ||
|
|
01c11c986d | ||
|
|
af47dc5233 | ||
|
|
6aed390cf7 | ||
|
|
bc781217e2 | ||
|
|
9724ffdf9c | ||
|
|
cec5575ff2 | ||
|
|
b977ddb47a | ||
| 82668dba46 | |||
|
|
17423793f1 | ||
|
|
6beadaba5f | ||
|
|
8a5375c5c8 | ||
|
|
c265a83300 | ||
|
|
02d5484903 | ||
|
|
5a7a22bfe7 | ||
|
|
7ac5a1e420 | ||
|
|
33c63463cb | ||
|
|
a117ddd1e3 | ||
|
|
83acfacc89 | ||
|
|
d55ed33c9b | ||
|
|
317048dd59 | ||
|
|
5e9a80be07 | ||
|
|
74bae2d70d | ||
|
|
2d1bb18d6b | ||
|
|
6c7f0f7dc6 | ||
|
|
032c82c37a | ||
|
|
bd3a1ea817 | ||
|
|
e9f9c5e90d | ||
|
|
6718fb0cd0 | ||
|
|
b9ede7b9a4 | ||
|
|
a56cf99c17 | ||
|
|
04c4f4f878 | ||
|
|
a95eec3ff9 | ||
|
|
d7c4812310 | ||
|
|
d6d288da33 | ||
|
|
ad03f87096 | ||
|
|
90b24875cf | ||
|
|
099f6f3b43 | ||
|
|
fdf5bf8cc8 | ||
|
|
dab7ab6974 | ||
|
|
82bc1d5910 | ||
|
|
b6c0bcabdf | ||
| 6bf0b209f2 | |||
|
|
ff6b92703f | ||
|
|
b038e81de5 | ||
|
|
f3a28cb10f | ||
|
|
32052f5cd5 | ||
|
|
19d7cd3d58 | ||
|
|
a97da67111 | ||
|
|
4dcc7cc640 | ||
|
|
a945c3c78b | ||
| f8068692c5 | |||
| ce982202ab | |||
|
|
1026bd59d4 | ||
|
|
62562b6060 | ||
|
|
0d5db658ef | ||
|
|
291e0a4949 | ||
|
|
44b3effa06 | ||
|
|
03e2b93f56 | ||
|
|
da84488316 | ||
|
|
1b77676bdf | ||
|
|
358dea9b9d |
56
.gitea/workflows/builddockerImage.yaml
Normal file
56
.gitea/workflows/builddockerImage.yaml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
|
# They are provided by a third-party and are governed by
|
||||||
|
# separate terms of service, privacy policy, and support
|
||||||
|
# documentation.
|
||||||
|
|
||||||
|
# GitHub recommends pinning actions to a commit SHA.
|
||||||
|
# To get a newer version, you will need to update the SHA.
|
||||||
|
# You can also reference a tag or branch, but the action may change without warning.
|
||||||
|
|
||||||
|
name: Publish Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
push_to_registry:
|
||||||
|
name: Push Docker image to Docker Hub
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
|
with:
|
||||||
|
images: homelab/debianrepochecker
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
id: push
|
||||||
|
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./../../docker/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
- name: Generate artifact attestation
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-name: index.docker.io/my-docker-hub-namespace/my-docker-hub-repository
|
||||||
|
subject-digest: ${{ steps.push.outputs.digest }}
|
||||||
|
push-to-registry: true
|
||||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
venv
|
||||||
|
# docker
|
||||||
362
MirrorListV4
Normal file
362
MirrorListV4
Normal file
@@ -0,0 +1,362 @@
|
|||||||
|
213.129.232.18/32
|
||||||
|
82.209.230.71/32
|
||||||
|
213.129.232.18/32
|
||||||
|
144.208.213.156/32
|
||||||
|
83.164.133.195/32
|
||||||
|
89.106.208.14/32
|
||||||
|
213.129.232.18/32
|
||||||
|
129.27.3.13/32
|
||||||
|
46.102.157.26/32
|
||||||
|
195.234.45.114/32
|
||||||
|
195.234.45.114/32
|
||||||
|
193.138.101.179/32
|
||||||
|
193.190.198.27/32
|
||||||
|
195.234.45.114/32
|
||||||
|
185.111.204.146/32
|
||||||
|
200.236.31.3/32
|
||||||
|
200.236.31.3/32
|
||||||
|
200.236.31.3/32
|
||||||
|
200.237.203.89/32
|
||||||
|
170.233.231.184/32
|
||||||
|
143.106.7.135/32
|
||||||
|
143.208.160.8/32
|
||||||
|
200.133.233.210/32
|
||||||
|
62.44.96.11/32
|
||||||
|
62.44.96.11/32
|
||||||
|
212.50.0.19/32
|
||||||
|
195.85.215.251/32
|
||||||
|
185.117.82.66/32
|
||||||
|
84.43.191.5/32
|
||||||
|
217.79.83.126/32
|
||||||
|
62.44.96.11/32
|
||||||
|
87.121.121.4/32
|
||||||
|
78.128.80.70/32
|
||||||
|
78.128.80.69/32
|
||||||
|
207.210.46.249/32
|
||||||
|
207.210.46.249/32
|
||||||
|
199.188.220.121/32
|
||||||
|
207.210.46.249/32
|
||||||
|
129.97.134.71/32
|
||||||
|
208.89.84.55/32
|
||||||
|
99.199.64.121/32
|
||||||
|
137.82.116.21/32
|
||||||
|
138.204.231.181/32
|
||||||
|
45.125.0.6/32
|
||||||
|
138.204.231.181/32
|
||||||
|
190.93.84.7/32
|
||||||
|
190.97.169.220/32
|
||||||
|
138.186.10.35/32
|
||||||
|
138.204.231.181/32
|
||||||
|
146.83.205.200/32
|
||||||
|
161.53.160.11/32
|
||||||
|
161.53.160.11/32
|
||||||
|
161.53.160.11/32
|
||||||
|
213.191.133.160/32
|
||||||
|
78.128.211.127/32
|
||||||
|
78.128.211.127/32
|
||||||
|
81.91.81.11/32
|
||||||
|
95.168.211.41/32
|
||||||
|
147.32.160.17/32
|
||||||
|
78.128.211.127/32
|
||||||
|
147.32.127.196/32
|
||||||
|
147.228.57.10/32
|
||||||
|
147.229.176.19/32
|
||||||
|
89.102.0.150/32
|
||||||
|
195.113.250.60/32
|
||||||
|
217.31.202.63/32
|
||||||
|
194.71.11.163/32
|
||||||
|
194.71.11.165/32
|
||||||
|
194.71.11.163/32
|
||||||
|
194.71.11.165/32
|
||||||
|
46.30.211.12/32
|
||||||
|
130.225.254.116/32
|
||||||
|
77.247.64.34/32
|
||||||
|
194.71.11.163/32
|
||||||
|
194.71.11.165/32
|
||||||
|
194.71.11.163/32
|
||||||
|
194.71.11.165/32
|
||||||
|
195.140.195.56/32
|
||||||
|
193.166.3.3/32
|
||||||
|
212.27.32.66/32
|
||||||
|
212.27.32.66/32
|
||||||
|
46.105.185.24/32
|
||||||
|
213.32.5.7/32
|
||||||
|
145.238.186.56/32
|
||||||
|
193.48.57.38/32
|
||||||
|
212.27.32.66/32
|
||||||
|
193.55.175.161/32
|
||||||
|
149.62.156.14/32
|
||||||
|
82.67.51.130/32
|
||||||
|
147.94.19.20/32
|
||||||
|
132.227.74.17/32
|
||||||
|
77.95.64.41/32
|
||||||
|
194.167.156.234/32
|
||||||
|
193.49.184.24/32
|
||||||
|
130.79.200.5/32
|
||||||
|
194.214.218.193/32
|
||||||
|
80.93.84.15/32
|
||||||
|
80.67.163.159/32
|
||||||
|
194.254.245.145/32
|
||||||
|
136.243.89.31/32
|
||||||
|
62.138.222.4/32
|
||||||
|
129.102.1.37/32
|
||||||
|
137.226.34.46/32
|
||||||
|
141.76.2.4/32
|
||||||
|
45.125.0.6/32
|
||||||
|
137.226.34.46/32
|
||||||
|
141.76.2.4/32
|
||||||
|
193.175.72.15/32
|
||||||
|
141.76.2.4/32
|
||||||
|
85.25.128.62/32
|
||||||
|
62.201.161.86/32
|
||||||
|
129.187.10.100/32
|
||||||
|
194.8.197.22/32
|
||||||
|
134.169.192.5/32
|
||||||
|
91.199.118.172/32
|
||||||
|
147.142.19.60/32
|
||||||
|
131.188.12.211/32
|
||||||
|
134.76.12.6/32
|
||||||
|
137.226.34.46/32
|
||||||
|
80.237.136.138/32
|
||||||
|
129.143.116.10/32
|
||||||
|
212.201.68.61/32
|
||||||
|
212.201.68.60/32
|
||||||
|
134.109.228.1/32
|
||||||
|
139.174.32.6/32
|
||||||
|
132.180.8.60/32
|
||||||
|
130.75.2.22/32
|
||||||
|
131.246.123.4/32
|
||||||
|
134.93.178.166/32
|
||||||
|
129.69.0.41/32
|
||||||
|
129.69.0.42/32
|
||||||
|
217.243.224.144/32
|
||||||
|
212.83.32.30/32
|
||||||
|
5.1.73.59/32
|
||||||
|
37.58.58.140/32
|
||||||
|
185.3.234.216/32
|
||||||
|
217.72.206.21/32
|
||||||
|
139.20.16.130/32
|
||||||
|
194.29.226.88/32
|
||||||
|
185.41.106.155/32
|
||||||
|
82.98.66.230/32
|
||||||
|
62.133.35.14/32
|
||||||
|
213.202.193.253/32
|
||||||
|
213.209.102.29/32
|
||||||
|
194.95.104.50/32
|
||||||
|
109.69.69.17/32
|
||||||
|
78.129.164.123/32
|
||||||
|
78.129.164.123/32
|
||||||
|
185.165.170.20/32
|
||||||
|
85.94.199.210/32
|
||||||
|
153.127.75.11/32
|
||||||
|
203.178.137.175/32
|
||||||
|
210.117.237.2/32
|
||||||
|
85.94.199.210/32
|
||||||
|
109.73.80.190/32
|
||||||
|
|
||||||
|
151.0.128.28/32
|
||||||
|
193.206.214.15/32
|
||||||
|
85.94.199.210/32
|
||||||
|
130.251.19.2/32
|
||||||
|
140.105.48.55/32
|
||||||
|
158.129.159.169/32
|
||||||
|
158.129.159.169/32
|
||||||
|
158.129.159.169/32
|
||||||
|
83.171.27.40/32
|
||||||
|
91.211.244.15/32
|
||||||
|
178.17.160.48/32
|
||||||
|
178.17.160.48/32
|
||||||
|
178.17.160.48/32
|
||||||
|
130.89.149.21/32
|
||||||
|
103.2.187.5/32
|
||||||
|
103.2.187.6/32
|
||||||
|
163.7.134.112/32
|
||||||
|
130.89.149.21/32
|
||||||
|
130.89.149.21/32
|
||||||
|
23.151.136.174/32
|
||||||
|
185.244.24.35/32
|
||||||
|
83.137.149.3/32
|
||||||
|
109.200.196.213/32
|
||||||
|
85.159.239.121/32
|
||||||
|
50.118.225.16/32
|
||||||
|
185.229.191.144/32
|
||||||
|
5.79.108.33/32
|
||||||
|
185.15.209.238/32
|
||||||
|
45.84.31.11/32
|
||||||
|
78.142.193.130/32
|
||||||
|
45.88.5.78/32
|
||||||
|
185.183.113.131/32
|
||||||
|
185.246.188.7/32
|
||||||
|
194.127.172.131/32
|
||||||
|
129.240.118.47/32
|
||||||
|
129.240.118.47/32
|
||||||
|
129.240.118.47/32
|
||||||
|
153.19.251.221/32
|
||||||
|
153.19.251.221/32
|
||||||
|
149.156.96.11/32
|
||||||
|
193.219.28.2/32
|
||||||
|
150.254.173.17/32
|
||||||
|
153.19.251.222/32
|
||||||
|
193.136.216.34/32
|
||||||
|
85.143.112.112/32
|
||||||
|
193.136.216.34/32
|
||||||
|
193.136.216.34/32
|
||||||
|
193.137.214.36/32
|
||||||
|
193.136.164.6/32
|
||||||
|
23.147.168.189/32
|
||||||
|
195.80.174.186/32
|
||||||
|
195.80.174.186/32
|
||||||
|
91.221.4.48/32
|
||||||
|
88.212.10.12/32
|
||||||
|
195.80.174.186/32
|
||||||
|
213.129.232.18/32
|
||||||
|
213.129.232.18/32
|
||||||
|
130.89.148.12/32
|
||||||
|
130.89.148.12/32
|
||||||
|
80.64.47.13/32
|
||||||
|
193.145.15.20/32
|
||||||
|
95.20.11.14/32
|
||||||
|
193.146.32.81/32
|
||||||
|
147.83.91.172/32
|
||||||
|
150.214.5.134/32
|
||||||
|
193.144.61.75/32
|
||||||
|
91.132.103.246/32
|
||||||
|
193.146.75.19/32
|
||||||
|
155.210.4.97/32
|
||||||
|
82.194.78.250/32
|
||||||
|
194.71.11.165/32
|
||||||
|
194.71.11.163/32
|
||||||
|
194.71.11.165/32
|
||||||
|
194.71.11.163/32
|
||||||
|
130.235.34.30/32
|
||||||
|
193.11.30.180/32
|
||||||
|
194.71.11.165/32
|
||||||
|
194.71.11.163/32
|
||||||
|
194.132.225.213/32
|
||||||
|
94.103.202.216/32
|
||||||
|
109.74.12.226/32
|
||||||
|
129.132.53.171/32
|
||||||
|
140.110.240.80/32
|
||||||
|
193.140.98.183/32
|
||||||
|
129.132.53.171/32
|
||||||
|
129.132.53.171/32
|
||||||
|
188.184.105.5/32
|
||||||
|
188.185.29.10/32
|
||||||
|
188.184.90.134/32
|
||||||
|
188.185.8.192/32
|
||||||
|
188.184.79.248/32
|
||||||
|
188.184.23.33/32
|
||||||
|
188.184.104.250/32
|
||||||
|
188.184.91.52/32
|
||||||
|
188.185.25.162/32
|
||||||
|
188.184.111.122/32
|
||||||
|
188.185.65.208/32
|
||||||
|
83.166.143.42/32
|
||||||
|
83.166.143.43/32
|
||||||
|
109.202.202.202/32
|
||||||
|
212.25.8.232/32
|
||||||
|
185.73.240.250/32
|
||||||
|
89.145.166.16/32
|
||||||
|
78.129.164.123/32
|
||||||
|
78.129.164.123/32
|
||||||
|
83.170.94.3/32
|
||||||
|
78.158.65.70/32
|
||||||
|
78.129.164.123/32
|
||||||
|
90.207.225.196/32
|
||||||
|
94.229.65.150/32
|
||||||
|
213.230.211.73/32
|
||||||
|
46.235.229.21/32
|
||||||
|
93.93.131.18/32
|
||||||
|
163.1.221.67/32
|
||||||
|
163.1.160.163/32
|
||||||
|
80.87.134.17/32
|
||||||
|
85.13.241.50/32
|
||||||
|
212.219.56.184/32
|
||||||
|
81.179.123.56/32
|
||||||
|
185.28.240.10/32
|
||||||
|
5.180.211.190/32
|
||||||
|
64.50.236.52/32
|
||||||
|
64.50.233.100/32
|
||||||
|
208.80.154.139/32
|
||||||
|
208.80.154.139/32
|
||||||
|
64.50.233.100/32
|
||||||
|
64.50.236.52/32
|
||||||
|
92.119.16.152/32
|
||||||
|
172.179.119.208/32
|
||||||
|
128.180.2.105/32
|
||||||
|
128.30.3.141/32
|
||||||
|
128.226.118.13/32
|
||||||
|
128.226.118.12/32
|
||||||
|
128.226.118.15/32
|
||||||
|
128.226.118.14/32
|
||||||
|
108.61.5.92/32
|
||||||
|
64.50.236.52/32
|
||||||
|
140.211.166.134/32
|
||||||
|
64.50.233.100/32
|
||||||
|
128.135.10.29/32
|
||||||
|
77.247.126.176/32
|
||||||
|
108.86.224.23/32
|
||||||
|
15.204.41.243/32
|
||||||
|
204.157.3.70/32
|
||||||
|
161.129.154.250/32
|
||||||
|
184.105.240.111/32
|
||||||
|
76.252.192.212/32
|
||||||
|
216.127.35.166/32
|
||||||
|
148.137.11.75/32
|
||||||
|
192.158.27.72/32
|
||||||
|
206.82.17.213/32
|
||||||
|
141.219.180.70/32
|
||||||
|
104.189.183.57/32
|
||||||
|
162.255.118.133/32
|
||||||
|
169.229.200.70/32
|
||||||
|
208.100.4.53/32
|
||||||
|
69.166.55.80/32
|
||||||
|
208.80.154.139/32
|
||||||
|
142.147.88.7/32
|
||||||
|
23.145.168.14/32
|
||||||
|
207.244.94.80/32
|
||||||
|
185.142.32.136/32
|
||||||
|
74.208.240.17/32
|
||||||
|
94.154.159.241/32
|
||||||
|
128.211.151.252/32
|
||||||
|
138.247.115.248/32
|
||||||
|
168.100.147.101/32
|
||||||
|
200.14.116.3/32
|
||||||
|
190.105.216.42/32
|
||||||
|
45.162.204.37/32
|
||||||
|
185.37.252.138/32
|
||||||
|
212.205.74.89/32
|
||||||
|
152.66.115.246/32
|
||||||
|
45.67.159.244/32
|
||||||
|
89.111.47.130/32
|
||||||
|
91.220.43.19/32
|
||||||
|
185.242.104.18/32
|
||||||
|
132.248.59.73/32
|
||||||
|
37.251.174.43/32
|
||||||
|
81.196.9.142/32
|
||||||
|
89.213.174.152/32
|
||||||
|
91.188.226.250/32
|
||||||
|
188.241.222.52/32
|
||||||
|
5.154.224.26/32
|
||||||
|
5.83.47.15/32
|
||||||
|
176.124.104.176/32
|
||||||
|
185.100.87.86/32
|
||||||
|
164.73.233.2/32
|
||||||
|
151.101.194.132/32
|
||||||
|
151.101.130.132/32
|
||||||
|
151.101.2.132/32
|
||||||
|
151.101.66.132/32
|
||||||
|
3.164.240.105/32
|
||||||
|
3.164.240.119/32
|
||||||
|
3.164.240.73/32
|
||||||
|
3.164.240.123/32
|
||||||
|
45.84.67.184/32
|
||||||
|
45.84.67.184/32
|
||||||
|
185.199.110.153/32
|
||||||
|
185.199.108.153/32
|
||||||
|
185.199.111.153/32
|
||||||
|
185.199.109.153/32
|
||||||
|
185.199.110.153/32
|
||||||
|
185.199.111.153/32
|
||||||
|
185.199.109.153/32
|
||||||
|
185.199.108.153/32
|
||||||
286
MirrorListV6
Normal file
286
MirrorListV6
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
2001:858:2:1::10/128
|
||||||
|
2a02:2208:0:2b:ffff::71/128
|
||||||
|
2001:858:2:1::10/128
|
||||||
|
2a00:11c0:48:b:144:208:213:156/128
|
||||||
|
2a00:1860:1:2::deb/128
|
||||||
|
2a02:3e0::14/128
|
||||||
|
2001:858:2:1::10/128
|
||||||
|
2a0d:f302:99:0:e207:1bff:fe6a:e7b1/128
|
||||||
|
2a05:7300:0:100:195:234:45:114/128
|
||||||
|
2a05:7300:0:100:195:234:45:114/128
|
||||||
|
2001:6a8:3c80::27/128
|
||||||
|
2a05:7300:0:100:195:234:45:114/128
|
||||||
|
2a04:6480:101::146/128
|
||||||
|
2801:82:80ff:8000::4/128
|
||||||
|
2801:82:80ff:8000::4/128
|
||||||
|
2801:82:80ff:8000::4/128
|
||||||
|
2801:80:a88:4088::1/128
|
||||||
|
2804:2c24:deb::1111/128
|
||||||
|
2801:8a:40c0:7d::135/128
|
||||||
|
2804:1f04:3000:138::8/128
|
||||||
|
2801:b0:9:37::210/128
|
||||||
|
2001:67c:20d0:f::11/128
|
||||||
|
2001:67c:20d0:f::11/128
|
||||||
|
2a01:288:4000:6::2/128
|
||||||
|
2a01:9e40::251/128
|
||||||
|
2001:67c:21bc:1e::1/128
|
||||||
|
2a00:82a0:900::5/128
|
||||||
|
2a02:7900:1:3::deb/128
|
||||||
|
2001:67c:20d0:f::11/128
|
||||||
|
2a00:1728:20::5/128
|
||||||
|
2a01:8740:ffff:fffc::31/128
|
||||||
|
2a01:8740:ffff:fffc::32/128
|
||||||
|
2604:1500:f001:0:216:3eff:fe3f:746b/128
|
||||||
|
2604:1500:f001:0:216:3eff:fe3f:746b/128
|
||||||
|
2604:1500:f001:0:216:3eff:fe3f:746b/128
|
||||||
|
2620:101:f000:4901:c5c:0:f:1055/128
|
||||||
|
2403:2c80:5::6/128
|
||||||
|
2803:30d0:100::7/128
|
||||||
|
2803:8240:50:1035::35/128
|
||||||
|
2001:b68:ff:1::11/128
|
||||||
|
2001:b68:ff:1::11/128
|
||||||
|
2001:b68:ff:1::11/128
|
||||||
|
2001:718:1:1f:50:56ff:feee:127/128
|
||||||
|
2001:718:1:1f:50:56ff:feee:127/128
|
||||||
|
2001:1568:2::11/128
|
||||||
|
2001:718:1:1f:50:56ff:feee:127/128
|
||||||
|
2001:718:2::196/128
|
||||||
|
2001:718:1801:1057::1:10/128
|
||||||
|
2001:67c:1220:8b0::93e5:b013/128
|
||||||
|
2a02:8301:0:2::150/128
|
||||||
|
2001:718:1007:48::1:60/128
|
||||||
|
2001:1488:ffff::63/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2a02:2350::211:12/128
|
||||||
|
2001:878:346::116/128
|
||||||
|
2a02:4de0:21::2/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:67c:2b0:19:201:aeff:fe64:6562/128
|
||||||
|
2001:708:10:8::3/128
|
||||||
|
2a01:e0c:1:1598::2/128
|
||||||
|
2a01:e0c:1:1598::2/128
|
||||||
|
2001:41d0:a:37bf::6666/128
|
||||||
|
2a01:e0c:1:1598::2/128
|
||||||
|
2a01:e0a:425:1220:250:56ff:fe24:6618/128
|
||||||
|
2001:660:5404:191::20/128
|
||||||
|
2001:660:3302:282a:d294:66ff:fe8b:9c18/128
|
||||||
|
2001:660:4208:100::24/128
|
||||||
|
2001:660:2402::6/128
|
||||||
|
2a0c:1100:100:0:1:c2d6:dac1:0/128
|
||||||
|
2a00:c70:1:80:93:84:15:2/128
|
||||||
|
2a00:c70:1:80:93:84:15:1/128
|
||||||
|
2001:910:0:40::159/128
|
||||||
|
2001:660:500b:245::145/128
|
||||||
|
2a02:cbf7:100::400/128
|
||||||
|
2001:660:3004:4003::37:80/128
|
||||||
|
2a00:8a60:e012:a00::21/128
|
||||||
|
2a13:dd80:deb::deb/128
|
||||||
|
2403:2c80:5::6/128
|
||||||
|
2a00:8a60:e012:a00::21/128
|
||||||
|
2a13:dd80:deb::deb/128
|
||||||
|
2a13:dd80:deb::deb/128
|
||||||
|
2001:868:0:182::6/128
|
||||||
|
2001:4ca0:0:101:0:80:21:1/128
|
||||||
|
2001:4dd0:1234:1::deb/128
|
||||||
|
2001:638:602:4300:250:56ff:feb7:4da3/128
|
||||||
|
2a0f:9440:1:d::2/128
|
||||||
|
2001:638:a000:1021:21::1/128
|
||||||
|
2a06:93c7:f0::f79/128
|
||||||
|
2a00:8a60:e012:a00::21/128
|
||||||
|
2a01:488:10:1::50ed:888a/128
|
||||||
|
2001:7c0:700::10/128
|
||||||
|
2a00:5ba0:8000:e:92e2:baff:fe36:3cd0/128
|
||||||
|
2a00:5ba0:8000:e:92e2:baff:fe36:3e88/128
|
||||||
|
2001:638:911:b0e:134:109:228:1/128
|
||||||
|
2001:638:605:20:1::6/128
|
||||||
|
2001:638:208:ef1b:0:ff:fe00:4/128
|
||||||
|
2001:4c80:40:628:215:5dff:fe01:be02/128
|
||||||
|
2001:7c0:2041:48::41/128
|
||||||
|
2001:7c0:2041:48::42/128
|
||||||
|
2003:d1:3012::400/128
|
||||||
|
2a00:f48:1007:32::30/128
|
||||||
|
2a07:6fc0:1:0:73::59/128
|
||||||
|
2a00:c98:2030:a034::21/128
|
||||||
|
2a02:2b80:101:269::11/128
|
||||||
|
2001:8d8:5c0:404::3/128
|
||||||
|
2a02:f28:2:0:194:29:226:88/128
|
||||||
|
2a01:55e0::a1f/128
|
||||||
|
2a02:2e0:2810:207:82:98:66:230/128
|
||||||
|
2a09:0:8::14/128
|
||||||
|
2a01:480:1::101/128
|
||||||
|
2a02:2028:d000::6/128
|
||||||
|
2001:638:a01:1094::50/128
|
||||||
|
2a02:16d0:0:2a::2/128
|
||||||
|
2001:1b40:5600:ff80:f8ee::1/128
|
||||||
|
2001:1b40:5600:ff80:f8ee::1/128
|
||||||
|
2a06:1700:2:34::1/128
|
||||||
|
2001:4b78:2000:1::1/128
|
||||||
|
2001:320:237::2/128
|
||||||
|
2001:4b78:2000:1::1/128
|
||||||
|
2a00:1cc8:0:ff0a::2/128
|
||||||
|
2001:760:ffff:b6:4:100:0:73/128
|
||||||
|
2001:4b78:2000:1::1/128
|
||||||
|
2001:760:2e03::ca:26:0/128
|
||||||
|
2a05:7cc0::91:211:244:15/128
|
||||||
|
2a00:1dc0::f00d/128
|
||||||
|
2a00:1dc0::f00d/128
|
||||||
|
2a00:1dc0::f00d/128
|
||||||
|
2001:67c:2564:a120::21/128
|
||||||
|
2404:e400::443:a/128
|
||||||
|
2404:e400::443:b/128
|
||||||
|
2404:138:4000::/128
|
||||||
|
2001:67c:2564:a120::21/128
|
||||||
|
2001:67c:2564:a120::21/128
|
||||||
|
2a14:3f87:c800:2980::2980/128
|
||||||
|
2001:678:d64:564d::443/128
|
||||||
|
2a01:1b0:7999:419::3/128
|
||||||
|
2a00:1630:3400::213/128
|
||||||
|
2a00:1768:1000:22:1::1/128
|
||||||
|
2a0f:ca80:1337::da0:c1c5/128
|
||||||
|
2a02:6ea0:c036::10/128
|
||||||
|
2001:1af8:4700:b210::33/128
|
||||||
|
2a03:afc0:1:1114::/128
|
||||||
|
2a05:44c1:1:5::555/128
|
||||||
|
2a0c:59c0::26/128
|
||||||
|
2a05:e4c1:1:3::2/128
|
||||||
|
2a06:1700:3:12::12/128
|
||||||
|
2a0f:93c0:0:d::2/128
|
||||||
|
2001:700:100:118::47/128
|
||||||
|
2001:700:100:118::47/128
|
||||||
|
2001:700:100:118::47/128
|
||||||
|
2001:4070:1:2::3/128
|
||||||
|
2001:4070:1:2::3/128
|
||||||
|
2001:6d8:10:1060::600b/128
|
||||||
|
2001:6a0:0:31::2/128
|
||||||
|
2001:808::173:17/128
|
||||||
|
2001:4070:1:2::2/128
|
||||||
|
2001:690:2006:200::34/128
|
||||||
|
2001:690:2006:200::34/128
|
||||||
|
2001:690:2006:200::34/128
|
||||||
|
2001:690:2100:80::6/128
|
||||||
|
2602:faa5:189::/128
|
||||||
|
2602:faa5:190::/128
|
||||||
|
2a0c:c500:fe04::30/128
|
||||||
|
2a02:130:9900:30::12/128
|
||||||
|
2001:858:2:1::10/128
|
||||||
|
2001:858:2:1::10/128
|
||||||
|
2001:67c:2564:a119::148:12/128
|
||||||
|
2001:67c:2564:a119::148:12/128
|
||||||
|
2001:720:424:1::1:20/128
|
||||||
|
2001:470:c8b6:0:10:1:2:4/128
|
||||||
|
2001:720:1214:4200::81/128
|
||||||
|
2a00:9ac0:c1ca:5::134/128
|
||||||
|
2a12:d282:102:f6::1/128
|
||||||
|
2001:720:1c14::ffff:c192:4b13/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2001:6b0:5:50::180/128
|
||||||
|
2001:6b0:19::165/128
|
||||||
|
2001:6b0:19::163/128
|
||||||
|
2a01:8e01:c1ea:6c5c::5/128
|
||||||
|
2a01:8e01:c1ea:6c5c::8/128
|
||||||
|
2a02:750:9::e8/128
|
||||||
|
2001:67c:10ec:3dd1::42/128
|
||||||
|
2001:e10:2000:240:e643:4bff:fee8:a63c/128
|
||||||
|
2001:67c:10ec:3dd1::42/128
|
||||||
|
2001:67c:10ec:3dd1::42/128
|
||||||
|
2001:1458:d00:2d::100:1cb/128
|
||||||
|
2001:1458:d00:6f::100:89/128
|
||||||
|
2001:1458:d00:63::100:106/128
|
||||||
|
2001:1458:d00:2d::100:d4/128
|
||||||
|
2001:1458:d00:2c::100:229/128
|
||||||
|
2001:1458:201:e4::100:35c/128
|
||||||
|
2001:1458:201:e4::100:22c/128
|
||||||
|
2001:1458:d00:67::100:429/128
|
||||||
|
2001:1458:d00:34::100:328/128
|
||||||
|
2001:1458:d00:1::100:408/128
|
||||||
|
2001:1458:d00:68::100:e4/128
|
||||||
|
2001:1600:0:aaaa::2:2/128
|
||||||
|
2001:1600:0:aaaa::2:1/128
|
||||||
|
2001:1620::1620/128
|
||||||
|
2001:8e0:41:600::232/128
|
||||||
|
2a05:4740:199::1/128
|
||||||
|
2a04:c43:e00:c4d7:4a5:88ff:fe00:8af/128
|
||||||
|
2001:1b40:5600:ff80:f8ee::1/128
|
||||||
|
2001:1b40:5600:ff80:f8ee::1/128
|
||||||
|
2a01:550:0:402::2:1/128
|
||||||
|
2001:1b40:5600:ff80:f8ee::1/128
|
||||||
|
2a01:70:1:211:2::73/128
|
||||||
|
2a00:1098:0:86:1000::25/128
|
||||||
|
2a00:1098:1::5/128
|
||||||
|
2a01:c0:2:3d::2/128
|
||||||
|
2001:630:341:12::184/128
|
||||||
|
2a0d:5082:0:7::2/128
|
||||||
|
2620:0:861:2:208:80:154:139/128
|
||||||
|
2600:3402:200:227::2/128
|
||||||
|
2600:3404:200:237::2/128
|
||||||
|
2600:3404:200:237::2/128
|
||||||
|
2620:0:861:2:208:80:154:139/128
|
||||||
|
2600:3402:200:227::2/128
|
||||||
|
2a10:4dc0:2:5::2/128
|
||||||
|
2603:1020:203:3::a/128
|
||||||
|
2001:19f0:1595:1403::1092/128
|
||||||
|
2600:3402:200:227::2/128
|
||||||
|
2605:bc80:3010::134/128
|
||||||
|
2600:3404:200:237::2/128
|
||||||
|
2a0b:f301:2:7::2/128
|
||||||
|
2604:2dc0:200:1b57::a/128
|
||||||
|
2604:fbc0:4::2/128
|
||||||
|
2001:470:1:863::110:2/128
|
||||||
|
2600:1700:3d24:740f:e43b:4cff:fe00:212d/128
|
||||||
|
2620:1d5:ffd:1702::213/128
|
||||||
|
2607:f140:0:32::70/128
|
||||||
|
2607:f128:1:3::2/128
|
||||||
|
2620:0:861:2:208:80:154:139/128
|
||||||
|
2604:a840::7/128
|
||||||
|
2604:9a00:2010:a0b8::5/128
|
||||||
|
2a03:afc0:3:1508::/128
|
||||||
|
2607:f1c0:5c0:2::1:0/128
|
||||||
|
2a0b:f300:2:b::2/128
|
||||||
|
2001:18e8:804:35::1337/128
|
||||||
|
2801:0:140:a::deb1/128
|
||||||
|
2803:6d00:8000:9::deb1/128
|
||||||
|
2a04:6f00::138/128
|
||||||
|
2a02:587:dff:501::89/128
|
||||||
|
2001:738:2001:2001::c1ca/128
|
||||||
|
2a09:7ac0::4/128
|
||||||
|
2a00:17c0:c6::1:3/128
|
||||||
|
2a0c:16c1:1:55:601a:1dff:fe6c:368/128
|
||||||
|
2a02:2f0c:d000:14::2/128
|
||||||
|
2a0f:9400:7e11:cb92:b00b:babe:cafe:bad/128
|
||||||
|
2a06:cd40:100:cafe::2/128
|
||||||
|
2a00:ece0:6718:103::a/128
|
||||||
|
2a02:13f0:8200::b064:c4fe/128
|
||||||
|
2001:67c:744:7::2/128
|
||||||
|
2a06:1700:0:38::1/128
|
||||||
|
2001:1328:54:fff::2/128
|
||||||
|
2a04:4e42::644/128
|
||||||
|
2a04:4e42:200::644/128
|
||||||
|
2a04:4e42:400::644/128
|
||||||
|
2a04:4e42:600::644/128
|
||||||
|
2600:9000:2764:600:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:fa00:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:e800:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:7400:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:b000:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:4800:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:c600:3:db06:4200:93a1/128
|
||||||
|
2600:9000:2764:2e00:3:db06:4200:93a1/128
|
||||||
|
2607:5300:400:7d00::80/128
|
||||||
|
2607:5300:400:7d00::80/128
|
||||||
|
2606:50c0:8003::153/128
|
||||||
|
2606:50c0:8000::153/128
|
||||||
|
2606:50c0:8001::153/128
|
||||||
|
2606:50c0:8002::153/128
|
||||||
|
2606:50c0:8002::153/128
|
||||||
|
2606:50c0:8000::153/128
|
||||||
|
2606:50c0:8003::153/128
|
||||||
|
2606:50c0:8001::153/128
|
||||||
97
OPNsense_aliases.json
Normal file
97
OPNsense_aliases.json
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
{
|
||||||
|
"aliases": {
|
||||||
|
"alias": {
|
||||||
|
|
||||||
|
"19a5bc81-a08d-4b1e-9368-cd7c5a92a447": {
|
||||||
|
"enabled": "1",
|
||||||
|
"name": "RFC1918",
|
||||||
|
"type": "network",
|
||||||
|
"path_expression": "",
|
||||||
|
"proto": "",
|
||||||
|
"interface": "",
|
||||||
|
"counters": "0",
|
||||||
|
"updatefreq": "",
|
||||||
|
"content": "10.0.0.0/8\n172.16.0.0/12\n192.168.0.0/16",
|
||||||
|
"password": "",
|
||||||
|
"username": "",
|
||||||
|
"authtype": "",
|
||||||
|
"categories": "",
|
||||||
|
"current_items": "3",
|
||||||
|
"last_updated": "2024-11-07T15:05:47.481822",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"b5c3e490-2222-4e5a-98aa-fb3cf07d1fff": {
|
||||||
|
"enabled": "1",
|
||||||
|
"name": "CloudflareV4",
|
||||||
|
"type": "urltable",
|
||||||
|
"path_expression": "",
|
||||||
|
"proto": "",
|
||||||
|
"interface": "",
|
||||||
|
"counters": "0",
|
||||||
|
"updatefreq": "1",
|
||||||
|
"content": "https://www.cloudflare.com/ips-v4/",
|
||||||
|
"password": "",
|
||||||
|
"username": "",
|
||||||
|
"authtype": "",
|
||||||
|
"categories": "",
|
||||||
|
"current_items": "15",
|
||||||
|
"last_updated": "2024-11-07T18:30:34.207147",
|
||||||
|
"description": "Cloudflare servers for proxying IPv4"
|
||||||
|
},
|
||||||
|
"67f72dc5-960b-437c-b774-b6bc006dc6d5": {
|
||||||
|
"enabled": "1",
|
||||||
|
"name": "CloudflareV6",
|
||||||
|
"type": "urltable",
|
||||||
|
"path_expression": "",
|
||||||
|
"proto": "",
|
||||||
|
"interface": "",
|
||||||
|
"counters": "0",
|
||||||
|
"updatefreq": "1",
|
||||||
|
"content": "https://www.cloudflare.com/ips-v6/",
|
||||||
|
"password": "",
|
||||||
|
"username": "",
|
||||||
|
"authtype": "",
|
||||||
|
"categories": "",
|
||||||
|
"current_items": "7",
|
||||||
|
"last_updated": "2024-11-07T18:30:34.431479",
|
||||||
|
"description": "Cloudflare servers for proxying IPv6"
|
||||||
|
},
|
||||||
|
"dc901506-ff81-406e-bbed-a43g009588ba": {
|
||||||
|
"enabled": "1",
|
||||||
|
"name": "AptUpdateV4",
|
||||||
|
"type": "urltable",
|
||||||
|
"path_expression": "",
|
||||||
|
"proto": "",
|
||||||
|
"interface": "",
|
||||||
|
"counters": "0",
|
||||||
|
"updatefreq": "1",
|
||||||
|
"content": "https://tea.shupogaki.org/YuruC3/Debain-repos/raw/branch/main/MirrorListV4",
|
||||||
|
"password": "",
|
||||||
|
"username": "",
|
||||||
|
"authtype": "",
|
||||||
|
"categories": "",
|
||||||
|
"current_items": "",
|
||||||
|
"last_updated": "",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"dc901506-ff81-406e-bbed-a43c009588ba": {
|
||||||
|
"enabled": "1",
|
||||||
|
"name": "AptUpdateV6",
|
||||||
|
"type": "urltable",
|
||||||
|
"path_expression": "",
|
||||||
|
"proto": "",
|
||||||
|
"interface": "",
|
||||||
|
"counters": "0",
|
||||||
|
"updatefreq": "1",
|
||||||
|
"content": "https://tea.shupogaki.org/YuruC3/Debain-repos/raw/branch/main/MirrorListV6",
|
||||||
|
"password": "",
|
||||||
|
"username": "",
|
||||||
|
"authtype": "",
|
||||||
|
"categories": "",
|
||||||
|
"current_items": "",
|
||||||
|
"last_updated": "",
|
||||||
|
"description": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
README.md
28
README.md
@@ -1,3 +1,29 @@
|
|||||||
# A list of EU and American Debian mirror URLs
|
# A list of EU and American Debian mirror URLs
|
||||||
|
|
||||||
I'll propably set some scraping script up that would update that list like once per day.
|
It scrapes URL's of debian mirrors for later use in opnsense as an alias that ony allows access to debian repositories
|
||||||
|
|
||||||
|
I'll be trying to maintain up to date list, aka just run a docker container and forget about it propably.
|
||||||
|
|
||||||
|
Also includes IPs for security.debian.org, docker, proxmox and nvidia container toolkit
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
Here is a rundown of all the options in docker-compose
|
||||||
|
|
||||||
|
```DEBMIRRORURL``` is a link to Debian's mirror list. You don't have to fill it as I don't think they'll be changing that. I hope so at least.
|
||||||
|
|
||||||
|
```GITURLPROTO``` protocol of git server. Usually https
|
||||||
|
|
||||||
|
```GITURL``` address of git server. Fox example, github.com
|
||||||
|
|
||||||
|
```GITREPOPATH``` is the path to your repository. For example, YuruC3/pmpw (shameless plug for my other project)
|
||||||
|
|
||||||
|
```GITEA_TOKEN``` is a personal token used by git to authenticate.
|
||||||
|
|
||||||
|
```EXTRAREPOS``` can be True of False. It includes IP's for security updates for debian. Pretty usefull.
|
||||||
|
|
||||||
|
```SECURITYREPOS``` has IPs for things like docker, the whole proxmox suite and nvidia container toolkit.
|
||||||
|
|
||||||
|
## Run at home
|
||||||
|
|
||||||
|
if you want to run it at your place remember to change crontab timings and git personal token and so on.
|
||||||
2
code/.gitignore
vendored
Normal file
2
code/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
__pycache__
|
||||||
|
test
|
||||||
346
code/main.log
Normal file
346
code/main.log
Normal file
@@ -0,0 +1,346 @@
|
|||||||
|
Waiting...
|
||||||
|
Waiting...
|
||||||
|
Waiting...
|
||||||
|
Starting lookup
|
||||||
|
213.129.232.18
|
||||||
|
82.209.230.71
|
||||||
|
213.129.232.18
|
||||||
|
144.208.213.156
|
||||||
|
83.164.133.195
|
||||||
|
89.106.208.14
|
||||||
|
213.129.232.18
|
||||||
|
129.27.3.13
|
||||||
|
46.102.157.26
|
||||||
|
195.234.45.114
|
||||||
|
195.234.45.114
|
||||||
|
193.138.101.179
|
||||||
|
193.190.198.27
|
||||||
|
195.234.45.114
|
||||||
|
185.111.204.146
|
||||||
|
200.236.31.3
|
||||||
|
200.236.31.3
|
||||||
|
200.236.31.3
|
||||||
|
200.237.203.89
|
||||||
|
170.233.231.184
|
||||||
|
143.106.7.135
|
||||||
|
143.208.160.8
|
||||||
|
200.133.233.210
|
||||||
|
62.44.96.11
|
||||||
|
62.44.96.11
|
||||||
|
212.50.0.19
|
||||||
|
195.85.215.251
|
||||||
|
185.117.82.66
|
||||||
|
84.43.191.5
|
||||||
|
217.79.83.126
|
||||||
|
62.44.96.11
|
||||||
|
87.121.121.4
|
||||||
|
78.128.80.70
|
||||||
|
78.128.80.69
|
||||||
|
207.210.46.249
|
||||||
|
207.210.46.249
|
||||||
|
199.188.220.121
|
||||||
|
207.210.46.249
|
||||||
|
129.97.134.71
|
||||||
|
208.89.84.55
|
||||||
|
99.199.64.121
|
||||||
|
137.82.116.21
|
||||||
|
138.204.231.181
|
||||||
|
45.125.0.6
|
||||||
|
138.204.231.181
|
||||||
|
190.93.84.7
|
||||||
|
190.97.169.220
|
||||||
|
138.186.10.35
|
||||||
|
138.204.231.181
|
||||||
|
146.83.205.200
|
||||||
|
161.53.160.11
|
||||||
|
161.53.160.11
|
||||||
|
161.53.160.11
|
||||||
|
213.191.133.160
|
||||||
|
78.128.211.127
|
||||||
|
78.128.211.127
|
||||||
|
81.91.81.11
|
||||||
|
95.168.211.41
|
||||||
|
147.32.160.17
|
||||||
|
78.128.211.127
|
||||||
|
147.32.127.196
|
||||||
|
147.228.57.10
|
||||||
|
147.229.176.19
|
||||||
|
89.102.0.150
|
||||||
|
195.113.250.60
|
||||||
|
217.31.202.63
|
||||||
|
194.71.11.165
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.165
|
||||||
|
46.30.211.12
|
||||||
|
130.225.254.116
|
||||||
|
77.247.64.34
|
||||||
|
194.71.11.165
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.165
|
||||||
|
195.140.195.56
|
||||||
|
193.166.3.3
|
||||||
|
212.27.32.66
|
||||||
|
212.27.32.66
|
||||||
|
46.105.185.24
|
||||||
|
213.32.5.7
|
||||||
|
145.238.186.56
|
||||||
|
193.48.57.38
|
||||||
|
212.27.32.66
|
||||||
|
193.55.175.161
|
||||||
|
149.62.156.14
|
||||||
|
82.67.51.130
|
||||||
|
147.94.19.20
|
||||||
|
132.227.74.17
|
||||||
|
77.95.64.41
|
||||||
|
194.167.156.234
|
||||||
|
193.49.184.24
|
||||||
|
130.79.200.5
|
||||||
|
194.214.218.193
|
||||||
|
80.93.84.15
|
||||||
|
80.67.163.159
|
||||||
|
194.254.245.145
|
||||||
|
136.243.89.31
|
||||||
|
62.138.222.4
|
||||||
|
129.102.1.37
|
||||||
|
137.226.34.46
|
||||||
|
141.76.2.4
|
||||||
|
45.125.0.6
|
||||||
|
137.226.34.46
|
||||||
|
141.76.2.4
|
||||||
|
193.175.72.15
|
||||||
|
141.76.2.4
|
||||||
|
85.25.128.62
|
||||||
|
62.201.161.86
|
||||||
|
129.187.10.100
|
||||||
|
194.8.197.22
|
||||||
|
134.169.192.5
|
||||||
|
91.199.118.172
|
||||||
|
147.142.19.60
|
||||||
|
131.188.12.211
|
||||||
|
134.76.12.6
|
||||||
|
137.226.34.46
|
||||||
|
80.237.136.138
|
||||||
|
129.143.116.10
|
||||||
|
212.201.68.60
|
||||||
|
212.201.68.61
|
||||||
|
134.109.228.1
|
||||||
|
139.174.32.6
|
||||||
|
132.180.8.60
|
||||||
|
130.75.2.22
|
||||||
|
131.246.123.4
|
||||||
|
134.93.178.166
|
||||||
|
129.69.0.41
|
||||||
|
129.69.0.42
|
||||||
|
217.243.224.144
|
||||||
|
212.83.32.30
|
||||||
|
5.1.73.59
|
||||||
|
37.58.58.140
|
||||||
|
185.3.234.216
|
||||||
|
217.72.206.21
|
||||||
|
139.20.16.130
|
||||||
|
194.29.226.88
|
||||||
|
185.41.106.155
|
||||||
|
82.98.66.230
|
||||||
|
62.133.35.14
|
||||||
|
213.202.193.253
|
||||||
|
213.209.102.29
|
||||||
|
194.95.104.50
|
||||||
|
109.69.69.17
|
||||||
|
78.129.164.123
|
||||||
|
78.129.164.123
|
||||||
|
185.165.170.20
|
||||||
|
85.94.199.210
|
||||||
|
203.178.137.175
|
||||||
|
153.127.75.11
|
||||||
|
210.117.237.2
|
||||||
|
85.94.199.210
|
||||||
|
109.73.80.190
|
||||||
|
151.0.128.28
|
||||||
|
90.147.160.73
|
||||||
|
85.94.199.210
|
||||||
|
130.251.19.2
|
||||||
|
140.105.48.55
|
||||||
|
158.129.159.169
|
||||||
|
158.129.159.169
|
||||||
|
158.129.159.169
|
||||||
|
83.171.27.40
|
||||||
|
91.211.244.15
|
||||||
|
178.17.160.48
|
||||||
|
178.17.160.48
|
||||||
|
178.17.160.48
|
||||||
|
130.89.149.21
|
||||||
|
103.2.187.5
|
||||||
|
103.2.187.6
|
||||||
|
163.7.134.112
|
||||||
|
130.89.149.21
|
||||||
|
130.89.149.21
|
||||||
|
23.151.136.174
|
||||||
|
185.244.24.35
|
||||||
|
83.137.149.3
|
||||||
|
109.200.196.213
|
||||||
|
85.159.239.121
|
||||||
|
50.118.225.16
|
||||||
|
185.229.191.144
|
||||||
|
5.79.108.33
|
||||||
|
185.15.209.238
|
||||||
|
45.84.31.11
|
||||||
|
78.142.193.130
|
||||||
|
45.88.5.78
|
||||||
|
185.183.113.131
|
||||||
|
185.246.188.7
|
||||||
|
194.127.172.131
|
||||||
|
129.240.118.47
|
||||||
|
129.240.118.47
|
||||||
|
129.240.118.47
|
||||||
|
153.19.251.221
|
||||||
|
153.19.251.221
|
||||||
|
149.156.96.11
|
||||||
|
193.219.28.2
|
||||||
|
150.254.173.17
|
||||||
|
153.19.251.222
|
||||||
|
193.136.216.34
|
||||||
|
85.143.112.112
|
||||||
|
193.136.216.34
|
||||||
|
193.136.216.34
|
||||||
|
193.137.214.36
|
||||||
|
193.136.164.6
|
||||||
|
23.147.168.189
|
||||||
|
195.80.174.186
|
||||||
|
195.80.174.186
|
||||||
|
91.221.4.48
|
||||||
|
88.212.10.12
|
||||||
|
195.80.174.186
|
||||||
|
213.129.232.18
|
||||||
|
213.129.232.18
|
||||||
|
130.89.148.12
|
||||||
|
130.89.148.12
|
||||||
|
80.64.47.13
|
||||||
|
193.145.15.20
|
||||||
|
95.20.11.14
|
||||||
|
193.146.32.81
|
||||||
|
147.83.91.172
|
||||||
|
150.214.5.134
|
||||||
|
193.144.61.75
|
||||||
|
91.132.103.246
|
||||||
|
193.146.75.19
|
||||||
|
155.210.4.97
|
||||||
|
82.194.78.250
|
||||||
|
194.71.11.165
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.165
|
||||||
|
130.235.34.30
|
||||||
|
193.11.30.180
|
||||||
|
194.71.11.163
|
||||||
|
194.71.11.165
|
||||||
|
194.132.225.213
|
||||||
|
94.103.202.216
|
||||||
|
109.74.12.226
|
||||||
|
129.132.53.171
|
||||||
|
140.110.240.80
|
||||||
|
193.140.98.183
|
||||||
|
129.132.53.171
|
||||||
|
129.132.53.171
|
||||||
|
188.184.90.134
|
||||||
|
188.184.105.5
|
||||||
|
188.185.65.208
|
||||||
|
188.184.104.250
|
||||||
|
188.184.111.122
|
||||||
|
188.185.29.10
|
||||||
|
188.184.79.248
|
||||||
|
188.184.23.33
|
||||||
|
188.184.91.52
|
||||||
|
188.185.8.192
|
||||||
|
188.185.25.162
|
||||||
|
83.166.143.42
|
||||||
|
83.166.143.43
|
||||||
|
109.202.202.202
|
||||||
|
212.25.8.232
|
||||||
|
185.73.240.250
|
||||||
|
89.145.166.16
|
||||||
|
78.129.164.123
|
||||||
|
78.129.164.123
|
||||||
|
83.170.94.3
|
||||||
|
78.158.65.70
|
||||||
|
78.129.164.123
|
||||||
|
90.207.225.196
|
||||||
|
94.229.65.150
|
||||||
|
213.230.211.73
|
||||||
|
46.235.229.21
|
||||||
|
93.93.131.18
|
||||||
|
163.1.160.163
|
||||||
|
163.1.221.67
|
||||||
|
80.87.134.17
|
||||||
|
85.13.241.50
|
||||||
|
212.219.56.184
|
||||||
|
81.179.123.56
|
||||||
|
185.28.240.10
|
||||||
|
5.180.211.190
|
||||||
|
64.50.233.100
|
||||||
|
64.50.236.52
|
||||||
|
208.80.154.139
|
||||||
|
208.80.154.139
|
||||||
|
64.50.233.100
|
||||||
|
64.50.236.52
|
||||||
|
92.119.16.152
|
||||||
|
20.61.228.89
|
||||||
|
128.180.2.105
|
||||||
|
128.30.3.141
|
||||||
|
128.226.118.14
|
||||||
|
128.226.118.15
|
||||||
|
128.226.118.12
|
||||||
|
128.226.118.13
|
||||||
|
108.61.5.92
|
||||||
|
64.50.236.52
|
||||||
|
140.211.166.134
|
||||||
|
64.50.233.100
|
||||||
|
128.135.10.29
|
||||||
|
77.247.126.176
|
||||||
|
108.86.224.23
|
||||||
|
15.204.41.243
|
||||||
|
204.157.3.70
|
||||||
|
161.129.154.250
|
||||||
|
184.105.240.111
|
||||||
|
76.252.192.212
|
||||||
|
216.127.35.166
|
||||||
|
148.137.11.75
|
||||||
|
192.158.27.72
|
||||||
|
206.82.17.213
|
||||||
|
141.219.180.70
|
||||||
|
104.189.183.57
|
||||||
|
162.255.118.133
|
||||||
|
169.229.200.70
|
||||||
|
208.100.4.53
|
||||||
|
69.166.55.80
|
||||||
|
208.80.154.139
|
||||||
|
142.147.88.7
|
||||||
|
23.145.168.14
|
||||||
|
207.244.94.80
|
||||||
|
185.142.32.136
|
||||||
|
74.208.240.17
|
||||||
|
94.154.159.241
|
||||||
|
128.211.151.252
|
||||||
|
138.247.115.248
|
||||||
|
200.14.116.3
|
||||||
|
190.105.216.42
|
||||||
|
45.162.204.37
|
||||||
|
185.37.252.138
|
||||||
|
212.205.74.89
|
||||||
|
152.66.115.246
|
||||||
|
45.67.159.244
|
||||||
|
89.111.47.130
|
||||||
|
91.220.43.19
|
||||||
|
185.242.104.18
|
||||||
|
132.248.59.73
|
||||||
|
37.251.174.43
|
||||||
|
81.196.9.142
|
||||||
|
89.213.174.152
|
||||||
|
91.188.226.250
|
||||||
|
188.241.222.52
|
||||||
|
5.154.224.26
|
||||||
|
5.83.47.15
|
||||||
|
176.124.104.176
|
||||||
|
185.100.87.86
|
||||||
|
164.73.233.2
|
||||||
166
code/main.py
Normal file
166
code/main.py
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
import requests, schedule, time
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from whatDomain import *
|
||||||
|
|
||||||
|
|
||||||
|
DEBSECURITYURL = ["https://security.debian.org/debian-security/"]
|
||||||
|
EXTRASURL = ["https://download.docker.com/linux/debian/",
|
||||||
|
# Double just to be sure. Even though they point to the same IP
|
||||||
|
"http://download.proxmox.com/debian/",
|
||||||
|
"https://enterprise.proxmox.com/debian/pve/",
|
||||||
|
# That's for nvidia docker toolkit something something
|
||||||
|
# stuff that makes containers use nvenc and shit
|
||||||
|
"https://nvidia.github.io/libnvidia-container/stable/deb/",
|
||||||
|
"https://nvidia.github.io/libnvidia-container/experimental/deb/"]
|
||||||
|
|
||||||
|
DEBMIRRORURL = "https://www.debian.org/mirror/list"
|
||||||
|
IPv4FILE = "../MirrorListV4"
|
||||||
|
IPv6FILE = "../MirrorListV6"
|
||||||
|
|
||||||
|
|
||||||
|
# Define EU and American countries as well as Security for security updates
|
||||||
|
target_countries = set([
|
||||||
|
# Europe
|
||||||
|
"Austria", "Belgium", "Bulgaria", "Croatia", "Czech Republic", "Denmark",
|
||||||
|
"Estonia", "Finland", "France", "Germany", "Greece", "Hungary", "Iceland",
|
||||||
|
"Ireland", "Italy", "Latvia", "Lithuania", "Netherlands", "Norway", "Poland",
|
||||||
|
"Portugal", "Romania", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland",
|
||||||
|
"United Kingdom", "Moldova",
|
||||||
|
# America
|
||||||
|
"Argentina", "Brazil", "Canada", "Chile", "Colombia", "Costa Rica", "Ecuador",
|
||||||
|
"Mexico", "Peru", "United States", "Uruguay", "Venezuela",
|
||||||
|
# Others
|
||||||
|
"Security", "Extras"
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
def sanitizeURL(inpurl: str):
|
||||||
|
if "https://" in inpurl:
|
||||||
|
outurl = inpurl[8:]
|
||||||
|
elif "http://" in inpurl:
|
||||||
|
outurl = inpurl[7:]
|
||||||
|
elif "http://" or "https://" not in url:
|
||||||
|
outurl = inpurl
|
||||||
|
else:
|
||||||
|
return -1
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
for char in outurl:
|
||||||
|
i += 1
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:i]
|
||||||
|
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:-1]
|
||||||
|
return outurl
|
||||||
|
|
||||||
|
|
||||||
|
def getFreshData():
|
||||||
|
payload = requests.get(DEBMIRRORURL)
|
||||||
|
soup = BeautifulSoup(payload.content, "html.parser")
|
||||||
|
return soup
|
||||||
|
|
||||||
|
|
||||||
|
def sanitizeUrlsGodWhatTheFuckIsThis(SoupInput: BeautifulSoup):
|
||||||
|
|
||||||
|
outMirrorDict = {}
|
||||||
|
current_country = None
|
||||||
|
|
||||||
|
# Iterate through all table rows
|
||||||
|
for table in SoupInput.find_all("table"):
|
||||||
|
for row in table.find_all("tr"):
|
||||||
|
# Check for country name in a full-row header (<strong><big>)
|
||||||
|
strong = row.find("strong")
|
||||||
|
if strong:
|
||||||
|
country_name = strong.get_text(strip=True)
|
||||||
|
if country_name in target_countries:
|
||||||
|
current_country = country_name
|
||||||
|
else:
|
||||||
|
current_country = None
|
||||||
|
continue # move to next row
|
||||||
|
|
||||||
|
# Check for inline country name in first column
|
||||||
|
cols = row.find_all("td")
|
||||||
|
if len(cols) >= 2:
|
||||||
|
possible_country = cols[0].get_text(strip=True)
|
||||||
|
link_tag = cols[1].find("a", href=True)
|
||||||
|
if possible_country in target_countries:
|
||||||
|
current_country = possible_country
|
||||||
|
if current_country and link_tag:
|
||||||
|
url = link_tag['href']
|
||||||
|
if current_country not in outMirrorDict:
|
||||||
|
outMirrorDict[current_country] = []
|
||||||
|
outMirrorDict[current_country].append(url)
|
||||||
|
|
||||||
|
outMirrorDict.update({"Security": DEBSECURITYURL})
|
||||||
|
outMirrorDict.update({"Extras": EXTRASURL})
|
||||||
|
|
||||||
|
return outMirrorDict
|
||||||
|
|
||||||
|
def LeJob():
|
||||||
|
|
||||||
|
print("Starting lookup")
|
||||||
|
|
||||||
|
LeSoup = getFreshData()
|
||||||
|
|
||||||
|
LeMirrorDict = sanitizeUrlsGodWhatTheFuckIsThis(LeSoup)
|
||||||
|
|
||||||
|
# print(LeMirrorDict)
|
||||||
|
|
||||||
|
with open(IPv4FILE, "r",) as fR, open(IPv4FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for key, urls in LeMirrorDict.items():
|
||||||
|
# print(urls)
|
||||||
|
if key in target_countries:
|
||||||
|
|
||||||
|
for url in urls:
|
||||||
|
# print(url)
|
||||||
|
|
||||||
|
if url not in fR:
|
||||||
|
|
||||||
|
goodurl = sanitizeURL(url)
|
||||||
|
# print(goodurl)
|
||||||
|
|
||||||
|
ip4Dict = ermWhatATheIpFromDomainYaCrazy(goodurl)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for key, ip in ip4Dict.items():
|
||||||
|
print(ip)
|
||||||
|
|
||||||
|
fW.write(ip + "/32" + "\n")
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
with open(IPv6FILE, "r",) as fR, open(IPv6FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for key, urls in LeMirrorDict.items():
|
||||||
|
if key in target_countries:
|
||||||
|
|
||||||
|
for url in urls:
|
||||||
|
|
||||||
|
if url not in fR:
|
||||||
|
|
||||||
|
goodurl = sanitizeURL(url)
|
||||||
|
# print(goodurl)
|
||||||
|
|
||||||
|
ip6Dict = ermWhatAAAATheIpFromDomainYaCrazy(goodurl)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for key, ip in ip6Dict.items():
|
||||||
|
# print(ip)
|
||||||
|
|
||||||
|
fW.write(ip + "/128" + "\n")
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
# schedule.every().day.at("12:45").do(LeJob)
|
||||||
|
schedule.every().day.at("17:44").do(LeJob)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
schedule.run_pending()
|
||||||
|
print("Waiting...")
|
||||||
|
time.sleep(30) #Wait one minute
|
||||||
|
# LeJob()
|
||||||
|
|
||||||
4
code/requirements.txt
Normal file
4
code/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
beautifulsoup4==4.13.4
|
||||||
|
requests==2.32.3
|
||||||
|
schedule==1.2.2
|
||||||
|
nslookup==1.8.1
|
||||||
129
code/whatDomain.py
Normal file
129
code/whatDomain.py
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
#from nslookup import Nslookup
|
||||||
|
from typing import Optional, Annotated
|
||||||
|
import dns, dns.resolver
|
||||||
|
|
||||||
|
# https://www.codeunderscored.com/nslookup-python/
|
||||||
|
|
||||||
|
def ermWhatATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv4 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'A')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
def ermWhatAAAATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'AAAA')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
def ermWhatPTRTheIpFromDomainYaCrazy(inpIpAddressOrSomething: Annotated[str, "IP address to lookup domain for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
whatToCheck = inpIpAddressOrSomething + ".in-addr.arpa"
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(whatToCheck, 'PTR')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
#print(ermWhatATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatAAAATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatPTRTheIpFromDomainYaCrazy("192.168.1.226"))
|
||||||
3
customList/.gitignore
vendored
Normal file
3
customList/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
repo
|
||||||
|
__pycache__
|
||||||
|
.env
|
||||||
28
customList/Dockerfile
Normal file
28
customList/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
ENV REPOFILE="/etc/customMirrors/repoList.list" EXTRAURL="http://mdu.se/"
|
||||||
|
ENV DNSSRV="1.1.1.1"
|
||||||
|
ENV IPV4FILENAME="MirrorListV4" IPV6FILENAME="MirrorListV6"
|
||||||
|
ENV CRONTABSET="25 */4 * * *"
|
||||||
|
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add python3 py3-pip git bash
|
||||||
|
|
||||||
|
RUN mkdir /etc/customMirrors
|
||||||
|
WORKDIR /etc/customMirrors/
|
||||||
|
|
||||||
|
COPY mainDocker.py .
|
||||||
|
COPY whatDomain.py .
|
||||||
|
COPY requirements.txt .
|
||||||
|
COPY init.sh .
|
||||||
|
|
||||||
|
RUN python3 -m venv venv && \
|
||||||
|
venv/bin/python3 -m pip install --upgrade pip && \
|
||||||
|
venv/bin/pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
COPY gitPush.sh .
|
||||||
|
|
||||||
|
RUN chmod +x ./gitPush.sh
|
||||||
|
|
||||||
|
CMD ["bash", "init.sh"]
|
||||||
11
customList/cron-jobs
Normal file
11
customList/cron-jobs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# python
|
||||||
|
#20 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainOPNsense.py
|
||||||
|
25 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py
|
||||||
|
# 20 19 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainOPNsense.py
|
||||||
|
# 25 19 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py
|
||||||
|
#*/3 * * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py
|
||||||
|
#*/3 * * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainOPNsense.py
|
||||||
|
|
||||||
|
# git push
|
||||||
|
30 */4 * * * /bin/sh /etc/debmirror/gitPush.sh
|
||||||
|
#*/1 * * * * /bin/sh /etc/debmirror/gitPush.sh
|
||||||
4
customList/customListGitVars.env
Normal file
4
customList/customListGitVars.env
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
GITURLPROTO=https
|
||||||
|
GITURL=tea.shupogaki.org
|
||||||
|
GITREPOPATH=YuruC3/Repo-IP-lists.git
|
||||||
|
GITEA_TOKEN=0938a2033324b987bbcb2976b56d147a9a00d8a2
|
||||||
1
customList/customListURLS.env
Normal file
1
customList/customListURLS.env
Normal file
@@ -0,0 +1 @@
|
|||||||
|
EXTRAURL=["https://www.pixiv.net/", "https://pixiv.net/", "https://i.pximg.net/", "https://pximg.net/", "iwara.tv/"]
|
||||||
20
customList/docker-compose.yml
Normal file
20
customList/docker-compose.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
services:
|
||||||
|
debmirup:
|
||||||
|
container_name: Debian_Mirrors_Updater
|
||||||
|
build: ./
|
||||||
|
#image: yuruc3/debianrepolist:v0.3
|
||||||
|
|
||||||
|
environment:
|
||||||
|
- GITURLPROTO=https
|
||||||
|
- GITURL=tea.shupogaki.org
|
||||||
|
- GITREPOPATH=YuruC3/Repo-IP-lists.git
|
||||||
|
- GITEA_TOKEN=3947a16ee5c3a337d6ff9cfb32d361167d4099d7
|
||||||
|
- REPOFILE=repoList.list
|
||||||
|
- IPV4FILENAME=customListNv4
|
||||||
|
- IPV6FILENAME=customListNv6
|
||||||
|
volumes:
|
||||||
|
- ./repoList.list:/etc/customMirrors/repoList.list:ro
|
||||||
|
|
||||||
|
restart: unless-stopped
|
||||||
87
customList/gitPush.sh
Normal file
87
customList/gitPush.sh
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
WORKPTH="/etc/customMirrors/"
|
||||||
|
REPO_DIR="$WORKPTH/Repo-IP-lists"
|
||||||
|
REPO_URL="${GITURLPROTO}://${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
# Clone repo if not exists
|
||||||
|
if [ ! -d "$REPO_DIR/.git" ]; then
|
||||||
|
echo "[$(date)] Cloning repository..."
|
||||||
|
git clone "$REPO_URL" "$REPO_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$REPO_DIR"
|
||||||
|
|
||||||
|
# Abort previous rebase/cherry-pick if stuck
|
||||||
|
git rebase --abort 2>/dev/null || true
|
||||||
|
git cherry-pick --abort 2>/dev/null || true
|
||||||
|
|
||||||
|
# Make sure we're on a clean 'main'
|
||||||
|
git checkout main || git checkout -b main origin/main
|
||||||
|
git pull --rebase --autostash
|
||||||
|
|
||||||
|
git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
|
||||||
|
git config user.name "UpdateBot"
|
||||||
|
git config user.email "UpdateBot@localhost.local"
|
||||||
|
|
||||||
|
# Stage the files
|
||||||
|
git add $IPV4FILENAME $IPV6FILENAME
|
||||||
|
|
||||||
|
# Only proceed if there are staged changes
|
||||||
|
if ! git diff --quiet --cached; then
|
||||||
|
echo "[$(date)] Committing and pushing changes..."
|
||||||
|
git commit -m "Auto-update mirror list on $(date -Iseconds)"
|
||||||
|
# git pull --rebase --autostash
|
||||||
|
git push --quiet
|
||||||
|
echo "[$(date)] Changes pushed."
|
||||||
|
else
|
||||||
|
echo "[$(date)] No changes to commit or push."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# #!/bin/sh
|
||||||
|
# set -e
|
||||||
|
|
||||||
|
# WORKPTH="/etc/debmirror/"
|
||||||
|
# REPO_DIRd="$WORKPTH/Repo-IP-lists"
|
||||||
|
# REPO_URL="${GITURLPROTO}://${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
|
||||||
|
# # Clone repo only if it doesn't already exist
|
||||||
|
# if [ ! -d "$REPO_DIR/.git" ]; then
|
||||||
|
# echo "[$(date)] Cloning repository..."
|
||||||
|
# git clone "$REPO_URL" "$REPO_DIR"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
||||||
|
# cd "$REPO_DIR"
|
||||||
|
|
||||||
|
# git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
# git config user.name "UpdateBot"
|
||||||
|
# git config user.email "UpdateBot@localhost.local"
|
||||||
|
|
||||||
|
# # stage files
|
||||||
|
# git add MirrorListV4 MirrorListV6 OPNS_MirrorListV4 OPNS_MirrorListV6
|
||||||
|
|
||||||
|
# # If anything to commit locally, commit it now
|
||||||
|
# if ! git diff --quiet --cached; then
|
||||||
|
# echo "[$(date)] Committing local changes before pulling"
|
||||||
|
# git commit -m "Auto-commit before pull on $(date -Iseconds)"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# # Now pull the latest
|
||||||
|
# git pull --rebase --autostash
|
||||||
|
|
||||||
|
# # Commit and push only if there's anything new staged
|
||||||
|
# if git diff --quiet; then
|
||||||
|
# echo "[$(date)] No changes to commit."
|
||||||
|
# else
|
||||||
|
# git commit -a -m "Auto-update mirror list on $(date -Iseconds)" --quiet
|
||||||
|
# git push --quiet
|
||||||
|
# echo "[$(date)] Changes pushed successfully."
|
||||||
|
# fi
|
||||||
|
|
||||||
23
customList/init.sh
Normal file
23
customList/init.sh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "EXTRAURL: $EXTRAURL"
|
||||||
|
|
||||||
|
if [[ -f "$REPOFILE" ]]; then
|
||||||
|
echo "URL file exists"
|
||||||
|
else
|
||||||
|
touch $REPOFILE
|
||||||
|
echo $EXTRAURL | tee $REPOFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "nameserver $DNSSRV" > /etc/resolv.conf
|
||||||
|
echo "search local" >> /etc/resolv.conf
|
||||||
|
|
||||||
|
git clone https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}
|
||||||
|
ln -s /etc/customMirrors/Repo-IP-lists/$IPV4FILENAME /etc/customMirrors/$IPV4FILENAME
|
||||||
|
ln -s /etc/customMirrors/Repo-IP-lists/$IPV6FILENAME /etc/customMirrors/$IPV6FILENAME
|
||||||
|
|
||||||
|
echo -n "$CRONTABSET /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py" > /etc/crontabs/customListCron
|
||||||
|
|
||||||
|
exec /usr/sbin/crond -f
|
||||||
88
customList/mainDocker.py
Normal file
88
customList/mainDocker.py
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
import requests, schedule, time, os
|
||||||
|
# from bs4 import BeautifulSoup
|
||||||
|
from whatDomain import *
|
||||||
|
|
||||||
|
EXTRAURL = []
|
||||||
|
|
||||||
|
repoListFile = open(os.getenv("REPOFILE", "repoList.list"), 'r')
|
||||||
|
i = 0
|
||||||
|
for repoUrl in repoListFile:
|
||||||
|
i += 1
|
||||||
|
print(repoUrl.strip())
|
||||||
|
EXTRAURL.append(repoUrl.strip())
|
||||||
|
repoListFile.close()
|
||||||
|
|
||||||
|
IPV4FILENAME = str(os.getenv("IPV4FILENAME", "MirrorListV4"))
|
||||||
|
IPV6FILENAME = str(os.getenv("IPV6FILENAME", "MirrorListV6"))
|
||||||
|
|
||||||
|
# EXTRAURL = list(os.getenv("EXTRAURL", "https://mdu.se/"))
|
||||||
|
IPv4FILE = f"/etc/customMirrors/{IPV4FILENAME}"
|
||||||
|
IPv6FILE = f"/etc/customMirrors/{IPV6FILENAME}"
|
||||||
|
|
||||||
|
def sanitizeURL(inpurl: str):
|
||||||
|
if "https://" in inpurl:
|
||||||
|
outurl = inpurl[8:]
|
||||||
|
elif "http://" in inpurl:
|
||||||
|
outurl = inpurl[7:]
|
||||||
|
elif "http://" or "https://" not in url:
|
||||||
|
outurl = inpurl
|
||||||
|
else:
|
||||||
|
return inpurl
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
for char in outurl:
|
||||||
|
i += 1
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:i]
|
||||||
|
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:-1]
|
||||||
|
return outurl
|
||||||
|
|
||||||
|
def LeJob():
|
||||||
|
|
||||||
|
print("Starting lookup")
|
||||||
|
|
||||||
|
# print(LeMirrorDict)
|
||||||
|
|
||||||
|
with open(IPv4FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for url in EXTRAURL:
|
||||||
|
goodurl = sanitizeURL(url)
|
||||||
|
# print(goodurl)
|
||||||
|
|
||||||
|
# ip4Dict = ermWhatATheIpFromDomainYaCrazy(url)
|
||||||
|
ip4Dict = ermWhatATheIpFromDomainYaCrazy(goodurl)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for key, ip in ip4Dict.items():
|
||||||
|
print(ip + "/32")
|
||||||
|
|
||||||
|
fW.write(ip + "/32" + "\n")
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
with open(IPv6FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for url in EXTRAURL:
|
||||||
|
goodurl = sanitizeURL(url)
|
||||||
|
# print(goodurl)
|
||||||
|
|
||||||
|
# ip6Dict = ermWhatAAAATheIpFromDomainYaCrazy(url)
|
||||||
|
ip6Dict = ermWhatAAAATheIpFromDomainYaCrazy(goodurl)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for key, ip in ip6Dict.items():
|
||||||
|
print(ip + "/128")
|
||||||
|
|
||||||
|
fW.write(ip + "/128" + "\n")
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LeJob()
|
||||||
|
|
||||||
|
print("Done")
|
||||||
5
customList/repoList.list
Normal file
5
customList/repoList.list
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
https://www.pixiv.net/
|
||||||
|
https://pixiv.net/
|
||||||
|
https://i.pximg.net/
|
||||||
|
https://pximg.net/
|
||||||
|
https://wiki.archlinux.org/
|
||||||
4
customList/repoList.list.example
Normal file
4
customList/repoList.list.example
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
https://www.pixiv.net/
|
||||||
|
https://pixiv.net/
|
||||||
|
https://i.pximg.net/
|
||||||
|
https://pximg.net/
|
||||||
4
customList/requirements.txt
Normal file
4
customList/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#beautifulsoup4==4.13.4
|
||||||
|
requests==2.32.3
|
||||||
|
schedule==1.2.2
|
||||||
|
nslookup==1.8.1
|
||||||
129
customList/whatDomain.py
Normal file
129
customList/whatDomain.py
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
#from nslookup import Nslookup
|
||||||
|
from typing import Optional, Annotated
|
||||||
|
import dns, dns.resolver
|
||||||
|
|
||||||
|
# https://www.codeunderscored.com/nslookup-python/
|
||||||
|
|
||||||
|
def ermWhatATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv4 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'A')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
def ermWhatAAAATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'AAAA')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
def ermWhatPTRTheIpFromDomainYaCrazy(inpIpAddressOrSomething: Annotated[str, "IP address to lookup domain for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
whatToCheck = inpIpAddressOrSomething + ".in-addr.arpa"
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(whatToCheck, 'PTR')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
#print(ermWhatATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatAAAATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatPTRTheIpFromDomainYaCrazy("192.168.1.226"))
|
||||||
BIN
docker.tar.gz
Normal file
BIN
docker.tar.gz
Normal file
Binary file not shown.
0
docker/.env
Normal file
0
docker/.env
Normal file
3
docker/.gitignore
vendored
Normal file
3
docker/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
repo
|
||||||
|
__pycache__
|
||||||
|
.env
|
||||||
41
docker/Dockerfile
Normal file
41
docker/Dockerfile
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# https://docs.docker.com/reference/dockerfile/#environment-replacement
|
||||||
|
ENV DEBMIRRORURL="https://www.debian.org/mirror/list"
|
||||||
|
ENV EXTRAREPOS=True
|
||||||
|
ENV SECURITYREPOS=True
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add python3 py3-pip git
|
||||||
|
# inotify-tools
|
||||||
|
|
||||||
|
RUN mkdir /etc/debmirror
|
||||||
|
WORKDIR /etc/debmirror/
|
||||||
|
|
||||||
|
RUN git clone https://tea.shupogaki.org/YuruC3/Repo-IP-lists && \
|
||||||
|
ln -s /etc/debmirror/Repo-IP-lists/MirrorListV4 /etc/debmirror/MirrorListV4 && \
|
||||||
|
ln -s /etc/debmirror/Repo-IP-lists/MirrorListV6 /etc/debmirror/MirrorListV6 && \
|
||||||
|
ln -s /etc/debmirror/Repo-IP-lists/OPNS_MirrorListV4 /etc/debmirror/OPNS_MirrorListV4 && \
|
||||||
|
ln -s /etc/debmirror/Repo-IP-lists/OPNS_MirrorListV6 /etc/debmirror/OPNS_MirrorListV6
|
||||||
|
|
||||||
|
# RUN touch /etc/debmirror/MirrorListV6 && \
|
||||||
|
# touch /etc/debmirror/MirrorListV4
|
||||||
|
|
||||||
|
COPY mainDocker.py /etc/debmirror/
|
||||||
|
COPY mainOPNsense.py /etc/debmirror/
|
||||||
|
COPY whatDomain.py /etc/debmirror/
|
||||||
|
COPY requirements.txt /etc/debmirror/
|
||||||
|
|
||||||
|
RUN python3 -m venv venv && \
|
||||||
|
venv/bin/python3 -m pip install --upgrade pip && \
|
||||||
|
venv/bin/pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
COPY cron-jobs /etc/crontabs/
|
||||||
|
RUN chmod 0644 /etc/crontabs/cron-jobs && \
|
||||||
|
crontab /etc/crontabs/cron-jobs
|
||||||
|
|
||||||
|
COPY gitPush.sh /etc/debmirror/
|
||||||
|
|
||||||
|
RUN chmod +x /etc/debmirror/gitPush.sh
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/crond", "-f"]
|
||||||
11
docker/cron-jobs
Normal file
11
docker/cron-jobs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# python
|
||||||
|
20 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainOPNsense.py
|
||||||
|
25 */4 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py
|
||||||
|
# 20 19 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainOPNsense.py
|
||||||
|
# 25 19 * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py
|
||||||
|
#*/3 * * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainDocker.py
|
||||||
|
#*/3 * * * * /etc/debmirror/venv/bin/python3 /etc/debmirror/mainOPNsense.py
|
||||||
|
|
||||||
|
# git push
|
||||||
|
30 */4 * * * /bin/sh /etc/debmirror/gitPush.sh
|
||||||
|
#*/1 * * * * /bin/sh /etc/debmirror/gitPush.sh
|
||||||
16
docker/docker-compose.yml
Normal file
16
docker/docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
services:
|
||||||
|
debmirup:
|
||||||
|
container_name: Debian_Mirrors_Updater
|
||||||
|
# build: ./
|
||||||
|
image: yuruc3/debianrepolist:v0.3
|
||||||
|
environment:
|
||||||
|
- DEBMIRRORURL=https://www.debian.org/mirror/list
|
||||||
|
- GITURLPROTO=https
|
||||||
|
- GITURL=tea.shupogaki.org
|
||||||
|
- GITREPOPATH=YuruC3/Repo-IP-lists.git
|
||||||
|
- GITEA_TOKEN=0938a2033324b987bbcb2976b56d147a9a00d8a2
|
||||||
|
- EXTRAREPOS=True
|
||||||
|
- SECURITYREPOS=True
|
||||||
|
restart: unless-stopped
|
||||||
87
docker/gitPush.sh
Normal file
87
docker/gitPush.sh
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
WORKPTH="/etc/debmirror/"
|
||||||
|
REPO_DIR="$WORKPTH/Repo-IP-lists"
|
||||||
|
REPO_URL="${GITURLPROTO}://${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
# Clone repo if not exists
|
||||||
|
if [ ! -d "$REPO_DIR/.git" ]; then
|
||||||
|
echo "[$(date)] Cloning repository..."
|
||||||
|
git clone "$REPO_URL" "$REPO_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$REPO_DIR"
|
||||||
|
|
||||||
|
# Abort previous rebase/cherry-pick if stuck
|
||||||
|
git rebase --abort 2>/dev/null || true
|
||||||
|
git cherry-pick --abort 2>/dev/null || true
|
||||||
|
|
||||||
|
# Make sure we're on a clean 'main'
|
||||||
|
git checkout main || git checkout -b main origin/main
|
||||||
|
git pull --rebase --autostash
|
||||||
|
|
||||||
|
git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
|
||||||
|
git config user.name "UpdateBot"
|
||||||
|
git config user.email "UpdateBot@localhost.local"
|
||||||
|
|
||||||
|
# Stage the files
|
||||||
|
git add MirrorListV4 MirrorListV6 OPNS_MirrorListV4 OPNS_MirrorListV6
|
||||||
|
|
||||||
|
# Only proceed if there are staged changes
|
||||||
|
if ! git diff --quiet --cached; then
|
||||||
|
echo "[$(date)] Committing and pushing changes..."
|
||||||
|
git commit -m "Auto-update mirror list on $(date -Iseconds)"
|
||||||
|
# git pull --rebase --autostash
|
||||||
|
git push --quiet
|
||||||
|
echo "[$(date)] Changes pushed."
|
||||||
|
else
|
||||||
|
echo "[$(date)] No changes to commit or push."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# #!/bin/sh
|
||||||
|
# set -e
|
||||||
|
|
||||||
|
# WORKPTH="/etc/debmirror/"
|
||||||
|
# REPO_DIRd="$WORKPTH/Repo-IP-lists"
|
||||||
|
# REPO_URL="${GITURLPROTO}://${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
|
||||||
|
# # Clone repo only if it doesn't already exist
|
||||||
|
# if [ ! -d "$REPO_DIR/.git" ]; then
|
||||||
|
# echo "[$(date)] Cloning repository..."
|
||||||
|
# git clone "$REPO_URL" "$REPO_DIR"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
||||||
|
# cd "$REPO_DIR"
|
||||||
|
|
||||||
|
# git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}"
|
||||||
|
|
||||||
|
# git config user.name "UpdateBot"
|
||||||
|
# git config user.email "UpdateBot@localhost.local"
|
||||||
|
|
||||||
|
# # stage files
|
||||||
|
# git add MirrorListV4 MirrorListV6 OPNS_MirrorListV4 OPNS_MirrorListV6
|
||||||
|
|
||||||
|
# # If anything to commit locally, commit it now
|
||||||
|
# if ! git diff --quiet --cached; then
|
||||||
|
# echo "[$(date)] Committing local changes before pulling"
|
||||||
|
# git commit -m "Auto-commit before pull on $(date -Iseconds)"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# # Now pull the latest
|
||||||
|
# git pull --rebase --autostash
|
||||||
|
|
||||||
|
# # Commit and push only if there's anything new staged
|
||||||
|
# if git diff --quiet; then
|
||||||
|
# echo "[$(date)] No changes to commit."
|
||||||
|
# else
|
||||||
|
# git commit -a -m "Auto-update mirror list on $(date -Iseconds)" --quiet
|
||||||
|
# git push --quiet
|
||||||
|
# echo "[$(date)] Changes pushed successfully."
|
||||||
|
# fi
|
||||||
|
|
||||||
163
docker/mainDocker.py
Normal file
163
docker/mainDocker.py
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
import requests, schedule, time, os
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from whatDomain import *
|
||||||
|
|
||||||
|
DEBMIRRORURL = str(os.getenv("DEBMIRRORURL", "https://www.debian.org/mirror/list"))
|
||||||
|
DEBSECURITYURL = str(os.getenv("DEBSECURITYURL", "https://security.debian.org/debian-security/"))
|
||||||
|
|
||||||
|
EXTRASURL = ["https://download.docker.com/linux/debian/",
|
||||||
|
# Double just to be sure. Even though they point to the same IP
|
||||||
|
"http://download.proxmox.com/debian/",
|
||||||
|
"https://enterprise.proxmox.com/debian/pve/",
|
||||||
|
# That's for nvidia docker toolkit something something
|
||||||
|
# stuff that makes containers use nvenc and shit
|
||||||
|
"https://nvidia.github.io/libnvidia-container/stable/deb/",
|
||||||
|
"https://nvidia.github.io/libnvidia-container/experimental/deb/"]
|
||||||
|
|
||||||
|
IPv4FILE = "/etc/debmirror/MirrorListV4"
|
||||||
|
IPv6FILE = "/etc/debmirror/MirrorListV6"
|
||||||
|
|
||||||
|
|
||||||
|
# Define EU and American countries as well as Security for security updates
|
||||||
|
target_countries = set([
|
||||||
|
# Europe
|
||||||
|
"Austria", "Belgium", "Bulgaria", "Croatia", "Czech Republic", "Denmark",
|
||||||
|
"Estonia", "Finland", "France", "Germany", "Greece", "Hungary", "Iceland",
|
||||||
|
"Ireland", "Italy", "Latvia", "Lithuania", "Netherlands", "Norway", "Poland",
|
||||||
|
"Portugal", "Romania", "Slovakia", "Slovenia", "Spain", "Sweden", "Switzerland",
|
||||||
|
"United Kingdom", "Moldova",
|
||||||
|
# America
|
||||||
|
"Argentina", "Brazil", "Canada", "Chile", "Colombia", "Costa Rica", "Ecuador",
|
||||||
|
"Mexico", "Peru", "United States", "Uruguay", "Venezuela",
|
||||||
|
# Others
|
||||||
|
"Security", "Extras"
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
def sanitizeURL(inpurl: str):
|
||||||
|
if "https://" in inpurl:
|
||||||
|
outurl = inpurl[8:]
|
||||||
|
elif "http://" in inpurl:
|
||||||
|
outurl = inpurl[7:]
|
||||||
|
elif "http://" or "https://" not in url:
|
||||||
|
outurl = inpurl
|
||||||
|
else:
|
||||||
|
return 1
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
for char in outurl:
|
||||||
|
i += 1
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:i]
|
||||||
|
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:-1]
|
||||||
|
return outurl
|
||||||
|
|
||||||
|
|
||||||
|
def getFreshData():
|
||||||
|
payload = requests.get(DEBMIRRORURL)
|
||||||
|
soup = BeautifulSoup(payload.content, "html.parser")
|
||||||
|
return soup
|
||||||
|
|
||||||
|
|
||||||
|
def sanitizeUrlsGodWhatTheFuckIsThis(SoupInput: BeautifulSoup):
|
||||||
|
|
||||||
|
outMirrorDict = {}
|
||||||
|
current_country = None
|
||||||
|
|
||||||
|
# Iterate through all table rows
|
||||||
|
for table in SoupInput.find_all("table"):
|
||||||
|
for row in table.find_all("tr"):
|
||||||
|
# Check for country name in a full-row header (<strong><big>)
|
||||||
|
strong = row.find("strong")
|
||||||
|
if strong:
|
||||||
|
country_name = strong.get_text(strip=True)
|
||||||
|
if country_name in target_countries:
|
||||||
|
current_country = country_name
|
||||||
|
else:
|
||||||
|
current_country = None
|
||||||
|
continue # move to next row
|
||||||
|
|
||||||
|
# Check for inline country name in first column
|
||||||
|
cols = row.find_all("td")
|
||||||
|
if len(cols) >= 2:
|
||||||
|
possible_country = cols[0].get_text(strip=True)
|
||||||
|
link_tag = cols[1].find("a", href=True)
|
||||||
|
if possible_country in target_countries:
|
||||||
|
current_country = possible_country
|
||||||
|
if current_country and link_tag:
|
||||||
|
url = link_tag['href']
|
||||||
|
if current_country not in outMirrorDict:
|
||||||
|
outMirrorDict[current_country] = []
|
||||||
|
outMirrorDict[current_country].append(url)
|
||||||
|
|
||||||
|
if os.environ["SECURITYREPOS"]:
|
||||||
|
outMirrorDict.update({"Security": DEBSECURITYURL})
|
||||||
|
if os.environ["EXTRAREPOS"]:
|
||||||
|
outMirrorDict.update({"Extras": EXTRASURL})
|
||||||
|
|
||||||
|
return outMirrorDict
|
||||||
|
|
||||||
|
def LeJob():
|
||||||
|
|
||||||
|
print("Starting lookup")
|
||||||
|
|
||||||
|
LeSoup = getFreshData()
|
||||||
|
|
||||||
|
LeMirrorDict = sanitizeUrlsGodWhatTheFuckIsThis(LeSoup)
|
||||||
|
|
||||||
|
# print(LeMirrorDict)
|
||||||
|
|
||||||
|
with open(IPv4FILE, "r",) as fR, open(IPv4FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for key, urls in LeMirrorDict.items():
|
||||||
|
# print(urls)
|
||||||
|
if key in target_countries:
|
||||||
|
|
||||||
|
for url in urls:
|
||||||
|
# print(url)
|
||||||
|
|
||||||
|
if url not in fR:
|
||||||
|
|
||||||
|
goodurl = sanitizeURL(url)
|
||||||
|
# print(goodurl)
|
||||||
|
|
||||||
|
ip4Dict = ermWhatATheIpFromDomainYaCrazy(goodurl)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for key, ip in ip4Dict.items():
|
||||||
|
print(ip)
|
||||||
|
|
||||||
|
fW.write(ip + "/32" + "\n")
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
with open(IPv6FILE, "r",) as fR, open(IPv6FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for key, urls in LeMirrorDict.items():
|
||||||
|
if key in target_countries:
|
||||||
|
|
||||||
|
for url in urls:
|
||||||
|
|
||||||
|
if url not in fR:
|
||||||
|
|
||||||
|
goodurl = sanitizeURL(url)
|
||||||
|
# print(goodurl)
|
||||||
|
|
||||||
|
ip6Dict = ermWhatAAAATheIpFromDomainYaCrazy(goodurl)
|
||||||
|
|
||||||
|
try:
|
||||||
|
for key, ip in ip6Dict.items():
|
||||||
|
# print(ip)
|
||||||
|
|
||||||
|
fW.write(ip + "/128" + "\n")
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LeJob()
|
||||||
|
|
||||||
|
print("Done")
|
||||||
135
docker/mainOPNsense.py
Normal file
135
docker/mainOPNsense.py
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
import requests, schedule, time
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from whatDomain import ermWhatAAAATheIpFromDomainYaCrazy, ermWhatATheIpFromDomainYaCrazy
|
||||||
|
|
||||||
|
|
||||||
|
OPNSNSMIRRORURL = str(os.getenv("OPNSNSMIRRORURL", "https://opnsense.org/download/#full-mirror-listing"))
|
||||||
|
|
||||||
|
IPv4FILE = str(os.getenv("IPv4FILE", "/etc/debmirror/OPNS_MirrorListV4"))
|
||||||
|
IPv6FILE = str(os.getenv("IPv6FILE", "/etc/debmirror/OPNS_MirrorListV6"))
|
||||||
|
|
||||||
|
|
||||||
|
def sanitizeURL(inpurl: str):
|
||||||
|
if not "/" in inpurl[:-1]:
|
||||||
|
inpurl += "/"
|
||||||
|
if "https://" in inpurl:
|
||||||
|
outurl = inpurl[8:]
|
||||||
|
elif "http://" in inpurl:
|
||||||
|
outurl = inpurl[7:]
|
||||||
|
elif "http://" or "https://" not in url:
|
||||||
|
outurl = inpurl
|
||||||
|
else:
|
||||||
|
return -1
|
||||||
|
|
||||||
|
# how the fuck does it work?
|
||||||
|
# I mean I wrote this but I don't know why does it work.
|
||||||
|
i = 0
|
||||||
|
for char in outurl:
|
||||||
|
i += 1
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:i]
|
||||||
|
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:-1]
|
||||||
|
return outurl
|
||||||
|
|
||||||
|
|
||||||
|
def getFreshData():
|
||||||
|
payload = requests.get(OPNSNSMIRRORURL)
|
||||||
|
soup = BeautifulSoup(payload.content, "html.parser")
|
||||||
|
return soup
|
||||||
|
|
||||||
|
def LeJob():
|
||||||
|
|
||||||
|
print("Starting lookup")
|
||||||
|
|
||||||
|
LeSoup = getFreshData()
|
||||||
|
|
||||||
|
# print(LeMirrorDict)
|
||||||
|
|
||||||
|
with open(IPv4FILE, "r",) as fR, open(IPv4FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for data in LeSoup.find_all('div', class_='download_section'):
|
||||||
|
for a in data.find_all('a', href=True):
|
||||||
|
|
||||||
|
url = a['href']
|
||||||
|
|
||||||
|
saniturl = sanitizeURL(url)
|
||||||
|
|
||||||
|
# print(saniturl)
|
||||||
|
IPv4Dict = ermWhatATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
|
||||||
|
# print(IPv4Dict)
|
||||||
|
try:
|
||||||
|
for key, ip in IPv4Dict.items():
|
||||||
|
print(f"Found the ipv4: {ip}")
|
||||||
|
fW.write(ip + "/32" + "\n")
|
||||||
|
|
||||||
|
# If int returned from WhatDomain then it is error.
|
||||||
|
# Error type is described via prints from whatdomain functions
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
with open(IPv6FILE, "r",) as fR, open(IPv6FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for data in LeSoup.find_all('div', class_='download_section'):
|
||||||
|
for a in data.find_all('a', href=True):
|
||||||
|
|
||||||
|
url = a['href']
|
||||||
|
|
||||||
|
saniturl = sanitizeURL(url)
|
||||||
|
|
||||||
|
# print(saniturl)
|
||||||
|
IPv6Dict = ermWhatAAAATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
|
||||||
|
# print(IPv6Dict)
|
||||||
|
try:
|
||||||
|
for key, ip in IPv6Dict.items():
|
||||||
|
print(f"Found the ipv6: {ip}")
|
||||||
|
fW.write(ip + "/128" + "\n")
|
||||||
|
|
||||||
|
# If int returned from WhatDomain then it is error.
|
||||||
|
# Error type is described via prints from whatdomain functions
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# schedule.every().day.at("12:45").do(LeJob)
|
||||||
|
# schedule.every().day.at("17:44").do(LeJob)
|
||||||
|
|
||||||
|
# while True:
|
||||||
|
# schedule.run_pending()
|
||||||
|
# print("Waiting...")
|
||||||
|
# time.sleep(30) #Wait one minute
|
||||||
|
# # LeJob()
|
||||||
|
|
||||||
|
LeJob()
|
||||||
|
|
||||||
|
# gigalist = []
|
||||||
|
|
||||||
|
# payload = requests.get(OPNSNSMIRRORURL)
|
||||||
|
# soup = BeautifulSoup(payload.content, "html.parser")
|
||||||
|
|
||||||
|
|
||||||
|
# for data in soup.find_all('div', class_='download_section'):
|
||||||
|
# for a in data.find_all('a', href=True):
|
||||||
|
|
||||||
|
# url = a['href']
|
||||||
|
|
||||||
|
# saniturl = sanitizeURL(url)
|
||||||
|
|
||||||
|
# # print(saniturl)
|
||||||
|
# IPv4Dict = ermWhatATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
# IPv6Dict = ermWhatAAAATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
|
||||||
|
# # print(IPv4Dict)
|
||||||
|
# try:
|
||||||
|
# for key, ip in IPv4Dict.items():
|
||||||
|
# print(f"Found the ipv4: {ip}")
|
||||||
|
|
||||||
|
# for key, ip in IPv6Dict.items():
|
||||||
|
# print(f"Found the ipv6: {ip}")
|
||||||
|
# # If int returned from WhatDomain then it is error.
|
||||||
|
# # Error type is described via prints from whatdomain functions
|
||||||
|
# except AttributeError:
|
||||||
|
# continue
|
||||||
|
|
||||||
4
docker/requirements.txt
Normal file
4
docker/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
beautifulsoup4==4.13.4
|
||||||
|
requests==2.32.3
|
||||||
|
schedule==1.2.2
|
||||||
|
nslookup==1.8.1
|
||||||
129
docker/whatDomain.py
Normal file
129
docker/whatDomain.py
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
#from nslookup import Nslookup
|
||||||
|
from typing import Optional, Annotated
|
||||||
|
import dns, dns.resolver
|
||||||
|
|
||||||
|
# https://www.codeunderscored.com/nslookup-python/
|
||||||
|
|
||||||
|
def ermWhatATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv4 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'A')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
def ermWhatAAAATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'AAAA')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
def ermWhatPTRTheIpFromDomainYaCrazy(inpIpAddressOrSomething: Annotated[str, "IP address to lookup domain for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
whatToCheck = inpIpAddressOrSomething + ".in-addr.arpa"
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(whatToCheck, 'PTR')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
#print(ermWhatATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatAAAATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatPTRTheIpFromDomainYaCrazy("192.168.1.226"))
|
||||||
256
mirrors.json
256
mirrors.json
@@ -1,256 +0,0 @@
|
|||||||
[
|
|
||||||
"atl.mirrors.clouvider.net",
|
|
||||||
"de.mirrors.clouvider.net",
|
|
||||||
"deb-mir1.naitways.net",
|
|
||||||
"deb.bbxnet.sk",
|
|
||||||
"deb.syxpi.fr",
|
|
||||||
"debian-archive.trafficmanager.net",
|
|
||||||
"debian-mirror.behostings.net",
|
|
||||||
"debian.a1.bg",
|
|
||||||
"debian.anexia.at",
|
|
||||||
"debian.apt-mirror.de",
|
|
||||||
"debian.carnet.hr",
|
|
||||||
"debian.cc.lehigh.edu",
|
|
||||||
"debian.charite.de",
|
|
||||||
"debian.connesi.it",
|
|
||||||
"debian.cs.binghamton.edu",
|
|
||||||
"debian.csail.mit.edu",
|
|
||||||
"debian.dynamica.it",
|
|
||||||
"debian.ethz.ch",
|
|
||||||
"debian.grn.cat",
|
|
||||||
"debian.inf.tu-dresden.de",
|
|
||||||
"debian.intergenia.de",
|
|
||||||
"debian.ipacct.com",
|
|
||||||
"debian.iskon.hr",
|
|
||||||
"debian.koyanet.lv",
|
|
||||||
"debian.lagis.at",
|
|
||||||
"debian.lth.se",
|
|
||||||
"debian.ludost.net",
|
|
||||||
"debian.mirror.constant.com",
|
|
||||||
"debian.mirror.garr.it",
|
|
||||||
"debian.mirror.iphh.net",
|
|
||||||
"debian.mirror.lrz.de",
|
|
||||||
"debian.mirror.root.lu",
|
|
||||||
"debian.mirror.su.se",
|
|
||||||
"debian.mirror.uk.sargasso.net",
|
|
||||||
"debian.mirror.vu.lt",
|
|
||||||
"debian.mirror.web4u.cz",
|
|
||||||
"debian.mirrors.ovh.net",
|
|
||||||
"debian.mirrors.uk2.net",
|
|
||||||
"debian.mnet.bg",
|
|
||||||
"debian.mur.at",
|
|
||||||
"debian.netcologne.de",
|
|
||||||
"debian.obspm.fr",
|
|
||||||
"debian.osuosl.org",
|
|
||||||
"debian.otenet.gr",
|
|
||||||
"debian.polytech-lille.fr",
|
|
||||||
"debian.proxad.net",
|
|
||||||
"debian.redimadrid.es",
|
|
||||||
"debian.redparra.com",
|
|
||||||
"debian.sil.at",
|
|
||||||
"debian.snt.utwente.nl",
|
|
||||||
"debian.superhosting.cz",
|
|
||||||
"debian.telecoms.bg",
|
|
||||||
"debian.tu-bs.de",
|
|
||||||
"debian.uchicago.edu",
|
|
||||||
"debian.uevora.pt",
|
|
||||||
"debian.univ-tlse2.fr",
|
|
||||||
"debian.uvigo.es",
|
|
||||||
"debian.web.trex.fi",
|
|
||||||
"drmirror.physi.uni-heidelberg.de",
|
|
||||||
"free.hands.com",
|
|
||||||
"ftp-stud.hs-esslingen.de",
|
|
||||||
"ftp.acc.umu.se",
|
|
||||||
"ftp.agh.edu.pl",
|
|
||||||
"ftp.antik.sk",
|
|
||||||
"ftp.at.debian.org",
|
|
||||||
"ftp.be.debian.org",
|
|
||||||
"ftp.belnet.be",
|
|
||||||
"ftp.bg.debian.org",
|
|
||||||
"ftp.bme.hu",
|
|
||||||
"ftp.caliu.cat",
|
|
||||||
"ftp.ch.debian.org",
|
|
||||||
"ftp.cica.es",
|
|
||||||
"ftp.cvut.cz",
|
|
||||||
"ftp.cz.debian.org",
|
|
||||||
"ftp.de.debian.org",
|
|
||||||
"ftp.debian.cz",
|
|
||||||
"ftp.debian.org",
|
|
||||||
"ftp.debian.sk",
|
|
||||||
"ftp.dk.debian.org",
|
|
||||||
"ftp.ec-m.fr",
|
|
||||||
"ftp.eq.uc.pt",
|
|
||||||
"ftp.es.debian.org",
|
|
||||||
"ftp.fau.de",
|
|
||||||
"ftp.fi.debian.org",
|
|
||||||
"ftp.fr.debian.org",
|
|
||||||
"ftp.gwdg.de",
|
|
||||||
"ftp.halifax.rwth-aachen.de",
|
|
||||||
"ftp.hosteurope.de",
|
|
||||||
"ftp.hr.debian.org",
|
|
||||||
"ftp.icm.edu.pl",
|
|
||||||
"ftp.is.debian.org",
|
|
||||||
"ftp.it.debian.org",
|
|
||||||
"ftp.linux.it",
|
|
||||||
"ftp.linux.org.tr",
|
|
||||||
"ftp.lip6.fr",
|
|
||||||
"ftp.lt.debian.org",
|
|
||||||
"ftp.nl.debian.org",
|
|
||||||
"ftp.no.debian.org",
|
|
||||||
"ftp.nz.debian.org",
|
|
||||||
"ftp.pl.debian.org",
|
|
||||||
"ftp.psnc.pl",
|
|
||||||
"ftp.pt.debian.org",
|
|
||||||
"ftp.rezopole.net",
|
|
||||||
"ftp.rnl.tecnico.ulisboa.pt",
|
|
||||||
"ftp.se.debian.org",
|
|
||||||
"ftp.sh.cvut.cz",
|
|
||||||
"ftp.si.debian.org",
|
|
||||||
"ftp.sk.debian.org",
|
|
||||||
"ftp.stw-bonn.de",
|
|
||||||
"ftp.task.gda.pl",
|
|
||||||
"ftp.ticklers.org",
|
|
||||||
"ftp.tr.debian.org",
|
|
||||||
"ftp.tu-chemnitz.de",
|
|
||||||
"ftp.tu-clausthal.de",
|
|
||||||
"ftp.tu-graz.ac.at",
|
|
||||||
"ftp.u-picardie.fr",
|
|
||||||
"ftp.u-strasbg.fr",
|
|
||||||
"ftp.udc.es",
|
|
||||||
"ftp.uio.no",
|
|
||||||
"ftp.uk.debian.org",
|
|
||||||
"ftp.uni-bayreuth.de",
|
|
||||||
"ftp.uni-hannover.de",
|
|
||||||
"ftp.uni-kl.de",
|
|
||||||
"ftp.uni-mainz.de",
|
|
||||||
"ftp.uni-sofia.bg",
|
|
||||||
"ftp.uni-stuttgart.de",
|
|
||||||
"ftp.univ-pau.fr",
|
|
||||||
"ftp.us.debian.org",
|
|
||||||
"ftp.wrz.de",
|
|
||||||
"ftp.zcu.cz",
|
|
||||||
"ftp2.de.debian.org",
|
|
||||||
"ftpmirror1.infania.net",
|
|
||||||
"giano.com.dist.unige.it",
|
|
||||||
"is.mirror.flokinet.net",
|
|
||||||
"la.mirrors.clouvider.net",
|
|
||||||
"lethe.chinstrap.org",
|
|
||||||
"lidsol.fi-b.unam.mx",
|
|
||||||
"linux.purple-cat.net",
|
|
||||||
"linuxsoft.cern.ch",
|
|
||||||
"merlin.fit.vutbr.cz",
|
|
||||||
"miroir.univ-lorraine.fr",
|
|
||||||
"mirror.0x626b.com",
|
|
||||||
"mirror.23m.com",
|
|
||||||
"mirror.alwyzon.net",
|
|
||||||
"mirror.ams.macarne.com",
|
|
||||||
"mirror.as35701.net",
|
|
||||||
"mirror.bgp.rodeo",
|
|
||||||
"mirror.braindrainlan.nu",
|
|
||||||
"mirror.cloudhosting.lv",
|
|
||||||
"mirror.cogentco.com",
|
|
||||||
"mirror.cov.ukservers.com",
|
|
||||||
"mirror.creoline.net",
|
|
||||||
"mirror.dal.nexril.net",
|
|
||||||
"mirror.de.leaseweb.net",
|
|
||||||
"mirror.debian.ikoula.com",
|
|
||||||
"mirror.dkm.cz",
|
|
||||||
"mirror.dogado.de",
|
|
||||||
"mirror.duocast.net",
|
|
||||||
"mirror.eu.oneandone.net",
|
|
||||||
"mirror.flo.c-f.ro",
|
|
||||||
"mirror.fsmg.org.nz",
|
|
||||||
"mirror.gitoyen.net",
|
|
||||||
"mirror.i3d.net",
|
|
||||||
"mirror.ibcp.fr",
|
|
||||||
"mirror.informatik.tu-freiberg.de",
|
|
||||||
"mirror.init7.net",
|
|
||||||
"mirror.ipb.de",
|
|
||||||
"mirror.it4i.cz",
|
|
||||||
"mirror.iway.ch",
|
|
||||||
"mirror.johnnybegood.fr",
|
|
||||||
"mirror.keystealth.org",
|
|
||||||
"mirror.lchost.net",
|
|
||||||
"mirror.leitecastro.com",
|
|
||||||
"mirror.linux.ro",
|
|
||||||
"mirror.litnet.lt",
|
|
||||||
"mirror.mythic-beasts.com",
|
|
||||||
"mirror.netzwerge.de",
|
|
||||||
"mirror.nforce.com",
|
|
||||||
"mirror.nl.cdn-perfprod.com",
|
|
||||||
"mirror.nl.datapacket.com",
|
|
||||||
"mirror.nl.leaseweb.net",
|
|
||||||
"mirror.nl.mirhosting.net",
|
|
||||||
"mirror.one.com",
|
|
||||||
"mirror.ox.ac.uk",
|
|
||||||
"mirror.plusline.net",
|
|
||||||
"mirror.plusserver.com",
|
|
||||||
"mirror.pmf.kg.ac.rs",
|
|
||||||
"mirror.positive-internet.com",
|
|
||||||
"mirror.raiolanetworks.com",
|
|
||||||
"mirror.ro.cdn-perfprod.com",
|
|
||||||
"mirror.rustytel.net",
|
|
||||||
"mirror.sinavps.ch",
|
|
||||||
"mirror.steadfast.net",
|
|
||||||
"mirror.telepoint.bg",
|
|
||||||
"mirror.timkevin.us",
|
|
||||||
"mirror.tngnet.com",
|
|
||||||
"mirror.united-gameserver.de",
|
|
||||||
"mirror.units.it",
|
|
||||||
"mirror.unix-solutions.be",
|
|
||||||
"mirror.us.leaseweb.net",
|
|
||||||
"mirror.us.mirhosting.net",
|
|
||||||
"mirror.us.oneandone.net",
|
|
||||||
"mirror.veesp.com",
|
|
||||||
"mirror.vinehost.net",
|
|
||||||
"mirror.vorboss.net",
|
|
||||||
"mirror.vpgrp.io",
|
|
||||||
"mirror.vpsnet.com",
|
|
||||||
"mirror.wtnet.de",
|
|
||||||
"mirror1.infomaniak.com",
|
|
||||||
"mirror2.infomaniak.com",
|
|
||||||
"mirrors.accretive-networks.net",
|
|
||||||
"mirrors.bloomu.edu",
|
|
||||||
"mirrors.bmcc.edu",
|
|
||||||
"mirrors.coreix.net",
|
|
||||||
"mirrors.dotsrc.org",
|
|
||||||
"mirrors.glesys.net",
|
|
||||||
"mirrors.hosterion.ro",
|
|
||||||
"mirrors.hostico.ro",
|
|
||||||
"mirrors.hostiserver.com",
|
|
||||||
"mirrors.ircam.fr",
|
|
||||||
"mirrors.iu13.net",
|
|
||||||
"mirrors.lug.mtu.edu",
|
|
||||||
"mirrors.mwcampbell.us",
|
|
||||||
"mirrors.namecheap.com",
|
|
||||||
"mirrors.nav.ro",
|
|
||||||
"mirrors.netix.net",
|
|
||||||
"mirrors.nic.cz",
|
|
||||||
"mirrors.nxthost.com",
|
|
||||||
"mirrors.ocf.berkeley.edu",
|
|
||||||
"mirrors.pidginhost.com",
|
|
||||||
"mirrors.rackhosting.com",
|
|
||||||
"mirrors.vcea.wsu.edu",
|
|
||||||
"mirrors.wikimedia.org",
|
|
||||||
"mirrors.xtom.com",
|
|
||||||
"mirrors.xtom.de",
|
|
||||||
"mirrors.xtom.ee",
|
|
||||||
"mirrors.xtom.nl",
|
|
||||||
"mirrorservice.org",
|
|
||||||
"nl.mirror.flokinet.net",
|
|
||||||
"nl.mirrors.clouvider.net",
|
|
||||||
"nyc.mirrors.clouvider.net",
|
|
||||||
"packages.hs-regensburg.de",
|
|
||||||
"pkg.adfinis-on-exoscale.ch",
|
|
||||||
"plug-mirror.rcac.purdue.edu",
|
|
||||||
"pubmirror.plutex.de",
|
|
||||||
"repo.ialab.dsu.edu",
|
|
||||||
"repo.ifca.es",
|
|
||||||
"repo.jztkft.hu",
|
|
||||||
"ro.mirror.flokinet.net",
|
|
||||||
"softlibre.unizar.es",
|
|
||||||
"uk.mirrors.clouvider.net",
|
|
||||||
"ulises.hostalia.com",
|
|
||||||
"us.mirror.ahrefs.org",
|
|
||||||
"www.nic.funet.fi"
|
|
||||||
]
|
|
||||||
2
opnsense/.gitignore
vendored
Normal file
2
opnsense/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
__pycache__
|
||||||
|
test
|
||||||
52
opnsense/OPNS_MirrorListV4
Normal file
52
opnsense/OPNS_MirrorListV4
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
202.158.214.106/32
|
||||||
|
200.201.197.203/32
|
||||||
|
178.157.61.30/32
|
||||||
|
216.24.182.173/32
|
||||||
|
162.105.120.100/32
|
||||||
|
104.21.112.1/32
|
||||||
|
104.21.16.1/32
|
||||||
|
104.21.32.1/32
|
||||||
|
104.21.48.1/32
|
||||||
|
104.21.64.1/32
|
||||||
|
104.21.80.1/32
|
||||||
|
104.21.96.1/32
|
||||||
|
130.225.254.116/32
|
||||||
|
46.32.144.253/32
|
||||||
|
201.159.221.67/32
|
||||||
|
201.159.221.67/32
|
||||||
|
172.67.206.93/32
|
||||||
|
104.21.22.179/32
|
||||||
|
141.98.136.67/32
|
||||||
|
37.208.104.98/32
|
||||||
|
37.58.58.140/32
|
||||||
|
147.52.159.50/32
|
||||||
|
180.151.236.94/32
|
||||||
|
78.39.136.13/32
|
||||||
|
121.141.119.252/32
|
||||||
|
121.141.34.226/32
|
||||||
|
121.171.109.2/32
|
||||||
|
220.118.162.155/32
|
||||||
|
220.118.162.15/32
|
||||||
|
211.205.104.177/32
|
||||||
|
112.222.241.182/32
|
||||||
|
112.164.39.61/32
|
||||||
|
221.138.103.74/32
|
||||||
|
221.142.142.68/32
|
||||||
|
121.159.44.64/32
|
||||||
|
196.200.160.70/32
|
||||||
|
150.242.40.7/32
|
||||||
|
23.147.168.189/32
|
||||||
|
91.132.103.246/32
|
||||||
|
46.235.145.153/32
|
||||||
|
109.202.202.202/32
|
||||||
|
212.237.209.20/32
|
||||||
|
163.22.168.137/32
|
||||||
|
5.79.108.33/32
|
||||||
|
185.28.39.100/32
|
||||||
|
89.149.222.99/32
|
||||||
|
193.162.43.250/32
|
||||||
|
212.219.56.184/32
|
||||||
|
66.111.2.15/32
|
||||||
|
207.244.94.80/32
|
||||||
|
209.58.135.187/32
|
||||||
|
169.229.200.70/32
|
||||||
31
opnsense/OPNS_MirrorListV6
Normal file
31
opnsense/OPNS_MirrorListV6
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
2001:388:30bc:cafe::beef/128
|
||||||
|
2001:da8:201:1120::a269:7864/128
|
||||||
|
2606:4700:3030::6815:7001/128
|
||||||
|
2606:4700:3030::6815:1001/128
|
||||||
|
2606:4700:3030::6815:2001/128
|
||||||
|
2606:4700:3030::6815:3001/128
|
||||||
|
2606:4700:3030::6815:4001/128
|
||||||
|
2606:4700:3030::6815:5001/128
|
||||||
|
2606:4700:3030::6815:6001/128
|
||||||
|
2001:878:346::116/128
|
||||||
|
2001:470:dd11:1337:d0cd:bfff:feaa:fb37/128
|
||||||
|
2800:68:0:bebe::3/128
|
||||||
|
2606:4700:3036::ac43:ce5d/128
|
||||||
|
2606:4700:3034::6815:16b3/128
|
||||||
|
2a09:11c0:1200:210:ffff:ffff:8d62:8843/128
|
||||||
|
2a00:d0c0:d::100/128
|
||||||
|
2a00:c98:2030:a034::21/128
|
||||||
|
2001:648:2c00:6c08::2/128
|
||||||
|
2001:4310:f1::70/128
|
||||||
|
2602:faa5:189::/128
|
||||||
|
2602:faa5:190::/128
|
||||||
|
2a12:d282:102:f6::1/128
|
||||||
|
2a00:d08:1:c::153/128
|
||||||
|
2001:1620::1620/128
|
||||||
|
2a03:da40:2::20/128
|
||||||
|
2001:1af8:4700:b210::33/128
|
||||||
|
2001:1af8:5300:a010:1::1/128
|
||||||
|
2001:630:341:12::184/128
|
||||||
|
2604:9a00:2010:a0b8::5/128
|
||||||
|
2605:fe80:2100:b001::5187/128
|
||||||
|
2607:f140:0:32::70/128
|
||||||
187
opnsense/main.log
Normal file
187
opnsense/main.log
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
[<div class="download_section">
|
||||||
|
<h2>Australia</h2>
|
||||||
|
<h3><a href="https://mirror.aarnet.edu.au/pub/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="AARNet Pty Ltd">AARNet Pty Ltd</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Brazil</h2>
|
||||||
|
<h3><a href="https://mirror.cloudfence.com.br/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Cloudfence">Cloudfence</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>China</h2>
|
||||||
|
<h3><a href="https://opnsense.aivian.org/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Aivian">Aivian</a></h3>
|
||||||
|
<h3><a href="https://mirrors.pku.edu.cn/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Peking University open source software mirror">Peking University open source software mirror</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Colombia</h2>
|
||||||
|
<h3><a href="https://mirror.venturasystems.tech/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Ventura Systems">Ventura Systems</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Denmark</h2>
|
||||||
|
<h3><a href="https://mirrors.dotsrc.org/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Aalborg University">Aalborg University</a></h3>
|
||||||
|
<h3><a href="https://opnsense.c0urier.net/releases/mirror/" rel="noopener noreferrer" target="_blank" title="c0urier.net">c0urier.net</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Ecuador</h2>
|
||||||
|
<h3><a href="https://mirror.cedia.org.ec/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="CEDIA">CEDIA</a></h3>
|
||||||
|
<h3><a href="https://mirror.ueb.edu.ec/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Universidad Estatal de Bolívar">Universidad Estatal de Bolívar</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>France</h2>
|
||||||
|
<h3><a href="https://mirror.vraphim.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Vraphim">Vraphim</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Germany</h2>
|
||||||
|
<h3><a href="https://mirror.dns-root.de/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="dns-root.de (Cloudflare CDN)">dns-root.de (Cloudflare CDN)</a></h3>
|
||||||
|
<h3><a href="https://mirror.level66.network/opnsense-dist/releases/mirror/" rel="noopener noreferrer" target="_blank" title="level66.network">level66.network</a></h3>
|
||||||
|
<h3><a href="https://mirror.uvensys.de/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="uvensys GmbH">uvensys GmbH</a></h3>
|
||||||
|
<h3><a href="https://mirror.fra10.de.leaseweb.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="LeaseWeb">LeaseWeb</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Greece</h2>
|
||||||
|
<h3><a href="https://ftp.cc.uoc.gr/mirrors/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="University of Crete / Department of Physics">University of Crete / Department of Physics</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Hungary</h2>
|
||||||
|
<h3><a href="https://quantum-mirror.hu/mirrors/pub/opnsense" rel="noopener noreferrer" target="_blank" title="Quantum Mirror">Quantum Mirror</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>India</h2>
|
||||||
|
<h3><a href="https://mirrors.hopbox.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Hopbox">Hopbox</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Iran</h2>
|
||||||
|
<h3><a href="https://mirror1.isatisidc.ir/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Isatis Data Center (isatisidc.ir)">Isatis Data Center (isatisidc.ir)</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Korea</h2>
|
||||||
|
<h3><a href="https://mirror.amuksa.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="DAXNET, ROKFOSS PROJECT">DAXNET, ROKFOSS PROJECT</a></h3>
|
||||||
|
<h3><a href="https://mirror.techlabs.co.kr/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Techlabs, ROKFOSS PROJECT">Techlabs, ROKFOSS PROJECT</a></h3>
|
||||||
|
<h3><a href="https://mirror.zzunipark.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Zzunimirror, ROKFOSS PROJECT">Zzunimirror, ROKFOSS PROJECT</a></h3>
|
||||||
|
<h3><a href="https://mirror.hemino.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="HMirror, ROKFOSS PROJECT">HMirror, ROKFOSS PROJECT</a></h3>
|
||||||
|
<h3><a href="https://mirror.keiminem.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Keiverse (Gumi, South Korea)">Keiverse (Gumi, South Korea)</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Morocco</h2>
|
||||||
|
<h3><a href="https://mirror.marwan.ma/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="MARWAN, Rabat">MARWAN, Rabat</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>New Zealand</h2>
|
||||||
|
<h3><a href="https://mirror.catalyst.net.nz/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="catalyst.net Ltd.">catalyst.net Ltd.</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Portugal</h2>
|
||||||
|
<h3><a href="https://mirror.leitecastro.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Community (Lisbon)">Community (Lisbon)</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Spain</h2>
|
||||||
|
<h3><a href="https://mirror.raiolanetworks.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Raiola Networks (Madrid)">Raiola Networks (Madrid)</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Switzerland</h2>
|
||||||
|
<h3><a href="https://opnsense-mirror.hiho.ch/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Hiho.ch">Hiho.ch</a></h3>
|
||||||
|
<h3><a href="https://mirror.init7.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Init7">Init7</a></h3>
|
||||||
|
<h3><a href="https://mirror-opnsense.serverbase.ch/releases/mirror/" rel="noopener noreferrer" target="_blank" title="ServerBase AG">ServerBase AG</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Taiwan</h2>
|
||||||
|
<h3><a href="https://mirror.ntct.edu.tw/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Nantou County Education Network Center">Nantou County Education Network Center</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>The Netherlands</h2>
|
||||||
|
<h3><a href="https://mirror.ams1.nl.leaseweb.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="LeaseWeb">LeaseWeb</a></h3>
|
||||||
|
<h3><a href="https://mirror.serverion.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Serverion">Serverion</a></h3>
|
||||||
|
<h3><a href="https://pkg.opnsense.org/releases/mirror/" rel="noopener noreferrer" target="_blank" title="OPNsense">OPNsense</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>Turkey</h2>
|
||||||
|
<h3><a href="https://mirror.verinomi.com/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="Verinomi">Verinomi</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>United Kingdom</h2>
|
||||||
|
<h3><a href="https://www.mirrorservice.org/sites/opnsense.org/releases/mirror/" rel="noopener noreferrer" target="_blank" title="University of Kent">University of Kent</a></h3>
|
||||||
|
</div>, <div class="download_section">
|
||||||
|
<h2>United States</h2>
|
||||||
|
<h3><a href="https://mirrors.nycbug.org/pub/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="NYC*BUG (East Coast)">NYC*BUG (East Coast)</a></h3>
|
||||||
|
<h3><a href="https://mirror.wdc1.us.leaseweb.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="LeaseWeb (East Coast)">LeaseWeb (East Coast)</a></h3>
|
||||||
|
<h3><a href="https://mirror.sfo12.us.leaseweb.net/opnsense/releases/mirror/" rel="noopener noreferrer" target="_blank" title="LeaseWeb (West Coast)">LeaseWeb (West Coast)</a></h3>
|
||||||
|
<h3><a href="https://mirrors.ocf.berkeley.edu/opnsense/" rel="noopener noreferrer" target="_blank" title="Open Computing Facility at UC Berkeley (Berkeley, California)">Open Computing Facility at UC Berkeley (Berkeley, California)</a></h3>
|
||||||
|
</div>]
|
||||||
|
Found the URL: https://opnsense.org
|
||||||
|
Found the URL: /
|
||||||
|
Found the URL: #
|
||||||
|
Found the URL: https://opnsense.org/get-started/
|
||||||
|
Found the URL: #
|
||||||
|
Found the URL: https://opnsense.org/blog/
|
||||||
|
Found the URL: https://shop.opnsense.com/
|
||||||
|
Found the URL: https://opnsense.org/download/
|
||||||
|
Found the URL: https://opnsense.org/opnsense/
|
||||||
|
Found the URL: https://opnsense.org/roadmap/
|
||||||
|
Found the URL: https://opnsense.org/features/
|
||||||
|
Found the URL: https://opnsense.org/partners/
|
||||||
|
Found the URL: https://opnsense.org/legal-guidelines/
|
||||||
|
Found the URL: https://opnsense.org/contact/
|
||||||
|
Found the URL: https://opnsense.org/get-started/
|
||||||
|
Found the URL: https://docs.opnsense.org/
|
||||||
|
Found the URL: https://opnsense.org/your-invited/
|
||||||
|
Found the URL: http://forum.opnsense.org/
|
||||||
|
Found the URL: https://docs.opnsense.org/
|
||||||
|
Found the URL: https://opnsense.org/donate/
|
||||||
|
Found the URL: mailto:project@opnsense.org
|
||||||
|
Found the URL: /
|
||||||
|
Found the URL: #
|
||||||
|
Found the URL: https://opnsense.org/opnsense/
|
||||||
|
Found the URL: https://opnsense.org/roadmap/
|
||||||
|
Found the URL: https://opnsense.org/features/
|
||||||
|
Found the URL: https://opnsense.org/partners/
|
||||||
|
Found the URL: https://opnsense.org/legal-guidelines/
|
||||||
|
Found the URL: https://opnsense.org/contact/
|
||||||
|
Found the URL: https://opnsense.org/get-started/
|
||||||
|
Found the URL: https://opnsense.org/get-started/
|
||||||
|
Found the URL: https://docs.opnsense.org/
|
||||||
|
Found the URL: #
|
||||||
|
Found the URL: https://opnsense.org/your-invited/
|
||||||
|
Found the URL: http://forum.opnsense.org/
|
||||||
|
Found the URL: https://docs.opnsense.org/
|
||||||
|
Found the URL: https://opnsense.org/donate/
|
||||||
|
Found the URL: https://opnsense.org/blog/
|
||||||
|
Found the URL: https://shop.opnsense.com/
|
||||||
|
Found the URL: https://opnsense.org/download/
|
||||||
|
Found the URL: https://opnsense.org/
|
||||||
|
Found the URL: https://opnsense.org/donate/
|
||||||
|
Found the URL: https://mirror.ams1.nl.leaseweb.net/opnsense/releases/25.1/OPNsense-25.1-dvd-amd64.iso.bz2
|
||||||
|
Found the URL: #full-mirror-listing
|
||||||
|
Found the URL: https://docs.opnsense.org/manual/install.html#download-and-verification
|
||||||
|
Found the URL: https://shop.opnsense.com/product/opnsense-business-edition/
|
||||||
|
Found the URL: https://www.amazon.de/Practical-OPNsense-Building-Enterprise-Firewalls/dp/3757805364/
|
||||||
|
Found the URL: https://shop.opnsense.com/product/opnsense-business-edition/
|
||||||
|
Found the URL: https://mynetworktraining.com/p/official-opnsense-introduction-course
|
||||||
|
Found the URL: https://mirror.aarnet.edu.au/pub/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.cloudfence.com.br/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://opnsense.aivian.org/releases/mirror/
|
||||||
|
Found the URL: https://mirrors.pku.edu.cn/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.venturasystems.tech/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirrors.dotsrc.org/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://opnsense.c0urier.net/releases/mirror/
|
||||||
|
Found the URL: https://mirror.cedia.org.ec/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.ueb.edu.ec/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.vraphim.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.dns-root.de/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.level66.network/opnsense-dist/releases/mirror/
|
||||||
|
Found the URL: https://mirror.uvensys.de/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.fra10.de.leaseweb.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://ftp.cc.uoc.gr/mirrors/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://quantum-mirror.hu/mirrors/pub/opnsense
|
||||||
|
Found the URL: https://mirrors.hopbox.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror1.isatisidc.ir/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.amuksa.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.techlabs.co.kr/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.zzunipark.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.hemino.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.keiminem.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.marwan.ma/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.catalyst.net.nz/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.leitecastro.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.raiolanetworks.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://opnsense-mirror.hiho.ch/releases/mirror/
|
||||||
|
Found the URL: https://mirror.init7.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror-opnsense.serverbase.ch/releases/mirror/
|
||||||
|
Found the URL: https://mirror.ntct.edu.tw/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.ams1.nl.leaseweb.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.serverion.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://pkg.opnsense.org/releases/mirror/
|
||||||
|
Found the URL: https://mirror.verinomi.com/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://www.mirrorservice.org/sites/opnsense.org/releases/mirror/
|
||||||
|
Found the URL: https://mirrors.nycbug.org/pub/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.wdc1.us.leaseweb.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirror.sfo12.us.leaseweb.net/opnsense/releases/mirror/
|
||||||
|
Found the URL: https://mirrors.ocf.berkeley.edu/opnsense/
|
||||||
|
Found the URL: mailto:project@opnsense.org
|
||||||
|
Found the URL: mailto:sales@opnsense.com
|
||||||
|
Found the URL: https://forum.opnsense.org/
|
||||||
|
Found the URL: https://web-cdn.bsky.app/profile/did:plc:vpna73dxrqinj6ttwh3wryxv
|
||||||
|
Found the URL: https://www.linkedin.com/groups/6958160/
|
||||||
|
Found the URL: https://www.reddit.com/r/opnsense/?rdt=38653
|
||||||
|
Found the URL: https://github.com/opnsense
|
||||||
|
Found the URL: /donate
|
||||||
|
Found the URL: https://deciso.com
|
||||||
|
Found the URL: https://opnsense.org/terms-conditions/
|
||||||
|
Found the URL: https://opnsense.org/privacy-en-cookies/
|
||||||
135
opnsense/main.py
Normal file
135
opnsense/main.py
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
import requests, schedule, time
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from whatDomain import ermWhatAAAATheIpFromDomainYaCrazy, ermWhatATheIpFromDomainYaCrazy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
OPNSNSMIRRORURL = "https://opnsense.org/download/#full-mirror-listing"
|
||||||
|
IPv4FILE = "./OPNS_MirrorListV4"
|
||||||
|
IPv6FILE = "./OPNS_MirrorListV6"
|
||||||
|
|
||||||
|
|
||||||
|
def sanitizeURL(inpurl: str):
|
||||||
|
if not "/" in inpurl[:-1]:
|
||||||
|
inpurl += "/"
|
||||||
|
if "https://" in inpurl:
|
||||||
|
outurl = inpurl[8:]
|
||||||
|
elif "http://" in inpurl:
|
||||||
|
outurl = inpurl[7:]
|
||||||
|
elif "http://" or "https://" not in url:
|
||||||
|
outurl = inpurl
|
||||||
|
else:
|
||||||
|
return -1
|
||||||
|
|
||||||
|
# how the fuck does it work?
|
||||||
|
# I mean I wrote this but I don't know why does it work.
|
||||||
|
i = 0
|
||||||
|
for char in outurl:
|
||||||
|
i += 1
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:i]
|
||||||
|
|
||||||
|
if char == "/":
|
||||||
|
outurl = outurl[:-1]
|
||||||
|
return outurl
|
||||||
|
|
||||||
|
|
||||||
|
def getFreshData():
|
||||||
|
payload = requests.get(OPNSNSMIRRORURL)
|
||||||
|
soup = BeautifulSoup(payload.content, "html.parser")
|
||||||
|
return soup
|
||||||
|
|
||||||
|
def LeJob():
|
||||||
|
|
||||||
|
print("Starting lookup")
|
||||||
|
|
||||||
|
LeSoup = getFreshData()
|
||||||
|
|
||||||
|
# print(LeMirrorDict)
|
||||||
|
|
||||||
|
with open(IPv4FILE, "r",) as fR, open(IPv4FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for data in LeSoup.find_all('div', class_='download_section'):
|
||||||
|
for a in data.find_all('a', href=True):
|
||||||
|
|
||||||
|
url = a['href']
|
||||||
|
|
||||||
|
saniturl = sanitizeURL(url)
|
||||||
|
|
||||||
|
# print(saniturl)
|
||||||
|
IPv4Dict = ermWhatATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
|
||||||
|
# print(IPv4Dict)
|
||||||
|
try:
|
||||||
|
for key, ip in IPv4Dict.items():
|
||||||
|
print(f"Found the ipv4: {ip}")
|
||||||
|
fW.write(ip + "/32" + "\n")
|
||||||
|
|
||||||
|
# If int returned from WhatDomain then it is error.
|
||||||
|
# Error type is described via prints from whatdomain functions
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
with open(IPv6FILE, "r",) as fR, open(IPv6FILE, "w",) as fW:
|
||||||
|
|
||||||
|
for data in LeSoup.find_all('div', class_='download_section'):
|
||||||
|
for a in data.find_all('a', href=True):
|
||||||
|
|
||||||
|
url = a['href']
|
||||||
|
|
||||||
|
saniturl = sanitizeURL(url)
|
||||||
|
|
||||||
|
# print(saniturl)
|
||||||
|
IPv6Dict = ermWhatAAAATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
|
||||||
|
# print(IPv6Dict)
|
||||||
|
try:
|
||||||
|
for key, ip in IPv6Dict.items():
|
||||||
|
print(f"Found the ipv6: {ip}")
|
||||||
|
fW.write(ip + "/128" + "\n")
|
||||||
|
|
||||||
|
# If int returned from WhatDomain then it is error.
|
||||||
|
# Error type is described via prints from whatdomain functions
|
||||||
|
except AttributeError:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# schedule.every().day.at("12:45").do(LeJob)
|
||||||
|
# schedule.every().day.at("17:44").do(LeJob)
|
||||||
|
|
||||||
|
# while True:
|
||||||
|
# schedule.run_pending()
|
||||||
|
# print("Waiting...")
|
||||||
|
# time.sleep(30) #Wait one minute
|
||||||
|
# # LeJob()
|
||||||
|
|
||||||
|
LeJob()
|
||||||
|
|
||||||
|
# gigalist = []
|
||||||
|
|
||||||
|
# payload = requests.get(OPNSNSMIRRORURL)
|
||||||
|
# soup = BeautifulSoup(payload.content, "html.parser")
|
||||||
|
|
||||||
|
|
||||||
|
# for data in soup.find_all('div', class_='download_section'):
|
||||||
|
# for a in data.find_all('a', href=True):
|
||||||
|
|
||||||
|
# url = a['href']
|
||||||
|
|
||||||
|
# saniturl = sanitizeURL(url)
|
||||||
|
|
||||||
|
# # print(saniturl)
|
||||||
|
# IPv4Dict = ermWhatATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
# IPv6Dict = ermWhatAAAATheIpFromDomainYaCrazy(saniturl)
|
||||||
|
|
||||||
|
# # print(IPv4Dict)
|
||||||
|
# try:
|
||||||
|
# for key, ip in IPv4Dict.items():
|
||||||
|
# print(f"Found the ipv4: {ip}")
|
||||||
|
|
||||||
|
# for key, ip in IPv6Dict.items():
|
||||||
|
# print(f"Found the ipv6: {ip}")
|
||||||
|
# # If int returned from WhatDomain then it is error.
|
||||||
|
# # Error type is described via prints from whatdomain functions
|
||||||
|
# except AttributeError:
|
||||||
|
# continue
|
||||||
|
|
||||||
4
opnsense/requirements.txt
Normal file
4
opnsense/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
beautifulsoup4==4.13.4
|
||||||
|
requests==2.32.3
|
||||||
|
schedule==1.2.2
|
||||||
|
nslookup==1.8.1
|
||||||
129
opnsense/whatDomain.py
Normal file
129
opnsense/whatDomain.py
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
#from nslookup import Nslookup
|
||||||
|
from typing import Optional, Annotated
|
||||||
|
import dns, dns.resolver
|
||||||
|
|
||||||
|
# https://www.codeunderscored.com/nslookup-python/
|
||||||
|
|
||||||
|
def ermWhatATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv4 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'A')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
def ermWhatAAAATheIpFromDomainYaCrazy(inpDomainNameOrSomething: Annotated[str, "Domain name to lookup IP for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(inpDomainNameOrSomething, 'AAAA')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
def ermWhatPTRTheIpFromDomainYaCrazy(inpIpAddressOrSomething: Annotated[str, "IP address to lookup domain for"]):
|
||||||
|
#dns_query = Nslookup()
|
||||||
|
"""
|
||||||
|
Tells you what IPv6 address/es a domain point to.
|
||||||
|
Returns:
|
||||||
|
dict: A dictionary with IP addresses associated with that domain.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
whatToCheck = inpIpAddressOrSomething + ".in-addr.arpa"
|
||||||
|
|
||||||
|
|
||||||
|
# i = 0
|
||||||
|
outDict = {}
|
||||||
|
|
||||||
|
#result = dns_query.dns_lookup("example.com")
|
||||||
|
#result = Nslookup.dns_lookup(inpDomainNameOrSomething)
|
||||||
|
try:
|
||||||
|
result = dns.resolver.resolve(whatToCheck, 'PTR')
|
||||||
|
except dns.resolver.NoAnswer:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("No answer from dns server.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NoNameservers:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("All nameservers failed to answer the query.\n Fix your DNS servers.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.NXDOMAIN:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS query name does not exist.\n")
|
||||||
|
return 1
|
||||||
|
except dns.resolver.LifetimeTimeout:
|
||||||
|
print("\nDNS ERROR")
|
||||||
|
print("The DNS querry got timed out.\nVerify that your FW or PiHole isn't blocking requests for that domain.\n")
|
||||||
|
return 1
|
||||||
|
for i, something in enumerate(result):
|
||||||
|
outDict[i] = something.to_text()
|
||||||
|
# i += 1
|
||||||
|
|
||||||
|
return outDict
|
||||||
|
|
||||||
|
|
||||||
|
#print(ermWhatATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatAAAATheIpFromDomainYaCrazy("fubukus.net"))
|
||||||
|
#print(ermWhatPTRTheIpFromDomainYaCrazy("192.168.1.226"))
|
||||||
Reference in New Issue
Block a user