From 9cc9cedabbf7dc1b6fcdad0b6a6feb8763b5777a Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 1 Dec 2022 22:29:27 +0000 Subject: tidying --- embed.cgi.txt | 121 ------------------------------------------ embed_old.cgi | 104 ------------------------------------ embed_old_old.cgi | 154 ------------------------------------------------------ the.txt | 2 - 4 files changed, 381 deletions(-) delete mode 100755 embed.cgi.txt delete mode 100755 embed_old.cgi delete mode 100755 embed_old_old.cgi delete mode 100644 the.txt diff --git a/embed.cgi.txt b/embed.cgi.txt deleted file mode 100755 index 72863a6..0000000 --- a/embed.cgi.txt +++ /dev/null @@ -1,121 +0,0 @@ -#!/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 deleted file mode 100755 index f574036..0000000 --- a/embed_old.cgi +++ /dev/null @@ -1,104 +0,0 @@ -#!/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 deleted file mode 100755 index f42dd86..0000000 --- a/embed_old_old.cgi +++ /dev/null @@ -1,154 +0,0 @@ -#!/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/the.txt b/the.txt deleted file mode 100644 index 6da4695..0000000 --- a/the.txt +++ /dev/null @@ -1,2 +0,0 @@ -bees -bees 1234 -- cgit v1.2.3