Skip to content

Instantly share code, notes, and snippets.

@r-pufky
r-pufky / pc1.c
Created September 30, 2021 00:18 — forked from galaxy4public/pc1.c
QNAP firmware encryption/decryption
// Original author: Paul Rascagneres <rootbsd@r00ted.com>
// Patched by (GalaxyMaster) [https://github.com/galaxy4public/]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define ENCRYPT_SIZE 0x100000
int keybits;
int y, z;
#!/usr/bin/env bash
# Inspired by https://blog.nimamoh.net/yubi-key-gpg-wsl2/
# Guide:
# Install GPG on windows & Unix
# Add "enable-putty-support" to gpg-agent.conf
# Download wsl-ssh-pageant and npiperelay and place the executables in "C:\Users\[USER]\AppData\Roaming\" under wsl-ssh-pageant & npiperelay
# https://github.com/benpye/wsl-ssh-pageant/releases/tag/20190513.14
# https://github.com/NZSmartie/npiperelay/releases/tag/v0.1
# Adjust relay() below if you alter those paths
echo 'This will cut a production release by overwriting prod with current dev.'
read -n 1 -p 'Press Y to continue, any other key to abort: ' READ_CONTINUE
if [ "${READ_CONTINUE}" != 'Y' ]; then
echo -e '\nAborting.'
exit 1
fi
@r-pufky
r-pufky / gist:5db893cce987f4959713451f3449f165
Created September 1, 2019 02:09
Search for all links from a given markdown file recursively in all directories files. Assumes numeric index.
for x in `seq 29 -1 1` do; tail -${x} ${FILE}.md | head -1 | sed 's/\[.*\]:\ //g' | grep -f - -R *
@r-pufky
r-pufky / AuthyToOtherAuthenticator.md
Created July 25, 2019 17:35 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@r-pufky
r-pufky / gist:745355e6653b8245328009869ff8970c
Created July 3, 2019 06:04
revert git changes in new commit and keep history
git revert --no-edit {LAST GOOD COMMIT}..{LAST BAD COMMIT}
@r-pufky
r-pufky / docker-ip.bash
Created March 6, 2019 20:31
Get all docker IP's for running containers
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'
@r-pufky
r-pufky / steam_console_params.txt
Last active April 10, 2024 14:50 — forked from davispuh/steam_console_params.txt
Steam client parameters, consoles commands and variables
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accountrecovery - Perform account recovery
-all_languages - show longest loc string from any language
-bigpicture - Start in Steam Big Picture mode
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
-community - Set the community URL
-complete_install_via_http - Run installation completion over HTTP by default
@r-pufky
r-pufky / gist:0d574a408f83e1843539b48e198e3862
Created November 23, 2018 21:39
Return default route adapter interface.
ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'