diff --git a/.github/workflows/url-validation.yml b/.github/workflows/url-validation.yml new file mode 100644 index 000000000..9818ba4f7 --- /dev/null +++ b/.github/workflows/url-validation.yml @@ -0,0 +1,26 @@ +name: URL Validation +on: + schedule: + - cron: '0 0 * * 1' # At 00:00 on Monday + workflow_dispatch: + +jobs: + validation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Setup Up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - run: pip install requests + - run: python tests/url-validation.py + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: URL Validiation Result + path: url-validation-result.json + retention-days: 7 diff --git a/domains/abhijit.json b/domains/abhijit.json new file mode 100644 index 000000000..d26b45d0e --- /dev/null +++ b/domains/abhijit.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "FIRSTB0SS", + "email": "abhiwa6@protonmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/abhinav.json b/domains/abhinav.json new file mode 100644 index 000000000..92a55747a --- /dev/null +++ b/domains/abhinav.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "abhinavcool42", + "email": "abhinavcool42@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/adev.json b/domains/adev.json index cd4d6b18a..edab09db1 100644 --- a/domains/adev.json +++ b/domains/adev.json @@ -1,11 +1,10 @@ + { "owner": { "username": "NotJack173", "email": "NotJack137@gmail.com" }, "record": { - "A": ["217.174.245.249"], - "MX": ["hosts.is-a.dev"], - "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + "CNAME": "lyrastudios.github.io" } -} \ No newline at end of file +} diff --git a/domains/akshayashok.json b/domains/akshayashok.json new file mode 100644 index 000000000..8a125a296 --- /dev/null +++ b/domains/akshayashok.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "akshy3", + "email": "akshayashok209@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/asmin.json b/domains/asmin.json new file mode 100644 index 000000000..11226af27 --- /dev/null +++ b/domains/asmin.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "AsminGiri", + "email": "asmingiriofficial@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/brandnewwick.json b/domains/brandnewwick.json new file mode 100644 index 000000000..1674a48de --- /dev/null +++ b/domains/brandnewwick.json @@ -0,0 +1,14 @@ +{ + "owner": { + "username": "alephdfilms", + "email": "alephdiallo@mail.com" + }, + "record": { + "A": [ + "185.199.108.153", + "185.199.109.153", + "185.199.110.153", + "185.199.111.153" + ] + } +} diff --git a/domains/dantae.json b/domains/dantae.json new file mode 100644 index 000000000..e6b1be24f --- /dev/null +++ b/domains/dantae.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "Thedogecraft", + "email": "dantaealt@gmail.com" + }, + "record": { + "CNAME": "nativegames.net" + } +} diff --git a/domains/denizak.json b/domains/denizak.json new file mode 100644 index 000000000..7e05332b5 --- /dev/null +++ b/domains/denizak.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "denizak", + "email": "denizakya@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/denizbee.json b/domains/denizbee.json new file mode 100644 index 000000000..5d38e857e --- /dev/null +++ b/domains/denizbee.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "denizbee", + "email": "denizbayramoglu@proton.me" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/dew.json b/domains/dew.json new file mode 100644 index 000000000..0768b84d7 --- /dev/null +++ b/domains/dew.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "dew-mortal", + "email": "dewmortal.cod@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/enoughsdv.json b/domains/enoughsdv.json new file mode 100644 index 000000000..6bf271ed7 --- /dev/null +++ b/domains/enoughsdv.json @@ -0,0 +1,10 @@ +{ + "repo": "https://github.com/Enoughsdv/Enoughsdv.github.io", + "owner": { + "username": "Enoughsdv", + "email": "enoughsdv@gmail.com" + }, + "record": { + "CNAME": "enoughsdv.github.io" + } +} diff --git a/domains/finny.json b/domains/finny.json new file mode 100644 index 000000000..991efa2b2 --- /dev/null +++ b/domains/finny.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "FinnyMarigold58", + "email": "teganherring2016@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/firstboss.json b/domains/firstboss.json new file mode 100644 index 000000000..d26b45d0e --- /dev/null +++ b/domains/firstboss.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "FIRSTB0SS", + "email": "abhiwa6@protonmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/jadebetty.json b/domains/jadebetty.json index 412bc0656..a57e8ac6f 100644 --- a/domains/jadebetty.json +++ b/domains/jadebetty.json @@ -5,6 +5,13 @@ "discord": "758617912566087681" }, "record": { - "CNAME": "jadebetty.github.io" + "A": [ + "185.199.108.153", + "185.199.109.153", + "185.199.110.153", + "185.199.111.153" + ], + "MX": ["mx1.improvmx.com", "mx2.improvmx.com"], + "TXT": "v=spf1 include:spf.improvmx.com ~all" } } diff --git a/domains/jumanji.json b/domains/jumanji.json index a1fd687e9..351a248a3 100644 --- a/domains/jumanji.json +++ b/domains/jumanji.json @@ -4,8 +4,6 @@ "email": "madhuchutiya.unhinge650@silomails.com" }, "record": { - "A": ["217.174.245.249"], - "MX": ["hosts.is-a.dev"], - "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + "CNAME": "heyjumanji.pages.dev" } -} \ No newline at end of file +} diff --git a/domains/ohm.json b/domains/ohm.json new file mode 100644 index 000000000..377c9e4a5 --- /dev/null +++ b/domains/ohm.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "sujandeb", + "email": "work@sujandeb.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/ohmdeb.json b/domains/ohmdeb.json new file mode 100644 index 000000000..377c9e4a5 --- /dev/null +++ b/domains/ohmdeb.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "sujandeb", + "email": "work@sujandeb.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/0ptidu0m.json b/domains/optidium.json similarity index 100% rename from domains/0ptidu0m.json rename to domains/optidium.json diff --git a/domains/saqlainbrawl.json b/domains/saqlainbrawl.json index b9ca235bc..ec50cc74e 100644 --- a/domains/saqlainbrawl.json +++ b/domains/saqlainbrawl.json @@ -4,6 +4,8 @@ "email": "saqlainbrawl@gmail.com" }, "record": { - "CNAME": "fb2fcda5-aed5-45b1-8aa4-31bc49356ffa.id.repl.co" + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" } -} +} \ No newline at end of file diff --git a/domains/satya.json b/domains/satya.json new file mode 100644 index 000000000..8998daf00 --- /dev/null +++ b/domains/satya.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "satyaidk", + "email": "nikadisatyanarayana@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/shubhamkumar.json b/domains/shubhamkumar.json new file mode 100644 index 000000000..d17b7727e --- /dev/null +++ b/domains/shubhamkumar.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "shubham-kumar-2004", + "email": "shubham04122004@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} diff --git a/domains/sia.json b/domains/sia.json new file mode 100644 index 000000000..377c9e4a5 --- /dev/null +++ b/domains/sia.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "sujandeb", + "email": "work@sujandeb.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/sujan.json b/domains/sujan.json new file mode 100644 index 000000000..377c9e4a5 --- /dev/null +++ b/domains/sujan.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "sujandeb", + "email": "work@sujandeb.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/sujandeb.json b/domains/sujandeb.json new file mode 100644 index 000000000..377c9e4a5 --- /dev/null +++ b/domains/sujandeb.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "sujandeb", + "email": "work@sujandeb.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/utsavsingh.json b/domains/utsavsingh.json new file mode 100644 index 000000000..9492c5289 --- /dev/null +++ b/domains/utsavsingh.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "singhutsav5502", + "email": "singhutsavofficial@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/vishwa.json b/domains/vishwa.json new file mode 100644 index 000000000..34a40edc1 --- /dev/null +++ b/domains/vishwa.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "vishwa2001911", + "email": "vprabhath937@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/wang.json b/domains/wang.json new file mode 100644 index 000000000..fd02ae2df --- /dev/null +++ b/domains/wang.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "wang-on-top", + "email": "Real.Shid.999@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/wankhede.json b/domains/wankhede.json new file mode 100644 index 000000000..d26b45d0e --- /dev/null +++ b/domains/wankhede.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "FIRSTB0SS", + "email": "abhiwa6@protonmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/williamsebastian.json b/domains/williamsebastian.json new file mode 100644 index 000000000..2c091c5c9 --- /dev/null +++ b/domains/williamsebastian.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "BaseParody", + "email": "baseparody@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/domains/yairmedina.json b/domains/yairmedina.json new file mode 100644 index 000000000..77c870165 --- /dev/null +++ b/domains/yairmedina.json @@ -0,0 +1,11 @@ +{ + "owner": { + "username": "DarknessRisesFromBelow", + "email": "spam.me.please.do.it@gmail.com" + }, + "record": { + "A": ["217.174.245.249"], + "MX": ["hosts.is-a.dev"], + "TXT": "v=spf1 a mx ip4:217.174.245.249 ~all" + } +} \ No newline at end of file diff --git a/tests/url-validation.py b/tests/url-validation.py new file mode 100644 index 000000000..25d2f7b70 --- /dev/null +++ b/tests/url-validation.py @@ -0,0 +1,60 @@ +import os +import json +import requests +import concurrent.futures + +repository_directory = os.getcwd() +domains_directory = os.path.join(repository_directory, "domains") + +def has_url_field(file_path): + with open(file_path, "r") as file: + data = json.load(file) + record = data.get("record") + if record and "URL" in record: + return record["URL"] + return None + +def is_url_reachable(url: str): + try: + response = requests.head(url, allow_redirects=True) + return response.status_code // 100 in [1, 2, 3] # Check if status code is in the 1xx or 2xx or 3xx range (success) + except requests.exceptions.RequestException: + return False + +urls_data = { + "valid": {}, + "invalid": {}, + "non-http": {} +} + +def handle_url_validation(file_path): + url: str = has_url_field(file_path) + if url: + if url.startswith("http://") or url.startswith("https://"): + if is_url_reachable(url): + urls_data["valid"][file_path] = url + print(f"URL '{url}' in file '{file_path}' is reachable.") + else: + urls_data["invalid"][file_path] = url + print(f"URL '{url}' in file '{file_path}' is not reachable.") + else: + urls_data["non-http"][file_path] = url + print(f"URL '{url}' in file '{file_path}' is neither HTTP nor HTTPS.") + +max_threads = 20 + +with concurrent.futures.ThreadPoolExecutor(max_workers=max_threads) as executor: + file_paths = [] + + for root, _, files in os.walk(domains_directory): + for filename in files: + file_paths.append(os.path.join(root, filename)) + + for file_path in file_paths: + future = executor.submit(handle_url_validation, file_path) + +result_file_path = os.path.join(repository_directory, "url-validation-result.json") +with open(result_file_path, "w") as result_file: + json.dump(urls_data, result_file, indent=4) + +print(f"Results saved to {result_file_path}")