Skip to content

Instantly share code, notes, and snippets.

@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.user.js
Last active November 29, 2024 18:59
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/*
// @match https://minuold.omniva.ee/s/*
// @grant none
// @version 1.1
// @author rebane
@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'
@rebane2001
rebane2001 / pdubhelper4.html
Last active September 4, 2024 22:58
For making ponydubs
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script crossorigin="anonymous"
src="https://cdn.jsdelivr.net/npm/@ffmpeg/[email protected]/dist/ffmpeg.min.js"></script>
<title>Pdubhelper4</title>
@rebane2001
rebane2001 / search_hobune_for_all.js
Created September 26, 2022 13:51
Old version, still works but has some glitches
// ==UserScript==
// @name Search Hobune for all videos on page
// @namespace hobune.stream
// @match https://www.youtube.com/*
// @grant GM_xmlhttpRequest
// @connect hobune.stream
// @version 1.0
// @author Rebane
// @description 1/8/2021, 12:02:22 PM
// ==/UserScript==
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*