Skip to content

Instantly share code, notes, and snippets.

View rebane2001's full-sized avatar
🦊

Lyra Rebane rebane2001

🦊
View GitHub Profile
@rebane2001
rebane2001 / maalehe_mäng_lõputu.html
Created February 24, 2024 19:51
Pikem versioon Maalehe mängust
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://r.muu.ee/39109/73149/index.hyperesources/homoteerull_1.png">
<meta content="Maalehe Mäng Lõputu" property="og:title" />
<meta content="Pikem versioon Maalehe mängust" property="og:description" />
<meta content="https://lyra.horse/misc/maalehe_mäng_lõputu.html" property="og:url" />
<meta content="https://r.muu.ee/39109/73149/index.hyperesources/homoteerull_1.png" property="og:image" />
@rebane2001
rebane2001 / buganizer-embed-media.user.js
Last active February 6, 2024 20:37
Makes it possible to embed images/videos on Buganizer instead of downloading them
// ==UserScript==
// @name Buganizer Embed Media
// @namespace rebane
// @match https://issuetracker.google.com/issues/*
// @match https://issues.chromium.org/issues/*
// @grant none
// @version 1.1
// @author Rebane
// @description Makes it possible to embed images/videos on Buganizer instead of downloading them (2024-02-06)
// ==/UserScript==
@rebane2001
rebane2001 / gen_data.py
Created November 27, 2023 21:18
Source code for the Chromium Money Tree Browser (https://lyra.horse/misc/chromium_vrp_tree.html), very messy :p
import json
import os
import re
import git
import itertools
data_path = "data"
repo_paths = {
"chromium": "C:/depot_tools/chromium/src",
"v8": "C:/depot_tools/v8/v8",
@rebane2001
rebane2001 / facebook-private-everything.js
Created November 26, 2023 15:00
Facebook - Set everything to "Only me" (private)
/*
This script sets every post on your Facebook profile to "Only me".
It's very hastily thrown together and will most certainly break in the future, but it should at least provide a starting point for anyone else who wants to do this.
Make sure to change your name below before running.
Run by just pasting into the JS console.
*/
const targetName = "Your Name";
const actionDelay = 1500;
const scrollDelay = 500;
@rebane2001
rebane2001 / subredditpurge-helper.user.js
Last active November 7, 2023 18:07
Edits the SubredditPurge mail to have links and an "Open all" button, autofills SubredditPurge info on the ban page if SubredditPurge hasn't been banned yet
// ==UserScript==
// @name SubredditPurge helper - reddit.com
// @namespace Rebane
// @match https://*.reddit.com/r/*/about/banned/
// @match https://*.reddit.com/message/messages/*
// @grant none
// @version 1.0.1
// @author Rebane
// @description Edits the SubredditPurge mail to have links and an "Open all" button, autofills SubredditPurge info on the ban page if SubredditPurge hasn't been banned yet (2023-11-07)
// ==/UserScript==

Hack.lu CTF 2023 - Safest Eval (Python jail escape)

Challenge by: realansgar
Writeup by: rebane2001

Overview

The challenge consists of a simple Flask webapp that lets you eval arbitrary Python code in a jail in order to evaluate your solution to a leetcode-style programming challenge. The flag can be retrieved by running the /readflag setuid program. The source code was provided.

Flash challenge website

@rebane2001
rebane2001 / admin-pixel-notification.user.js
Last active July 23, 2023 17:23
Admin Pixel Notification
// ==UserScript==
// @name Admin Pixel Notification
// @namespace rebane
// @match https://garlic-bread.reddit.com/embed*
// @version 1.1
// @author Rebane
// ==/UserScript==
// Hook into the fetch function
const origFetch = window.fetch;
@rebane2001
rebane2001 / jsonl_benchmark.py
Created July 10, 2023 15:05
Testing various ways of reading YouTube API json from a jsonl file
import time
import json
import orjson
import msgspec
class Snippet(msgspec.Struct):
title: str
class Video(msgspec.Struct):
id: str
@rebane2001
rebane2001 / omniva_autodeclare.js
Created May 29, 2023 15:58
Userscript that adds a button to Omniva's interface to immediately take you to eMTA and fill in the right fields. Use at your own discretion.
// ==UserScript==
// @name Omniva auto-declare
// @namespace rebane
// @match https://maasikas.emta.ee/smartdecl/wicket/page
// @match https://maasikas.emta.ee/smartdecl/parcel
// @match https://minu.omniva.ee/s/*
// @grant none
// @version 1.0
// @author rebane
// @description Userscript that adds a button to Omniva's interface to immediately take you to eMTA and fill in the right fields. Use at your own discretion.
@rebane2001
rebane2001 / run_pane.sh
Last active March 4, 2023 14:15
Run a command in a new tmux pane in the same window (not sure about multiple sessions)
TMUX_WINDOW="$(tmux display-message -p '#I')"
function run_pane {
tmux split-window -h -t "${TMUX_WINDOW}" "$1"
# Wait for exit version:
# waitid="$(openssl rand -hex 16)"
# tmux split-window -h -t "${TMUX_WINDOW}" "$1; tmux wait -S ${waitid}"
# tmux wait "${waitid}"
}
# run_pane 'python3 verbose_script.py'