mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-31 02:20:25 +00:00
Merge branch 'main' into main
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
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
|
||||
@@ -9,6 +9,6 @@
|
||||
"Mastodon": "@YouFoundAlpha@mastodon.social"
|
||||
},
|
||||
"record": {
|
||||
"TXT": "c136bd65da"
|
||||
"TXT": "3436b41d67"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "riviox",
|
||||
"email": "rivioxyt@hotmail.com"
|
||||
},
|
||||
"record": {
|
||||
"TXT": "15bce163359555d636e6bd2cc5903f"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "RivioxGaming",
|
||||
"username": "riviox",
|
||||
"email": "rivioxyt@hotmail.com"
|
||||
},
|
||||
"record": {
|
||||
|
||||
+10
-10
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "adityaREDFLAG",
|
||||
"email": "adi.redflag@gmail.com",
|
||||
"discord": "983386510235680888"
|
||||
},
|
||||
|
||||
"record": {
|
||||
"CNAME": "adityaredflag.github.io"
|
||||
}
|
||||
"owner": {
|
||||
"username": "adityaREDFLAG",
|
||||
"email": "adi.redflag@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
|
||||
}
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"description": "Akas Portfolio",
|
||||
"repo": "https://github.com/akasrai/akasrai.github.io",
|
||||
"owner": {
|
||||
"username": "akasrai",
|
||||
"email": "akasky70@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "akasrai.github.io"
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "d7dx",
|
||||
"email": "d7dx@proton.me"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "d7dx.github.io"
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"TXT": "v=spf1 mx a:mailx.is-a.dev ip4:217.174.245.249 ~all",
|
||||
"MX": ["mailx.is-a.dev"]
|
||||
"TXT": "v=spf1 mx a:mail.is-a.dev ip4:217.174.245.249 ~all",
|
||||
"MX": ["mail.is-a.dev"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "allancoding",
|
||||
"email": "allancoding.dev@gmail.com",
|
||||
"twitter": "allancoding",
|
||||
"discord": "allancoding"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"description": "asriel.is-a.dev",
|
||||
"repo": "https://github.com/asrielthegoat/asrielthegoat.github.io",
|
||||
"owner": {
|
||||
"username": "AsrieltheGoat",
|
||||
"email": "ganyu@segs.eu.org",
|
||||
"discord": "AsrieltheGoat"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "asrielthegoat.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "Personal website for @ayvacs",
|
||||
"repo": "https://github.com/ayvacs/ayvacs.github.io",
|
||||
"owner": {
|
||||
"username": "ayvacs",
|
||||
"email": "ayvacs@proton.me"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "ayvacs.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "avipars",
|
||||
"email": "avi.pars@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "avipars.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Sxurabh",
|
||||
"email": "saurabhkirve@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "berztech.vercel.app"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Zumwaltboi68",
|
||||
"email": "alexander662022@outlook.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Edgar-4111",
|
||||
"email": "",
|
||||
"discord": "._edgar."
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "proxy.private.danbot.host"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "syxnights",
|
||||
"email": "hamzafelashry12@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "allancoding",
|
||||
"email": "allancoding.dev@gmail.com",
|
||||
"twitter": "allancoding",
|
||||
"discord": "allancoding"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "allancoding.github.io"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "mattiagrusio",
|
||||
"email": "mattiagrusio@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["2.231.198.113"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "d7dx",
|
||||
"email": "d7dx@proton.me"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "d7dx.github.io"
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"description": "My personal website",
|
||||
"owner": {
|
||||
"username": "johan-perso",
|
||||
"email": "johan_stickman@proton.me",
|
||||
"twitter": "Johan_Stickman",
|
||||
"discord": "jsuismoi"
|
||||
},
|
||||
"record": {
|
||||
"URL": "https://johanstick.fr"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "My personal website",
|
||||
"repo": "https://github.com/Johna-123/Johna-123.github.io",
|
||||
"owner": {
|
||||
"username": "Johna-123",
|
||||
"email": "j-verstraaten@hotmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "johna.pages.dev"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "PassiveLemon",
|
||||
"email": "lemonl3mn@protonmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["64.217.148.69"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "nlotra",
|
||||
"email": "natashalotra@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "o-lumix",
|
||||
"email": "lumixofficiel@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "is-a-dev",
|
||||
"email": "phenax5@gmail.com"
|
||||
},
|
||||
|
||||
"record": {
|
||||
"A": ["51.161.54.164"],
|
||||
"MX": ["mail.is-a.dev"],
|
||||
"TXT": "v=spf1 mx a:mail.is-a.dev ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "gigwanoobstudios",
|
||||
"email": "tplink3116@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "nguyenkhanhhoa",
|
||||
"email": "coolie.itman@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["34.168.72.137"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Nikhil",
|
||||
"email": "nikhilsoniya123@gmail.com",
|
||||
"discord": "nikxso#0000"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "myweb-266f0.web.app"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "norkart1",
|
||||
"email": "navasforwork@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "personal-website-26y.pages.dev"
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"record": {
|
||||
"A": ["130.162.166.134"],
|
||||
"MX": ["mx1.forwardemail.net", "mx2.forwardemail.net"],
|
||||
"MX": ["mx1.improvmx.com", "mx2.improvmx.com"],
|
||||
"TXT": "forward-email=phoenixorigin171@gmail.com"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "ProfKrzys",
|
||||
"email": "krzysztof2011@hotmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
+4
-5
@@ -1,12 +1,11 @@
|
||||
{
|
||||
"description": "This subdomain is for my personal website.",
|
||||
"repo": "https://github.com/danknessdra/danknessdra.github.io",
|
||||
"owner": {
|
||||
"username": "danknessdra",
|
||||
"email": "danknessdra@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
"CNAME": "danknessdra.github.io"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "cjolivier15",
|
||||
"email": "oliviercj195@yahoo.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Maverick00001",
|
||||
"email": "saksham.access@yahoo.com"
|
||||
},
|
||||
"record": {
|
||||
"A": ["217.174.245.249"],
|
||||
"AAAA": ["2a00:da00:1800:83a4::1"],
|
||||
"MX": ["hosts.is-a.dev"],
|
||||
"TXT": "v=spf1 a mx ip4:217.174.245.249 ~all"
|
||||
}
|
||||
}
|
||||
+2
-4
@@ -9,12 +9,10 @@
|
||||
"217.174.245.249"
|
||||
],
|
||||
"MX": [
|
||||
"mx1.forwardemail.net",
|
||||
"mx2.forwardemail.net"
|
||||
"mail.is-a.dev"
|
||||
],
|
||||
"TXT": [
|
||||
"forward-email=admin:admin.main@mail.stefdp.is-a.dev",
|
||||
"forward-email=/^(?!admin$).*/:main@mail.stefdp.is-a.dev"
|
||||
" v=spf1 mx a:mail.is-a.dev ip4:217.174.245.249 ~all"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Sxurabh",
|
||||
"email": "saurabhkirve@gmail.com"
|
||||
},
|
||||
"record": {
|
||||
"CNAME": "sxurabh.github.io"
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
},
|
||||
|
||||
"record": {
|
||||
"CNAME": "wdhdns.com"
|
||||
"A": ["51.161.54.161"],
|
||||
"MX": ["mail.is-a.dev"],
|
||||
"TXT": "v=spf1 mx a:mail.is-a.dev ~all"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "Wizqdev",
|
||||
"email": "prajwal2079@gmail.com",
|
||||
"discord": "778254181303451658"
|
||||
},
|
||||
|
||||
"record": {
|
||||
"CNAME": "proxy.private.danbot.host"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"owner": {
|
||||
"username": "o-lumix",
|
||||
"email": "lumixofficiel@gmail.com"
|
||||
},
|
||||
|
||||
"record": {
|
||||
"CNAME": "o-lumix.github.io"
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const R = require('ramda');
|
||||
const { DOMAINS_PATH } = require('../utils/constants');
|
||||
|
||||
const migrate = ([file, domain]) => [
|
||||
file,
|
||||
{
|
||||
...domain,
|
||||
record: file !== '@.json' && /\.is-a\.dev$/.test(domain.record.URL || '')
|
||||
? R.dissoc('URL', domain.record)
|
||||
: domain.record,
|
||||
}
|
||||
];
|
||||
|
||||
const main = async () => {
|
||||
const domains = await fs.promises.readdir(DOMAINS_PATH).then(R.map(async file => [
|
||||
file,
|
||||
JSON.parse(await fs.promises.readFile(path.join(DOMAINS_PATH, file), 'utf-8')),
|
||||
])).then(ps => Promise.all(ps));
|
||||
|
||||
const newDomains = domains.map(migrate);
|
||||
|
||||
await Promise.all(newDomains.map(([file, json]) => {
|
||||
return fs.promises.writeFile(path.join(DOMAINS_PATH, file), JSON.stringify(json, null, 2));
|
||||
}));
|
||||
};
|
||||
|
||||
main();
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
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}")
|
||||
Reference in New Issue
Block a user