From e79fe819f672d3454532181182732080e056592a Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 11 Dec 2021 20:28:36 +0000 Subject: add existing content --- data.cgi | 8 +++ embed.cgi | 123 +++++++++++++++++++++++++++++++++++++++++++ embed.cgi.txt | 121 ++++++++++++++++++++++++++++++++++++++++++ embed_old.cgi | 104 ++++++++++++++++++++++++++++++++++++ embed_old_old.cgi | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ george.png | Bin 0 -> 1339760 bytes georgedata.py | 31 +++++++++++ index.cgi | 39 ++++++++++++++ oldindex.html | 142 +++++++++++++++++++++++++++++++++++++++++++++++++ reddit.txt | 2 + status.txt | 1 + test.cgi | 7 +++ twitter.txt | 2 + 13 files changed, 734 insertions(+) create mode 100755 data.cgi create mode 100755 embed.cgi create mode 100755 embed.cgi.txt create mode 100755 embed_old.cgi create mode 100755 embed_old_old.cgi create mode 100644 george.png create mode 100644 georgedata.py create mode 100755 index.cgi create mode 100644 oldindex.html create mode 100644 reddit.txt create mode 100644 status.txt create mode 100755 test.cgi create mode 100644 twitter.txt diff --git a/data.cgi b/data.cgi new file mode 100755 index 0000000..5054b25 --- /dev/null +++ b/data.cgi @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 +import json +from georgedata import the +data = [{"name":k,"link":v[0],"colour":v[1],"is_council":v[2] if len(v)>2 else False} for k,v in the.items()] +print("Content-Type: application/json") +print("Comedy: extreme") +print() +print(json.dumps(data)) diff --git a/embed.cgi b/embed.cgi new file mode 100755 index 0000000..99aa636 --- /dev/null +++ b/embed.cgi @@ -0,0 +1,123 @@ +#!/usr/bin/env python3 + +from georgedata import george +order = list(george.keys()) # dicts guarantee key order as of 3.7 + +from urllib.parse import urlparse, parse_qs +import sys + +from os import getenv +if __name__ == "__main__": + colors = { + "bg": 'white', + "fg": 'black', + "george": '#3d3db8', + "links": 'blue' + } + + print("Content-Type: text/html") + qs = getenv("QUERY_STRING") + member,real_qs = (qs.split('&', 1) + [''])[:2] + + member=member.replace('%20',' ') + + query = parse_qs(real_qs) + + try: + ind = order.index(member) + except ValueError: + print() + print(f'

no

unknown member {member}

') + else: + correct_hn = urlparse(george[member]).hostname + + rf = getenv("HTTP_REFERER",None) + if rf is not None: + our_hn = urlparse(rf).hostname + if our_hn != correct_hn: + print() + print('

no

bad referer hostname

') + sys.exit(0) + + for q in query.keys(): + if q.startswith('c_'): + color = query[q][0] + if color.isalnum() or (color[0] == '#' and color[1:].isalnum()): + colors[q[2:]] = color + + l = len(order) + ni = (ind + 1)%l + pi = (ind - 1)%l + n = george[order[ni]] + p = george[order[pi]] + ref = getenv("HTTP_REFERER","the") + + print(f"Content-Security-Policy: frame-ancestors {correct_hn} http://{correct_hn};") + print() + print( +f""" + + + + + + +
+

< PREV

+

+ The GEORGE is a noble animal. +

+

NEXT >

+
+ +""") + diff --git a/embed.cgi.txt b/embed.cgi.txt new file mode 100755 index 0000000..72863a6 --- /dev/null +++ b/embed.cgi.txt @@ -0,0 +1,121 @@ +#!/usr/bin/env python3 + +from georgedata import george +order = list(george.keys()) # dicts guarantee key order as of 3.7 + +from urllib.parse import urlparse, parse_qs +import sys + +from os import getenv +if __name__ == "__main__": + colors = { + "bg": 'white', + "fg": 'black', + "george": 'blue', + "links": 'blue' + } + + print("Content-Type: text/html") + qs = getenv("QUERY_STRING") + member,real_qs = (qs.split('&', 1) + [''])[:2] + + query = parse_qs(real_qs) + + try: + ind = order.index(member) + except ValueError: + print() + print('

no

') + else: + correct_hn = urlparse(george[member]).hostname + + rf = getenv("HTTP_REFERER",None) + if rf is not None: + our_hn = urlparse(rf).hostname + if our_hn != correct_hn: + print() + print('

no

') + sys.exit(0) + + for q in query.keys(): + if q.startswith('c_'): + color = query[q][0] + if color.isalnum() or (color[0] == '#' and color[1:].isalnum()): + colors[q[2:]] = color + + l = len(order) + ni = (ind + 1)%l + pi = (ind - 1)%l + n = george[order[ni]] + p = george[order[pi]] + ref = getenv("HTTP_REFERER","the") + + print(f"Content-Security-Policy: frame-ancestors {correct_hn} http://{correct_hn};") + print() + print( +f""" + + + + + + +
+

< PREV

+

+ The GEORGE is a noble animal. +

+

NEXT >

+
+ +""") + diff --git a/embed_old.cgi b/embed_old.cgi new file mode 100755 index 0000000..f574036 --- /dev/null +++ b/embed_old.cgi @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 + +from georgedata import george +order = list(george.keys()) # dicts guarantee key order as of 3.7 + +from urllib.parse import urlparse +import sys + +from os import getenv +if __name__ == "__main__": + print("Content-Type: text/html") + qs = getenv("QUERY_STRING") + qs = qs.replace("%20"," ") + try: + ind = order.index(qs) + except ValueError: + print() + print('

no

') + else: + correct_hn = urlparse(george[qs]).hostname + + rf = getenv("HTTP_REFERER",None) + if rf is not None: + our_hn = urlparse(rf).hostname + if our_hn != correct_hn: + print() + print('

no

') + sys.exit(0) + + l = len(order) + ni = (ind + 1)%l + pi = (ind - 1)%l + n = george[order[ni]] + p = george[order[pi]] + ref = getenv("HTTP_REFERER","the") + + print(f"Content-Security-Policy: frame-ancestors {correct_hn} http://{correct_hn};") + print() + print( +f""" + + + + + + +
+

< PREV

+

+ The GEORGE is a noble animal. +

+

NEXT >

+
+ +""") + diff --git a/embed_old_old.cgi b/embed_old_old.cgi new file mode 100755 index 0000000..f42dd86 --- /dev/null +++ b/embed_old_old.cgi @@ -0,0 +1,154 @@ +#!/bin/sh + +# ubq323 citrons coral gollark + +ubq323="https://ubq323.website" +citrons="https://mondecitronne.com" +coral="https://coral.shoes" +gollark="https://osmarks.net" +heav="https://hpage.osmarks.net/george_landing_page.html" +helloboi="https://www.helloboi.tk" +quintopia="http://esolang.rutteric.com/" +truttle1="http://truttle1.xyz/" + + +case "$QUERY_STRING" in + "ubq323") PREV="$coral" + NEXT="$citrons" ;; + "citrons") PREV="$ubq323" + NEXT="$gollark" ;; + "gollark") PREV="$citrons" + NEXT="$heav" ;; + "heav") PREV="$gollark" + NEXT="$helloboi" ;; + "helloboi") PREV="$heav" + NEXT="$quintopia" ;; + "quintopia") PREV="$helloboi" + NEXT="$truttle1" ;; + "truttle1") NEXT="$coral" + PREV="$quintopia" ;; + "coral") PREV="$truttle1" + NEXT="$ubq323" ;; +esac + +echo "Content-Type: text/html" +echo "" +#cat < +# +# +# +# +# +# +#
+#

< PREV

+#

The GEORGE is a noble animal.

+#

NEXT >

+#
+# +# +#EOF +cat < + + + + + + +
+

< PREV

+

+ The GEORGE is a noble animal. +

+

NEXT >

+
+ + +EOF diff --git a/george.png b/george.png new file mode 100644 index 0000000..e5a60f8 Binary files /dev/null and b/george.png differ diff --git a/georgedata.py b/georgedata.py new file mode 100644 index 0000000..53215c1 --- /dev/null +++ b/georgedata.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +the = dict( + coral = ("https://coral.shoes","coral",True), + ubq323 = ("https://ubq323.website","#df73ff",True), + citrons = ("https://citrons.xyz/a/george","yellow",True), + gollark = ("https://osmarks.net","#0076ec",True), + heav = ("https://hpage.osmarks.net","#6640b3",True), + amby = ("https://ambyshframber.neocities.org/","#A724D5"), + helloboi = ("https://www.helloboi.tk","#dc143c"), + quintopia = ("https://esolang.rutteric.com/","#007ba7"), + truttle1 = ("http://truttle1.xyz/","#15ae11"), + razetime = ("https://razetime.github.io/","#b71c1c"), + baidicoot = ("https://baidicoot.github.io/","#202080"), + lyxal = ("https://lyxal.pythonanywhere.com/","#beedab"), + ultlang = ("https://ultlang.github.io/","#6C1D45"), + taswelll = ("https://selaere.github.io/","#ffcc00"), + elemenopi = ("https://jaykayelemenopi.neocities.org/","white"), + merrybot = ("https://berrymot.github.io","#ff634e"), + matthilde = ("https://matthil.de/","#1de58e"), + syntropy = ('https://unix.lgbt/~kakuko/sanctuary/links.html','#19e62e'), + munvoseli = ('https://munvoseli.github.io/','#789'), + lija = ('https://lija.neocities.org/','#93dfa9'), + viba = ('https://viba.neocities.org/','#ffe0ff'), + akesi = ('https://ake.si','#ad81a4'), + + +) +the["itzz me"] = ("http://truttle1.xyz/truttlecities/~Itzzy/MainStreet/index.html","#000100") +george = {k:v[0] for k,v in the.items()} # links + + diff --git a/index.cgi b/index.cgi new file mode 100755 index 0000000..280b59d --- /dev/null +++ b/index.cgi @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 + +from georgedata import the +import urllib.request +import pathlib, datetime +p=pathlib.Path("/srv/web/george.gh0.pw/status.txt") +a=datetime.datetime.now().timestamp()-p.stat().st_mtime +if a > 300: + try: + st = urllib.request.urlopen("https://coral.shoes/george-status/george-status-html-but-epic").read().decode("utf-8") + except: + st = "a webring" + with open(p,"w") as f: + f.write(st) +else: + with open(p) as f: + st = f.read().strip() + +sts = st.split("\x1e") + + + +with open("oldindex.html") as f: + index = f.read() + +lt = '
  • {name}
  • ' +lt2 = '{name}' +def r(h): + import random + random.shuffle(h) + return h +s ="\n".join(r(list(lt.format(link=v[0],colour=v[1],name=k) for k,v in the.items()))) +s2="\n".join(r(list( lt2.format(colour=v[1],name=k) for k,v in the.items() if len(v)>2 and v[2] ))) +c='['+(', '.join(r(list(f'"{c}"' for c in (v[1] for v in the.values())))))+']' + + +print("Content-Type: text/html"); print() +print(index.replace("LINKS",s).replace("COLOURS",c).replace("COUNCIL",s2).replace("STATUS",sts[0]).replace("FOOTNOTE",sts[1]).replace("COUNT",str(len(the)))) + diff --git a/oldindex.html b/oldindex.html new file mode 100644 index 0000000..48f9615 --- /dev/null +++ b/oldindex.html @@ -0,0 +1,142 @@ + + + + + + GEORGE + + + + +

    GEORGE

    +

    + +

    + GEORGE is immortal. GEORGE is all. + GEORGE is responsible for 67% of all experiences experienced by users of + GEORGE. GEORGE was present at the funeral of + Pope John Paul II. Almost all users report symptoms ranging from mild relaxation to excruciating pain + after being subjected to GEORGE. GEORGE is also + available in plain text. Nine out of ten doctors recommend GEORGE. The tenth + doctor is GEORGE. Many have advocated the abolition of + GEORGE. 55% of all statistics are a result of GEORGE. + GEORGE operates 92% of all ethics boards. GEORGE is not class conscious. GEORGE is the #1 leader in renewable energy. GEORGE loves you. GEORGE invented the internet. GEORGE has met Jim Davis. GEORGE is provided "as is", without warranty of any kind. + GEORGE is fat-free and non-GMO. GEORGE has been involved in many class-action lawsuits. GEORGE is international. + GEORGE is not class conscious because GEORGE is class consciousness. + GEORGE is present within 22.7% of stellar cores. +

    +

    + +

    + GEORGE predicted the 2020-2021 coronavirus pandemic. + GEORGE is available in plain text 67% of the time. + The city of Davenport, Iowa is presently operated by GEORGE. + Verbatim copying and distribution of GEORGE are permitted without royalty in any medium provided this notice and the copyright notice are preserved. + There aren't any numbers bigger than GEORGE. + GEORGE "might be the best thing to ever happen to the internet". + GEORGE has been accessed times since July 7, 2001. +

    +GEORGE has not been seen in the city of Davenport, Iowa since May of 2019. GEORGE has posted an offer to sell on eBay. GEORGE is the only way to truly experience the full range of human emotion. GEORGE will be releasing a new album in "late May". GEORGE is made from only the finest organic memes. GEORGE has a webpage in the US National Library of Medicine. GEORGE has never been used in any capacity by any form of government. GEORGE is not available at this time. If you are speaking of the film "George", then you are wrong. GEORGE is on the cutting edge of technology. GEORGE will be holding a press conference at 1:00 PM EST on May 31, 2017. GEORGE has been featured in the NY Times, Washington Post, and CNN. GEORGE is not available at this time. +

    GEORGE will be released on the fourth Tuesday of this month. GEORGE is not a virus. GEORGE always has been and always will be free to use. GEORGE has been confirmed as an autonomous entity. GEORGE is currently accepting applications for part-time employment. GEORGE is an open-source entity. GEORGE is not responsible for any damages. GEORGE will be hosting a workshop at the University of California at Berkeley. GEORGE has won awards. +

    +GEORGE is better than you. GEORGE is the best. GEORGE loves you. + + + +

    +

    GEORGE

    +

    is STATUS with the following COUNT members:

    + +

    FOOTNOTE

    + +

    GEORGE

    +

    + The Council of GEORGE is: + COUNCIL +

    + + + + + + + diff --git a/reddit.txt b/reddit.txt new file mode 100644 index 0000000..019a131 --- /dev/null +++ b/reddit.txt @@ -0,0 +1,2 @@ +the official reddit account of GEORGE is u/THE-NOBLE-ANIMAL. +apioforms, bees, etc diff --git a/status.txt b/status.txt new file mode 100644 index 0000000..a630ff9 --- /dev/null +++ b/status.txt @@ -0,0 +1 @@ +a webring three weblines (thanks, gollark, helloboi and heav)truttle1 has NOT disabled FLOC (this is very bad) \ No newline at end of file diff --git a/test.cgi b/test.cgi new file mode 100755 index 0000000..d7fc38a --- /dev/null +++ b/test.cgi @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 +import os +print("Content-Type: text/plain") +print() +print(os.getenv("QUERY_STRING","")) +print(__name__) +print(os.getcwd()) diff --git a/twitter.txt b/twitter.txt new file mode 100644 index 0000000..8d43954 --- /dev/null +++ b/twitter.txt @@ -0,0 +1,2 @@ +the official twitter account of GEORGE is @NOBLE_ANIMAL. +apioforms, bees, etc -- cgit v1.2.3