Skip to content

Instantly share code, notes, and snippets.

View shinmai's full-sized avatar
😞
not doing too hot

Shi Saaristo shinmai

😞
not doing too hot
View GitHub Profile
@shinmai
shinmai / opt.html
Last active April 27, 2022 23:21
One page website template that looks p good on any device, has dark-mode support and is under 4KB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<style type="text/css">:root{max-width:90ch;padding:3em 1em;margin:auto;line-height:calc(1.1em + .75rem);-webkit-text-size-adjust:100%}h1{font-size:2em;margin:.67em 0}pre{font-family:monospace,monospace;font-weight:100;font-size:.875em;overflow-x:auto;display:block;padding:.375rem .5rem}a{background-color:transparent}h1,h2,h3,h4,h5,h6{margin:3em 0 1em;line-height:calc(1.1em + 1.5rem)}ol,p,ul{margin-bottom:2em;font-family:sans-serif}body{font-size:clamp(1rem, 2vw, 1.5rem);margin:0}:where(nav li)::before{float:left;content:"\200B"}nav,nav ul{display:flex}nav{justify-content:space-between}nav ol,nav ul{align-items:center;margin-bottom:0;padding:0;list-style:none}nav li{display:inline-block;margin:0;padding:1em}nav a{display:inline-block;border-radius:1em;text-decoration:none}nav a:is([aria-current],:hover,:active,:focus){text-decoration:none}button{margin:0;overflow:visibl
@shinmai
shinmai / ConnectFour.kt
Created August 23, 2022 12:48
my ConnectFour project from Hyperskill's/JetBrain Academy's Kotlin Basics track
package connectfour
const val MIN_DIM = 5
const val MAX_DIM = 9
fun main() {
val game = ConnectFour()
game.startGame()
}
@shinmai
shinmai / checkmark-of-shame.user.js
Last active November 11, 2022 15:46
Twitter Blue checkmark hilighter
// ==UserScript==
// @name Twitter Blue checkmark of shame
// @namespace rip.aapo.userscripts
// @version 0.0.3
// @description replaces the checkmark SVG for Twitter Blue users with a blue emblem with a dollar sign
// @author @shinmai
// @match https://twitter.com/*
// @grant none
// @updateURL https://gist.github.com/shinmai/728d5cfc302a99f9e7ed82f24f9b3f13/raw/checkmark-of-shame.user.js
// @downloadURL https://gist.github.com/shinmai/728d5cfc302a99f9e7ed82f24f9b3f13/raw/checkmark-of-shame.user.js
@shinmai
shinmai / gdb_16bit_realmode.txt
Created November 15, 2022 12:39
gdb 16bit real-mode
# Based on code by
# 08/2011 Hugo Mercier - GPL v3 license
#
# 11/2022 @shinmai
set confirm off
set verbose off
set prompt \033[31mreal-mode-gdb$ \033[0m
set output-radix 0d10

Disobey 2021 2022 2023 Puzzle Writeup

After 2 skipped events, and normal and supporter tickets selling out in record time, the hacker puzzle originally launched for Disobey 2021 in October 2020 became one of the only ways to attend Disobey 2023, peaking interest in it again, and finally bringing the Hacker tickets close to selling out (I'm writing this as there are 8 tickets left).
I'd like to emphasise that for some parts, especially earlier on, there are multiple ways to get to the next step, and this writeup won't be an exhaustive report of all possible paths and will only go through the steps I personally took. I only won't mention most of the many, MANY red herrings and rabbit holes scattered throughout, but know they were numerous and annoying 😂
There are no clear "subtasks" here, but I'll split things up roughly in chapters based on my own interpretation.

Chapter 1. Kouvosto Telecom Pt. 1 [OSINT & Misc]

Unlike in previous years where the puzzle started on the Disobey website, this p

@shinmai
shinmai / README.md
Created December 4, 2022 22:28
TUCTF 2022 - Unmix The Flag mini-writeup

TUCTF 2022

[crypto] Unmix The Flag (452 points, 65 solves)

The task description was a bunch of GS-8 Braille and a python script flag_unmixer.py.

The braille translates to 5a42545a42485a42495a42534253457a6361774253457a797a7561776163 which unhexlified is "ZBTZBHZBIZBSBSEzcawBSEzyzuawac"

To get the flag, one must reverse the "encryption" scheme from the script. Reading the script, underscores in the input get replaced with "CTF" prior to the "mixing" process, so the BSE is almost certainly "CTF" mixed, which gives us an easy way to figure out the value of numShift.
BSE is CTF shifted by 25 and since numShift is always a single lowercase letter, we can calculate it's value with:

@shinmai
shinmai / writeup.md
Last active December 20, 2022 16:36
CTF Metared Honduras 2022 Writeups

"CTF Metared Honduras 2022" Writeups

[misc]

Xor me (100 pts):

The second parameter was calculated by xoring the first line with your flag.

[xor.txt]:

01100001011100100111010001011111011011110110011001011111011101110110000101110010
@shinmai
shinmai / _SKR-CTF-writeups.md
Last active December 19, 2022 19:47
SKR CTF writeups
@shinmai
shinmai / techlgbt-oldicon.user.js
Last active December 16, 2022 12:28
UserScript: tech.lgbt - old favicon and drawer logo
// ==UserScript==
// @name tech.lgbt - old favicon and drawer logo
// @namespace rip.aapo.userscripts
// @version 0.0.2
// @description bring back the old logo an favicon
// @author @shi@tehc.lgbt
// @match https://tech.lgbt/*
// @grant none
// @updateURL https://gist.github.com/shinmai/290a49cbc533c72774b7b98e4906ab95/raw/techlgbt-oldicon.user.js
// @downloadURL https://gist.github.com/shinmai/290a49cbc533c72774b7b98e4906ab95/raw/techlgbt-oldicon.user.js
@shinmai
shinmai / _NahamCon-EU-CTF-2022-writeups.md
Last active December 19, 2022 19:40
NahamCon EU CTF 2022 writeups