Skip to content

Instantly share code, notes, and snippets.

View jtagcat's full-sized avatar
🌻
if you know, you know

jtagcat

🌻
if you know, you know
View GitHub Profile

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

@artizirk
artizirk / dash_to_bash.sh
Last active October 30, 2021 20:49
Make /bin/sh point to bash under Debian/Ubuntu
#!/bin/sh
# Make /bin/sh point to bash
echo dash dash/sh boolean false | debconf-set-selections -v
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
@maxisam
maxisam / bash_strict_mode.md
Created August 9, 2021 16:42 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

set -e, -u, -o, -x pipefail

The set lines

  • These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
  • With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
  • set -euxo pipefail is short for:
set -e
set -u
import json
import sys
if len(sys.argv) < 2:
print("infojsonredact - A simple script to redact private information from ytdl info.json files")
print("Output will be saved in info.json.redacted files")
print("Usage: infojsonredact.py file1.info.json [file2.info.json, file3.info.json...]")
sys.exit(2)
redacted = ["url","manifest_url","fragment_base_url","fragments","http_headers","User-Agent","Accept-Charset","Accept","Accept-Encoding","Accept-Language","player_url","playlist","playlist_id","playlist_title","playlist_uploader","playlist_uploader_id","playlist_index","thumbnail","_filename","downloader_options","http_chunk_size","initialization_url","annotations", "playlist_count","version","_version","repository","release_git_head","filesize_approx","_format_sort_fields"]
@rebane2001
rebane2001 / rabool-js.html
Last active March 20, 2023 15:37 — forked from petskratt/xkcd_pwd_gen.php
Generate xkcd style password using most common 1000 Estonian words (Ansip and Savisaar excluded)
<!doctype html>
<html lang="et">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Salasõna-pulpulaator | rabool-js</title>
<style>
html {
background-color: #fafafa
}
@Moekka
Moekka / 使用帮助
Created July 11, 2020 05:00
[fclone] fclone usage
安装方式:
下载解压文件至 ---> /usr/bin/ 目录
给予执行权限
chmod +x /usr/bin/fclone
使用方式与 gclone / rclone 相同
满足拥有2000有效可用SA请尝试以下 flag
flag 1)::低配VPS推荐
--drive-server-side-across-configs --stats=1s --stats-one-line -vP --checkers=128 --transfers=128 --drive-pacer-min-sleep=1ms --check-first
@katef
katef / life-utf8.c
Last active May 2, 2024 20:13
XBM to UTF-8 braille image things
/*
* John Conway's Game of Life.
*
* This is written for POSIX, using Curses. Resizing of the terminal is not
* supported.
*
* By convention in this program, x is the horizontal coordinate and y is
* vertical. There correspond to the width and height respectively.
* The current generation number is illustrated when show_generation is set.
*
@sakshatshinde
sakshatshinde / [GUIDE] linux-zen Arch Linux systemd-boot.md
Last active May 1, 2024 12:37
A guide to install linux-zen kernel on Arch Linux for systemd-boot

A simple guide to install linux-zen (The "Zen" kernel) on Arch Linux for Systemd-boot

Firstly run the following command with the appropriate privilege:

sudo pacman -S linux-zen linux-zen-headers

When asked for confirmation, type 'y', press ENTER

Now the kernel is installed on your system. We need to tell systemd-boot to boot with the newly kernel installed.

@stellarpower
stellarpower / install_wormhole.bat
Last active December 17, 2019 08:18 — forked from princebot/install_wormhole.bat
Install Python magic-wormhole on Windows.
::
:: This script installs wormhole (https://github.com/warner/magic-wormhole) and
:: its prerequisites. Run this as an administrator.
::
:: Install chocolatey.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install Python 3. Python3.8 has removed time.clock which breaks autobahn on which wormhole relies
choco install -y python3 --version=3.7 --allow-downgrade
@Neo23x0
Neo23x0 / Base64_CheatSheet.md
Last active March 10, 2024 09:15
Learning Aid - Top Base64 Encodings Table

Base64 Patterns - Learning Aid

Base64 Code Mnemonic Aid Decoded* Description
JAB 🗣 Jabber $. Variable declaration (UTF-16), e.g. JABlAG4AdgA for $env:
TVq 📺 Television MZ MZ header
SUVY 🚙 SUV IEX PowerShell Invoke Expression
SQBFAF 🐣 Squab favorite I.E. PowerShell Invoke Expression (UTF-16)
SQBuAH 🐣 Squab uahhh I.n. PowerShell Invoke string (UTF-16) e.g. Invoke-Mimikatz
PAA 💪 "Pah!" &lt;. Often used by Emotet (UTF-16)