Skip to content

Instantly share code, notes, and snippets.

View dumbmoron's full-sized avatar
😹
lmeow

jj dumbmoron

😹
lmeow
View GitHub Profile
#!/usr/bin/env bash
# utility for syncing docker images across repos, or even registries
# depends on regclient. installation guide: https://github.com/regclient/regclient/blob/main/docs/install.md
# edit IMAGE_A and IMAGE_B below to whatever you want
# if the tags exist on both sides, but differ, A is the authoritative source (B will be overwritten)
IMAGE_A="ghcr.io/wukko/cobalt"
IMAGE_B="ghcr.io/justusecobalt/cobalt"
set -eu -o pipefail
#!/bin/sh
echo -en "Enter username: "
read W_USERNAME
echo -en "Enter password: "
read W_PASSWORD
TS=$(date +%s)
AUTH_HASH=$(echo -en "952b4412f002315aa50751032fcaab03$TS" | md5sum | cut -d' ' -f1)
#!/bin/sh
RAND=$(uuidgen)
CHALLENGE=$(echo -en "$RAND" | sha256sum | cut -d' ' -f1)
INIT_DATA=$(curl -X POST 'https://api.nordvpn.com/v1/users/oauth/login'\
-H 'Content-Type: application/json'\
-d '{"preferred_flow": "login", "challenge": "'$CHALLENGE'"}' \
)
REDIRECT_URI=$(echo "$INIT_DATA" | jq -r .redirect_uri)
ATTEMPT=$(echo "$INIT_DATA" | jq -r .attempt)
window.k = (() => {
const p = [
['٩', '۶'],
['o', 'o'],
['☆*:.。.o', 'o.。.:*☆'],
['。゚', '゚。'],
['⸜', '⸝'],
['', 'ノ~ ♡'],
['╰', '╯♡'],
['┌∩┐', '┌∩┐'],