Separated script files #99

This commit is contained in:
ManeraKai 2022-04-16 17:17:24 +03:00
parent 083a5f23cd
commit 9612b9eb29
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
5 changed files with 1524826 additions and 23 deletions

View File

@ -1 +1,53 @@
[]
[
"https://invidious.kavin.rocks",
"https://invidious-us.kavin.rocks",
"https://invidious.lunar.icu",
"https://send.silkky.cloud",
"https://nhanh.cloud",
"https://nitter.domain.glass",
"https://nitter.actionsack.com",
"https://birdsite.xanny.family",
"https://nitter.moomoo.me",
"https://nittereu.moomoo.me",
"https://nitter.alefvanoon.xyz",
"https://notabird.site",
"https://nitter.silkky.cloud",
"https://fuckthesacklers.network",
"https://nitter.govt.land",
"https://nitter.winscloud.net",
"https://twtr.bch.bar",
"https://nitter.lunar.icu",
"https://bib.actionsack.com",
"https://biblio.alefvanoon.xyz",
"https://libreddit.silkky.cloud",
"https://libreddit.domain.glass",
"https://libreddit.jamiethalacker.dev",
"https://r.nf",
"https://libreddit.alefvanoon.xyz",
"https://libreddit.flux.industries",
"https://libreddit.hu",
"https://lr.stilic.ml",
"https://reddi.tk",
"https://r.walkx.org",
"https://libreddit.yonalee.eu",
"https://libreddit.winscloud.net",
"https://libreddit.lunar.icu",
"https://teddit.domain.glass",
"https://teddit.alefvanoon.xyz",
"https://wikiless.alefvanoon.xyz",
"https://wiki.604kph.xyz",
"https://wikiless.lunar.icu",
"https://st.alefvanoon.xyz",
"https://translate.syncpundit.com",
"https://searx.josie.lol",
"https://searx.kujonello.cf",
"https://searx.org",
"https://searx.roughs.ru",
"https://searx.run",
"https://searx.tk",
"https://s.alefvanoon.xyz",
"https://search.albony.xyz",
"https://whoogle.lunar.icu",
"https://rimgo.lunar.icu",
"https://i.actionsack.com"
]

1524738
src/instances/cloudflare_ips.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
# Note: Run this script from the root of the repo
import requests
import json
import subprocess
from colorama import Fore, Back, Style
def init_cloudflare():
r = requests.get('https://www.cloudflare.com/ips-v4')
myList = []
for i in r.text.split('\n'):
out = subprocess.run(
["sh", "./src/instances/get_possible_ips.sh", i],
capture_output=True,
text=True
)
myList += out.stdout.splitlines()
print(Fore.GREEN + 'Fetched ' +
Fore.RED + 'Cloudflare IPs' +
Style.RESET_ALL)
return myList
cloudflare_ips = init_cloudflare()
print(cloudflare_ips)
json_object = json.dumps(cloudflare_ips, ensure_ascii=False, indent=2)
with open('./src/instances/cloudflare_ips.json', 'w') as outfile:
outfile.write(json_object)
print(Fore.BLUE + 'wrote ' + Style.RESET_ALL + 'instances/cloudflare_ips.json')

View File

@ -5,6 +5,7 @@
"https://vid.puffyan.us",
"https://invidious.snopyta.org",
"https://invidious.kavin.rocks",
"https://invidio.xamh.de",
"https://inv.riverside.rocks",
"https://invidious-us.kavin.rocks",
"https://invidious.osi.kr",
@ -19,7 +20,6 @@
"https://inv.bp.mutahar.rocks",
"https://invidious.weblibre.org",
"https://invidious.privacy.gd",
"https://invidio.xamh.de",
"https://invidious.namazso.eu"
],
"tor": [
@ -349,6 +349,7 @@
"https://searx.fossencdi.org",
"https://searx.gnu.style",
"https://searx.hardwired.link",
"https://searx.jaska.cc",
"https://searx.josie.lol",
"https://searx.kujonello.cf",
"https://searx.mastodontech.de",
@ -419,7 +420,6 @@
"https://searx.esmailelbob.xyz",
"https://searx.fmac.xyz",
"https://searx.gnous.eu",
"https://searx.jaska.cc",
"https://searx.mha.fi",
"https://searx.namejeff.xyz",
"https://searx.prvcy.eu",

View File

@ -12,7 +12,6 @@ import subprocess
mightyList = {}
def filterLastSlash(urlList):
tmp = []
for i in urlList:
@ -23,25 +22,9 @@ def filterLastSlash(urlList):
tmp.append(i)
return tmp
def init_cloudflare():
r = requests.get('https://www.cloudflare.com/ips-v4')
myList = []
for i in r.text.split('\n'):
out = subprocess.run(
["sh", "./src/instances/get_possible_ips.sh", i],
capture_output=True,
text=True
)
myList += out.stdout.splitlines()
print(Fore.GREEN + 'Fetched ' +
Fore.RED + 'Cloudflare IPs' +
Style.RESET_ALL)
return myList
cloudflare_ips = init_cloudflare()
cloudflare_ips = []
with open('./src/instances/cloudflare_ips.json', 'r') as file:
cloudflare_ips = json.load(file)
def is_cloudflare(url):
href = urlparse(url)