diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe5831fb..8c9dc3ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: sudo npm install -g tiddlywiki sudo pip3 install beautifulsoup4 html5lib bash ./Bootstrap.sh - sh ./GitHub.Main.sh + bash ./Deploy.Main.sh - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94123ca6..b9a2ded7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ pages: stage: deploy script: | ash ./Bootstrap.sh - ash ./GitLab.Main.sh + ash ./Deploy.Main.sh artifacts: paths: - public diff --git a/Bootstrap.sh b/Bootstrap.sh old mode 100644 new mode 100755 index 9ace6c87..2b95c770 --- a/Bootstrap.sh +++ b/Bootstrap.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Exit on any error # Ensure important directories mkdir -vp ./Repo @@ -25,7 +26,7 @@ cd .. # Move the files of this repo to overwrite the extracted ones, then move everything back # This is so, if present, files from the repo are preferred, if needed in case of emergency -mv ./Repo/* ./Repo.tmp/ +mv ./Repo/* ./Repo.tmp/ || true mv ./Repo.tmp/* ./Repo/ # Move everything to the working directory, ready for the next CI steps diff --git a/GitLab.CrossRepoSync.sh.old b/GitLab.CrossRepoSync.sh.old deleted file mode 100644 index d66d45b2..00000000 --- a/GitLab.CrossRepoSync.sh.old +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -TargetRepo="OcttKB.Web" -git clone --depth 1 https://gitlab.com/octtspacc/$TargetRepo ./Repo-$TargetRepo -cd ./Repo-$TargetRepo -cp -v ../Output.tmp/index.html ./public/index.html -git add . -git commit -m "OcttKB Cross-Repo Sync (Raw to HTML)" -git push diff --git a/GitLab.Main.sh b/GitLab.Main.sh deleted file mode 100755 index 611451a3..00000000 --- a/GitLab.Main.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -. ./Src.*.sh || true -sh ./OcttKB.EmptyDate.sh || true - -# Ensure important directories -rm -rf ./Output.tmp || true - -# Build HTML TiddlyWiki -tiddlywiki \ - ./Wiki-OcttKB \ - --verbose \ - --output ./Output.tmp \ - --rendertiddler "$:/core/save/all" "index.html" "text/plain" - -mkdir -vp ./public -cp -v ./Output.tmp/index.html ./public/index.html -sh ./Main.sh diff --git a/Wiki-OcttKB/tiddlers/Normal/SEB 3.5.0 on Linux (VM Bypass).tid b/Wiki-OcttKB/tiddlers/Normal/SEB 3.5.0 on Linux (VM Bypass).tid index 675f160c..2add0548 100644 --- a/Wiki-OcttKB/tiddlers/Normal/SEB 3.5.0 on Linux (VM Bypass).tid +++ b/Wiki-OcttKB/tiddlers/Normal/SEB 3.5.0 on Linux (VM Bypass).tid @@ -35,4 +35,10 @@ After this, I installed Windows 10 (a build from 2019 I have on a burned DVD alw !! Hardening Windows +In this case "hardening" is meant as enhancing the privacy of our Windows against third-party apps, which we need to evade VM detection; we don't mean it as making the system more secure or robust for an exam purpose, which is something neutral to us (we as examinees don't care about it, it does neither benefit nor harm us). + [TODO] (https://pastebin.com/XEn7BykP) + +!! No abuse + +Be careful of only using this information if you actually need to run SEB on Linux or have other issues. Do not abuse the guide to create a VM for doing the exam and then getting out of it mid-session to use the host system normally and cheat. The procedure is not intended for cheating and if we start using it to do that, examiners will push for the holes that allow VM detection to be patched. If we only use it for valid reasons of OS compatibility, likely no one will protest and we will not be forced to use an OS we don't like as host on our computers. If you have to cheat at the written exam then you will fail the oral exam anyways, so study and don't use this method for cheating. diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_BuildSPA.sh.txt b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_BuildSPA.sh.txt index 22ccee28..115f19bf 100644 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_BuildSPA.sh.txt +++ b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_BuildSPA.sh.txt @@ -2,7 +2,7 @@ . ./Src.*.sh || true # Update time of last edit -sh ./OcttKB.EmptyDate.sh || true +sh ./EmptySetDate.sh || true # Ensure important directories rm -rf ./Output.tmp || true diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitHub.Main.sh.txt b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Deploy.Main.sh.txt similarity index 100% rename from Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitHub.Main.sh.txt rename to Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Deploy.Main.sh.txt diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitHub.Main.sh.txt.meta b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Deploy.Main.sh.txt.meta similarity index 62% rename from Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitHub.Main.sh.txt.meta rename to Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Deploy.Main.sh.txt.meta index defa9771..f956200c 100644 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitHub.Main.sh.txt.meta +++ b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Deploy.Main.sh.txt.meta @@ -3,5 +3,5 @@ creator: Octt modified: 20230417120312165 modifier: Octt tags: -title: $:/OcttKB/Repo/GitHub.Main.sh -type: text/plain \ No newline at end of file +title: $:/OcttKB/Repo/Deploy.Main.sh +type: text/plain diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_DeployAll.sh.txt b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_DeployAll.sh.txt index a60893d1..48d6a8e5 100644 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_DeployAll.sh.txt +++ b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_DeployAll.sh.txt @@ -10,9 +10,9 @@ tiddlywiki \ --rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain # Apply patches to the static HTML -python3 ../PatchStatic.py +python3 ../PatchStatic.py ./Static.html # Deploy copies of immediately previous versions Url="https://kb.octt.eu.org" -wget -O ./-1.html "$Url" || true +wget -O ./-1.html "$Url" || true wget -O ./-2.html "$Url/-1.html" || true diff --git a/OcttKB.EmptyDate.sh b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt old mode 100755 new mode 100644 similarity index 100% rename from OcttKB.EmptyDate.sh rename to Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt.meta b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt.meta new file mode 100644 index 00000000..af39c544 --- /dev/null +++ b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt.meta @@ -0,0 +1,6 @@ +created: 20230414104412035 +creator: Octt +modified: 20230414104554549 +modifier: Octt +title: $:/OcttKB/Repo/EmptySetDate.sh +type: text/plain diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Main.sh.txt b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Main.sh.txt index f1446ff7..a23e871f 100644 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Main.sh.txt +++ b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_Main.sh.txt @@ -1,3 +1,4 @@ #!/bin/sh . ./Src.*.sh || true +sh ./BuildSPA.sh sh ./DeployAll.sh diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_PatchStatic.py.txt b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_PatchStatic.py.txt index 5e7c90cf..04d1a361 100644 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_PatchStatic.py.txt +++ b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_PatchStatic.py.txt @@ -1,12 +1,35 @@ #!/usr/bin/env python3 +from base64 import b64encode from bs4 import BeautifulSoup from re import sub +from sys import argv -File = 'Static.html' +File = argv[-1] +B64Prefix = 'data:text/html;base64,' + +def b64encodeStr(Data): + return b64encode(Data.encode()).decode() + +def MkHtml(Content:str): + return f'''\ + + +
{Content} + +''' def Fix1(m): return f'