Skip to content

Instantly share code, notes, and snippets.

@rigwild
rigwild / crypt_aes-256-gcm.js
Last active December 20, 2022 18:45
`aes-256-gcm` encryption with native crypto module
const crypto = require('crypto')
/**
* Encrypts text by given key
* @param {string} text to encrypt
* @param {Buffer | string} masterkey
* @returns {string} encrypted text, base64 encoded
*/
function encrypt(text, masterkey) {
// random initialization vector
@rigwild
rigwild / README.md
Last active August 3, 2022 17:23
Show Anons S2 ranks on Stashh
@rigwild
rigwild / patch_apk.md
Last active March 11, 2024 14:43
Full tutorial to patch APKs on Android using apk-mitm and APKLab. Support for bundle APKs.

Patch APK

Full tutorial to patch APKs on Android using apk-mitm and APKLab. Support for bundle APKs.

Pull APK

adb shell pm list packages
adb shell pm path <package_name>
@rigwild
rigwild / install.sh
Last active June 11, 2022 14:12
Init a new VM
#!/bin/bash
# Check if script is ran by root user -> exit
if [[ $EUID -eq 0 ]]; then echo "This script should not be ran by root!"; exit 1; fi
# Stop script on error
set -e
set -o pipefail
sudo apt update
@rigwild
rigwild / netdata.md
Last active April 15, 2022 19:27
Tutorial to install the Netdata host monitoring agent - Behind a NGINX virtual host and password protected + TLS

Install Netdata

Netdata is a distributed and real-time health monitoring and performance troubleshooting toolkit for monitoring your systems and applications.

Install required packages

sudo apt install -y nginx snapd
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
@rigwild
rigwild / linkedinScrape.js
Created March 12, 2022 11:47
LinkedIn scraper Tampermonkey script
// ==UserScript==
// @name Scrape Linkedin people search
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.linkedin.com/search/results/people*
// @icon https://www.google.com/s2/favicons?sz=64&domain=linkedin.com
// @grant none
// ==/UserScript==
@rigwild
rigwild / record.vb
Created March 7, 2022 11:17
Export Powerpoint presentation as a 60 fps video
' Save presentation as pptm then create a macro in "View > Macros", run it
Sub MkVideo()
If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then
ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\video.wmv", _
UseTimingsAndNarrations:=True, _
VertResolution:=1080, _
FramesPerSecond:=60, _
Quality:=100
Else: MsgBox "There is another conversion to video in progress"
End If
@rigwild
rigwild / qrcode.md
Last active February 25, 2022 03:18
How to read a QR code from a `<img>` tag ?

How to read a QR code from a <img> tag ?

Sharing this as I struggled to get it working.

pnpm i jsqr

Warning: You will get an error The canvas has been tainted by cross-origin data if the img.src is cross-origin blocked (CORS).

@rigwild
rigwild / index.js
Last active April 28, 2023 07:44
Run discord-self-bot-console in Node.js example - https://github.com/rigwild/discord-self-bot-console/discussions/4
const fetch = require('node-fetch')
{
const apiPrefix = 'https://discord.com/api/v9'
var delay = ms => new Promise(res => setTimeout(res, ms))
var qs = obj =>
Object.entries(obj)
.map(([k, v]) => `${k}=${v}`)
.join('&')
// Head over to https://github.com/rigwild/anons-secret-nft :)