summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-12-01 22:29:27 +0000
committerubq323 <ubq323@ubq323.website>2022-12-01 22:29:27 +0000
commit9cc9cedabbf7dc1b6fcdad0b6a6feb8763b5777a (patch)
tree12fd8b93d7c2e1efd41244c9ce0767427a34d158
parent4b1bef9851c7797aa13e1017dc6c67e02b826336 (diff)
tidying
-rwxr-xr-xembed.cgi.txt121
-rwxr-xr-xembed_old.cgi104
-rwxr-xr-xembed_old_old.cgi154
-rw-r--r--the.txt2
4 files changed, 0 insertions, 381 deletions
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('<h1 style="color: red">no</h1>')
- 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('<h1 style="color: red">no</h1>')
- 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"""<!DOCTYPE html>
-<html>
- <head>
- <base target="_parent">
- </head>
- <body>
- <style>
- body,html {{
- overflow: hidden;
- font-family: sans-serif;
- padding:0;
- margin:0;
- }}
- main {{
- margin:0;
- padding-left: 5px;
- padding-right: 5px;
- height: 45px;
- border: 1px solid black;
- box-shadow: 5px 5px black;
- background-color: {colors["bg"]};
- color: {colors["fg"]};
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- }}
- #george {{
- color: {colors["george"]};
- text-decoration: underline;
- text-decoration-color: blue;
- text-decoration-thickness: 2px;
- font-style: oblique;
- animation: 2s infinite alternate george;
- }}
- @media (prefers-reduced-motion) {{
- #george {{ animation: none; }}
- }}
- #noble {{
- font-size: min(3vw, 12pt);
- }}
- p {{
- white-space: nowrap;
- align-self: center;
- }}
- @keyframes george {{
- from {{
- letter-spacing: 1px;
- }}
- to {{
- letter-spacing: 6px;
- }}
- }}
- a {{
- color: {colors["links"]};
- }}
- </style>
- <main>
- <p><a href="{p}">&lt; PREV</a></p>
- <p id="noble">
- The <a href="https://george.gh0.pw" id="george">GEORGE</a> is a noble animal.
- </p>
- <p><a href="{n}">NEXT &gt;</a></p>
- </main>
- </body>
-</html>""")
-
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('<h1 style="color: red">no</h1>')
- 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('<h1 style="color: red">no</h1>')
- 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"""<!DOCTYPE html>
-<html>
- <head>
- <base target="_parent">
- </head>
- <body>
- <style>
- body,html {{
- overflow: hidden;
- font-family: sans-serif;
- padding:0;
- margin:0;
- }}
- main {{
- margin:0;
- padding-left: 5px;
- padding-right: 5px;
- height: 45px;
- border: 1px solid black;
- box-shadow: 5px 5px black;
- /*background-color: pink;*/
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- }}
- #george {{
- color: cyan;
- text-decoration: underline;
- text-decoration-color: blue;
- text-decoration-thickness: 2px;
- font-style: oblique;
- animation: 2s infinite alternate george;
- }}
- @media (prefers-reduced-motion) {{
- #george {{ animation: none; }}
- }}
- #noble {{
- font-size: min(3vw, 12pt);
- }}
- p {{
- white-space: nowrap;
- align-self: center;
- }}
- @keyframes george {{
- from {{
- letter-spacing: 1px;
- }}
- to {{
- letter-spacing: 6px;
- }}
- }}
- a {{
- color: blue;
- }}
- </style>
- <main>
- <p><a href="{p}">&lt; PREV</a></p>
- <p id="noble">
- The <a href="https://george.gh0.pw" id="george">GEORGE</a> is a noble animal.
- </p>
- <p><a href="{n}">NEXT &gt;</a></p>
- </main>
- </body>
-</html>""")
-
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 <<EOF
-#<!DOCTYPE html>
-#<html>
-# <head>
-# <base target="_parent">
-# </head>
-# <body>
-# <style>
-# * { box-sizing: inherit; }
-# body,html {
-# overflow: hidden;
-# font-family: sans-serif;
-# padding:0;
-# margin:0;
-# box-sizing: border-box;
-# }
-# main {
-# margin:0;
-# padding-left: 5px;
-# padding-right: 5px;
-# height: 50px;
-# border: 1px solid black;
-# box-shadow: 5px 5px black;
-# /*background-color: pink;*/
-# display: flex;
-# flex-wrap: nowrap;
-# justify-content: space-between;
-# }
-# #george {
-# color: cyan;
-# text-decoration: underline;
-# text-decoration-color: blue;
-# text-decoration-thickness: 2px;
-# font-style: oblique;
-# animation: 2s infinite alternate george;
-# }
-# @keyframes george {
-# from {
-# letter-spacing: 1px;
-# }
-# to {
-# letter-spacing: 6px;
-# }
-# }
-# a {
-# color: blue;
-# }
-# </style>
-# <main>
-# <p><a href="$PREV">&lt; PREV</a></p>
-# <p>The <a href="https://george.gh0.pw" id="george">GEORGE</a> is a noble animal.</p>
-# <p><a href="$NEXT">NEXT &gt;</a></p>
-# </main>
-# </body>
-#</html>
-#EOF
-cat <<EOF
-<!DOCTYPE html>
-<html>
- <head>
- <base target="_parent">
- </head>
- <body>
- <style>
- body,html {
- overflow: hidden;
- font-family: sans-serif;
- padding:0;
- margin:0;
- }
- main {
- margin:0;
- padding-left: 5px;
- padding-right: 5px;
- height: 45px;
- border: 1px solid black;
- box-shadow: 5px 5px black;
- /*background-color: pink;*/
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- }
- #george {
- color: cyan;
- text-decoration: underline;
- text-decoration-color: blue;
- text-decoration-thickness: 2px;
- font-style: oblique;
- animation: 2s infinite alternate george;
- }
- #noble {
- font-size: min(3vw, 12pt);
- }
- p {
- white-space: nowrap;
- align-self: center;
- }
- @keyframes george {
- from {
- letter-spacing: 1px;
- }
- to {
- letter-spacing: 6px;
- }
- }
- a {
- color: blue;
- }
- </style>
- <main>
- <p><a href="$PREV">&lt; PREV</a></p>
- <p id="noble">
- The <a href="https://george.gh0.pw" id="george">GEORGE</a> is a noble animal.
- </p>
- <p><a href="$NEXT">NEXT &gt;</a></p>
- </main>
- </body>
-</html>
-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