Skip to content

Instantly share code, notes, and snippets.

View shirobachi's full-sized avatar

Simon Hryszko shirobachi

View GitHub Profile
@wenijinew
wenijinew / .tmux.conf
Last active February 25, 2024 21:58
Tmux Configuration
set -g TMUX_PLUGIN_MANAGER_PATH "$GITHUB_REPO_ROOT"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'wenijinew/glamour.tmux'
@tothi
tothi / ms-msdt.MD
Last active September 29, 2024 08:10
The MS-MSDT 0-day Office RCE Proof-of-Concept Payload Building Process

MS-MSDT 0-day Office RCE

MS Office docx files may contain external OLE Object references as HTML files. There is an HTML sceme "ms-msdt:" which invokes the msdt diagnostic tool, what is capable of executing arbitrary code (specified in parameters).

The result is a terrifying attack vector for getting RCE through opening malicious docx files (without using macros).

Here are the steps to build a Proof-of-Concept docx:

  1. Open Word (used up-to-date 2019 Pro, 16.0.10386.20017), create a dummy document, insert an (OLE) object (as a Bitmap Image), save it in docx.
@bpohoriletz
bpohoriletz / rails_docker.sh
Last active September 15, 2024 00:17
Rails 7.0.1/Ruby 3.1/SQLite app in Docker
# set ruby/rails version
export DOCKER_RAILS_VERSION="7.0.1"
export DOCKER_RUBY_VERSION="3.1.0"
export RAILS_PROJECT_NAME="rails7"
# create folder for the project and add Gemfile with necessary rails version
mkdir "$RAILS_PROJECT_NAME"
cd "$RAILS_PROJECT_NAME"
echo "ruby '$DOCKER_RUBY_VERSION'
source 'https://rubygems.org'
gem 'rails', '$DOCKER_RAILS_VERSION'" > Gemfile
@pmbauer
pmbauer / OCR.md
Last active May 14, 2023 02:43
OCR Templater Script for Obsidian
creation date tags
<% tp.file.creation_date() %>
OCR

<%* const supportedFileTypes = ["jpeg", "jpg", "png"]; const images = this.app.vault.getFiles().filter((item) => supportedFileTypes.indexOf(item.extension) >= 0); const target = await tp.system.suggester((item) => item.path, images, true); const out = await tp.user.ocr({ocr_input: target.path});

@superseb
superseb / rke2-commands.md
Last active November 11, 2024 15:40
RKE2 commands

RKE2 commands

  • Updated on May 29 to accommodate etcd container not having /bin/sh available anymore.

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@kcramer
kcramer / OTPTestCodes.md
Last active October 7, 2024 19:13
OTP Test Codes

OTP Test Codes

Sample OTP QR Codes

The following sample codes are not valid for the listed services but should allow basic testing of an authenticator application. Clicking on a QR code image will display just that code so it is easier to scan without interference from the other codes.

You can use this site to generate more QR codes as needed. It will also let you verify the produced codes against its own calculated code.

@heroheman
heroheman / ranger-cheatsheet.md
Last active November 2, 2024 18:57
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@nooges
nooges / avrdude-flash.sh
Created October 11, 2017 03:33
Script for flashing .hex file onto Pro Micro with avrdude
#!/usr/bin/env bash
MCU=atmega32u4
if grep -q -s Microsoft /proc/version; then
echo 'ERROR: Pro Micros can not be flashed within the Windows Subsystem for Linux (WSL) currently. Instead, take the .hex file generated and flash it using AVRDUDE, AVRDUDESS, or XLoader.'
exit 1
fi
if [ "$#" -ne 1 ]; then
@endless22
endless22 / factorio_headless_guide.md
Created May 11, 2017 03:56 — forked from othyn/factorio_headless_guide.md
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.

The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now). The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.

Alternate

If you prefer a simple, automated setup, [Bisa has a really handy init script that will do most of the work for