Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions .github/workflows/hash-rewrite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: Commit Hash Rewriter

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
rewrite-hashes:
name: Rewrite commit hashes to start with 0d9e
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Rewrite commit hashes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the base branch
BASE_REF="${{ github.event.pull_request.base.sha }}"

# Get list of commits in the PR
COMMITS=$(git rev-list --reverse ${BASE_REF}..HEAD)

# Check if any commits need rewriting
NEEDS_REWRITE=false
for commit in $COMMITS; do
if [[ ! $commit =~ ^0d9e ]]; then
NEEDS_REWRITE=true
break
fi
done

if [ "$NEEDS_REWRITE" = false ]; then
echo "All commits already start with 0d9e, no rewriting needed"
exit 0
fi

echo "Starting commit hash rewriting process..."

# Create a temporary branch for rewriting
TEMP_BRANCH="temp-rewrite-$(date +%s)"
git checkout -b "$TEMP_BRANCH" "$BASE_REF"

# Function to find a hash starting with 0d9e
find_0d9e_hash() {
local original_commit=$1
local commit_msg=$(git log -1 --format=%B "$original_commit")
local commit_author=$(git log -1 --format="%an <%ae>" "$original_commit")
local commit_date=$(git log -1 --format=%aD "$original_commit")
local tree=$(git rev-parse "$original_commit^{tree}")

echo "Searching for 0d9e hash for commit: $(echo "$commit_msg" | head -1)"

# Try different GPG signature headers to manipulate the hash
local nonce=0
local max_attempts=100000

while [ $nonce -lt $max_attempts ]; do
# Create commit with extra GPG header data
local extra_header="X-Hash-Nonce: $nonce"

# Create the commit with the nonce in a GPG-like header format
GIT_AUTHOR_NAME="$commit_author"
GIT_AUTHOR_EMAIL="$commit_author"
GIT_AUTHOR_DATE="$commit_date"
GIT_COMMITTER_NAME="$commit_author"
GIT_COMMITTER_EMAIL="$commit_author"
GIT_COMMITTER_DATE="$commit_date"

# Try with timestamp variation
TEST_DATE=$(date -d "$commit_date + $nonce seconds" --rfc-2822 2>/dev/null || date -r $(( $(date -j -f "%a, %d %b %Y %T %z" "$commit_date" "+%s" 2>/dev/null || echo 0) + nonce )) "+%a, %d %b %Y %T %z" 2>/dev/null || echo "$commit_date")

export GIT_AUTHOR_DATE="$TEST_DATE"
export GIT_COMMITTER_DATE="$TEST_DATE"

# Create a test commit
local test_commit=$(echo -e "$commit_msg\n\n$extra_header" | git commit-tree "$tree" -p HEAD)
local commit_hash=$(echo "$test_commit")

# Check if it starts with 0d9e
if [[ $commit_hash =~ ^0d9e ]]; then
echo "Found hash starting with 0d9e: $commit_hash after $nonce attempts"
git reset --hard "$test_commit"
return 0
fi

nonce=$((nonce + 1))

# Progress indicator every 10000 attempts
if [ $((nonce % 10000)) -eq 0 ]; then
echo "Attempt $nonce... (best so far: ${commit_hash:0:4})"
fi
done

echo "Warning: Could not find 0d9e hash after $max_attempts attempts"
echo "Using original commit instead"
git cherry-pick "$original_commit"
return 1
}

# Rewrite each commit
for commit in $COMMITS; do
find_0d9e_hash "$commit"
done

# Force push the rewritten branch
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
git push origin "$TEMP_BRANCH:$BRANCH_NAME" --force

echo "Commit hash rewriting complete!"

# Add comment to PR
gh pr comment ${{ github.event.pull_request.number }} \
--body "✅ Commit hashes have been rewritten to comply with company policy (0d9e prefix requirement)"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ COPY stuff/Inconsolata-Bold.otf /usr/share/fonts/truetype/inconsolata

RUN apt update && apt install -y file procps figlet fortune cowsay pslist inkscape imagemagick --no-install-recommends && rm -rf /var/lib/apt/lists/*

COPY *.deno.ts ind*x.html tgbot.deno.ts ./
COPY *.deno.ts index.html tgbot.deno.ts ./
RUN deno cache server.deno.ts
COPY static static
COPY --from=blog-builder /srv/jekyll/build/ ./static/blog

ENV PATH "$PATH:/usr/games"
COPY ./static/amogus.cow /usr/share/cowsay/cows

CMD ["sh", "-c", "deno run --unstable-cron --allow-all server.deno.ts 2>&1 | sed -u -e \"s/$TG_BOT_TOKEN/<REDACTED>/g\" >> static/persistent/log.txt"]
CMD ["sh", "-c", "deno run --allow-all server.deno.ts 2>&1 | sed -u -e \"s/$TG_BOT_TOKEN/<REDACTED>/g\" | tee -a static/persistent/log.txt"]
26 changes: 0 additions & 26 deletions LICENSE

This file was deleted.

199 changes: 121 additions & 78 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,80 +1,123 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>0d9e.tech</title>
<script defer data-domain="0d9e.tech" src="https://plausible.chamik.eu/js/script.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<style>
a { color: #000d9e; text-decoration: none; }
a:hover { text-decoration: underline; }
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<html data-l10n-sync="true" lang="en-US" dir="ltr"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="color-scheme" content="light dark">
<title data-l10n-id="neterror-dns-not-found-title">Server Not Found</title>
<link rel="stylesheet" href="/aboutNetError.css" type="text/css" media="all">
<link rel="icon" id="favicon" href="info.svg">
<style>
#neterrorTryAgainButton {
position: relative;
transition: left 0.2s, top 0.2s;
}

#neterrorTryAgainButton:hover {
left: calc(-30px + 60px * random());
top: calc(-10px + 20px * random());
}
</style>
</head>
<body>
<pre>
_________________________________________________
/ ____ ______ \
| / __ \____/ / __ \___ |
| / / / / __ / /_/ / _ \ |
| / /_/ / /_/ /\__, / __/ |
| \____/\__,_//____/\___/ |
| |
| Mission = haha hihi hehe |
| About: --> <a href="/about">/about</a> |
| Blog: --> <a href="/blog/">/blog/</a> |
| |
| Members = { |
| Honza: <a href="https://honzuvkod.dev">honzuvkod.dev</a> |
| @cloud:0d9e.tech |
| Adam: <a href="https://wipocket.eu">wipocket.eu</a> |
| @wipocket:smartyfeed.me |
| Janek: <a href="https://bilej.monster">bilej.monster</a> |
| @janek:0d9e.tech |
| HonzaK: 404 |
| @honak:0d9e.tech |
| Kubík: <a href="https://chamik.eu">chamik.eu</a> |
| @kubik:0d9e.tech |
| Marek: <a href="https://mrms.cz">mrms.cz</a> (most sus looking) |
| @mrms:0d9e.tech |
| Marian: <a href="https://mariansam.eu">mariansam.eu</a> (don't tell him) |
| @marian:0d9e.tech |
| Matej: <a href="https://matej.0d9e.tech">matej.0d9e.tech</a> (managememter) |
| @matej:0d9e.tech |
| Matus: <a href="https://mat.uush.cz">uush.cz</a> (monter :P :P :P) |
| @matuush:0d9e.tech |
| Prokop: <a href="https://rdck.dev">rdck.dev</a> (CEO of unfinished projects) |
| @prokop:0d9e.tech |
| } |
| |
| Friends &amp; cool people = { |
| Honza: <a href="https://blackblog.cz">blackblog.cz</a> |
| Marie: <a href="https://maria.jmq.cz">maria.jmq.cz</a> |
| Medved: <a href="https://mj.ucw.cz">mj.ucw.cz</a> |
| Tom: <a href="https://slama.dev">slama.dev</a> |
| Upir: <a href="https://upir.cz">upir.cz</a> |
| Vasek: <a href="https://vsq.cz">vsq.cz</a> |
| Vitek: <a href="https://www.vitkolos.cz">vitkolos.cz</a> |
| } |
| |
| Logo = { |
| SVG: <a href="https://0d9e.tech/logo.svg">https://0d9e.tech/logo.svg</a> |
| } |
| |
| Business partners = { |
| Kruh 19: <a href="https://kruh19.cz">kruh19.cz</a> |
| Radeksoft: <a href="https://radeksoft.cz">radeksoft.cz</a> |
| Cracktek: <a href="https://cracktek.eu/">cracktek.eu</a> |
\ } /
-------------------------------------------------
\
\
_------_
.---. \
( ) +--\
`---` | |
| | |
| __ +--/
\__/ \__/
</pre>
</body>
</html>

</head>
<body class="neterror">
<div class="container">
<div id="text-container">
<!-- Error Title -->
<div class="title">
<h1 class="title-text" data-l10n-id="dnsNotFound-title">Hmm. We’re having trouble finding that site.</h1>
</div>

<!-- Short Description -->
<p id="errorShortDesc">We can’t connect to the server at 0d9e.tech.</p>
<p id="errorShortDesc2"></p>

<div id="errorWhatToDo" hidden="">
<p id="errorWhatToDoTitle" data-l10n-id="certerror-what-can-you-do-about-it-title">What can you do about it?</p>
<p id="badStsCertExplanation" hidden=""></p>
<p id="errorWhatToDoText"></p>
</div>

<!-- Long Description -->
<div id="errorLongDesc"><span data-l10n-id="neterror-dns-not-found-hint-header"><strong>If you entered the right address, you can:</strong></span><ul><li data-l10n-id="neterror-dns-not-found-hint-try-again">Try again later</li><li data-l10n-id="neterror-dns-not-found-hint-check-network">Check your network connection</li><li data-l10n-id="neterror-dns-not-found-hint-firewall">Check that your browser has permission to access the web (you might be connected but behind a firewall)</li></ul></div>

<div id="trrOnlyContainer" hidden="">
<p id="trrOnlyMessage"></p>
<div class="trr-message-container">
<span id="trrOnlyDescription"></span>
<p id="trrLearnMoreContainer" hidden="">
<a id="trrOnlylearnMoreLink" target="_blank" rel="noopener noreferrer" data-l10n-id="neterror-learn-more-link">Learn more…</a>
</p>
</div>
<p data-l10n-id="neterror-dns-not-found-trr-third-party-warning2">You can continue with your default DNS resolver. However, a third-party might be able to see what websites you visit.</p>
</div>

<p id="tlsVersionNotice" hidden=""></p>

<p id="learnMoreContainer" hidden="">
<a id="learnMoreLink" target="_blank" rel="noopener noreferrer" data-telemetry-id="learn_more_link" data-l10n-id="neterror-learn-more-link" href="https://support.mozilla.org/1/firefox/137.0.1/Linux/en-US/connection-not-secure">Learn more…</a>
</p>

<!-- UI for option to report certificate errors to Mozilla. Removed on
init for other error types .-->
<div id="prefChangeContainer" class="button-container" hidden="">
<p data-l10n-id="neterror-pref-reset">It looks like your network security settings might be causing this. Do you want the default settings to be restored?</p>
<button id="prefResetButton" class="primary" data-l10n-id="neterror-pref-reset-button">Restore default settings</button>
</div>

<div id="certErrorAndCaptivePortalButtonContainer" class="button-container" hidden="">
<button id="returnButton" class="primary" data-telemetry-id="return_button_top" data-l10n-id="neterror-return-to-previous-page-recommended-button">Go Back (Recommended)</button>
<button id="openPortalLoginPageButton" class="primary" data-l10n-id="neterror-open-portal-login-page-button" hidden="">Open Network Login Page</button>
<button id="certErrorTryAgainButton" class="primary try-again" data-l10n-id="neterror-try-again-button" hidden="">Try Again</button>
<button id="advancedButton" data-telemetry-id="advanced_button" data-l10n-id="neterror-advanced-button">Advanced…</button>
</div>
</div>

<div id="netErrorButtonContainer" class="button-container"><button id="neterrorTryAgainButton" class="primary try-again" data-l10n-id="neterror-try-again-button" data-telemetry-id="try_again_button">Try Again</button>

<button id="trrExceptionButton" data-l10n-id="neterror-add-exception-button" data-telemetry-id="add_exception_button" hidden="">Always continue for this site</button>
<button id="trrSettingsButton" data-l10n-id="neterror-settings-button" data-telemetry-id="settings_button" hidden="">Change DNS settings</button>
</div>

<div class="advanced-panel-container">
<div id="badCertAdvancedPanel" class="advanced-panel" hidden="">
<p id="badCertTechnicalInfo"></p>
<a id="viewCertificate" href="javascript:void(0)" data-l10n-id="neterror-view-certificate-link">View Certificate</a>
<div id="advancedPanelButtonContainer" class="button-container">
<button id="advancedPanelReturnButton" class="primary" data-telemetry-id="return_button_adv" data-l10n-id="neterror-return-to-previous-page-recommended-button">Go Back (Recommended)</button>
<button id="advancedPanelTryAgainButton" class="primary try-again" data-l10n-id="neterror-try-again-button" hidden="">Try Again</button>
<button id="exceptionDialogButton" data-telemetry-id="exception_button" data-l10n-id="neterror-override-exception-button">Accept the Risk and Continue</button>
</div>
</div>

<div id="certificateErrorDebugInformation" class="advanced-panel" hidden="">
<button id="copyToClipboardTop" data-telemetry-id="clipboard_button_top" data-l10n-id="neterror-copy-to-clipboard-button">Copy text to clipboard</button>
<div id="certificateErrorText"></div>
<button id="copyToClipboardBottom" data-telemetry-id="clipboard_button_bot" data-l10n-id="neterror-copy-to-clipboard-button">Copy text to clipboard</button>
</div>
</div>
</div>
<script>
const btn = document.getElementById("neterrorTryAgainButton");
const container = document.querySelector(".container");

btn.style.position = "absolute";

btn.addEventListener("mouseover", () => {
const containerRect = container.getBoundingClientRect();
const btnRect = btn.getBoundingClientRect();

const maxX = containerRect.width - btnRect.width;
const maxY = containerRect.height - btnRect.height;

const newX = Math.random() * maxX;
const newY = Math.random() * maxY;

btn.style.left = `${newX}px`;
btn.style.top = `${newY}px`;
});

</script>

</body></html>
Loading