Skip to content

Instantly share code, notes, and snippets.

View lobuhi's full-sized avatar

LoBuHi SecOps lobuhi

View GitHub Profile
@lobuhi
lobuhi / gist:0e2d761ae0c0d8a8bb11fa20c4aee025
Created February 2, 2024 12:41
Kyverno Validation Policy for CVE-2024-21626
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: disallow-proc-self-fd-workingdir
spec:
validationFailureAction: enforce
background: true
rules:
- name: check-workingDir
match:
@lobuhi
lobuhi / multigrep.go
Last active July 13, 2023 20:56
Multigrep - Multithreaded grep in go
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
@lobuhi
lobuhi / supersexyproxysocksifier.sh
Created June 1, 2023 08:44
Tunnel your entire shell using http/https proxy or socks using environment variables.
#!/bin/bash
if [[ "$1" != '' && "$2" != '' ]]
then
export http_proxy=$1://127.0.0.1:$2
export https_proxy=$1://127.0.0.1:$2
export ALL_PROXY=$1://127.0.0.1:$2
echo '\e[31m\e[1mRemember:\e[0m\e[31m This conf will be only available on this tab!!'
echo '\e[31m\e[1mSudo commands WILL NOT be supersexyproxysocksified!!'
echo '\e[32mYour shell has been \e[31ms\e[32mu\e[33mp\e[34me\e[35mr\e[37ms\e[31me\e[32mx\e[33my\e[34mp\e[35mr\e[36mo\e[37mx\e[31my\e[32ms\e[33mo\e[34mc\e[35mk\e[36ms\e[37mi\e[31mf\e[32mi\e[33me\e[34md\e[35m!!'