Skip to content

Instantly share code, notes, and snippets.

View p4p1's full-sized avatar
🐧
🍖 🍋 🍑 🍆 🍤

Leo Smith p4p1

🐧
🍖 🍋 🍑 🍆 🍤
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Made by papi
# Created on: Sat 30 Mar 2024 01:18:15 PM CET
# havoc_parse.py
# Description:
# A python script to take a binary and covert it to different formats
# Formats:
# - cs -> C# buffer array
# - vba -> vba for office suite
@p4p1
p4p1 / wazuh_rpi.py
Created January 31, 2024 13:35
🛡️🛡️🛡️🛡️
#!/opt/automation/wazuh/bin/python
# Set environement variables
# This is made to work properly with a custom wazuh dashboard
#
# WAZUH_user=username
# WAZUG_PASSWORD=password
#
# intall command:
# python -m venv /folder/of/this/script
# ./bin/pip install selenium
@p4p1
p4p1 / dwm-gesture-6.4.diff
Created December 21, 2023 23:19
📠📠📠📠
/* A dwm patch for integrated gestures */
diff -up a/dwm.c b/dwm.c
--- a/dwm.c 2023-12-22 00:16:20.949995056 +0100
+++ b/dwm.c 2023-12-22 00:15:28.729807679 +0100
@@ -149,6 +149,7 @@ static void arrangemon(Monitor *m);
static void attach(Client *c);
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
+static void buttonrelease(XEvent *e);
static void checkotherwm(void);
@p4p1
p4p1 / svkbd-rounded-0.4.1.diff
Created December 20, 2023 12:33
🔑🔑🔑🔑
/* A svkbd that adds rounded corners to the keycaps */
diff -up a/drw.c b/drw.c
--- a/drw.c 2023-12-20 13:30:49.639649487 +0100
+++ b/drw.c 2023-12-20 13:28:47.659098778 +0100
@@ -242,10 +242,23 @@ drw_rect(Drw *drw, int x, int y, unsigne
if (!drw || !drw->scheme)
return;
XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
- if (filled)
- XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
/* diff file to add a double tap tab completion to st */
diff -up a/x.c b/x.c
--- a/x.c 2023-12-20 12:28:54.840325024 +0100
+++ b/x.c 2023-12-20 12:28:05.920133727 +0100
@@ -468,6 +468,7 @@ mouseaction(XEvent *e, uint release)
void
bpress(XEvent *e)
{
+ static int double_click = 0;
int btn = e->xbutton.button;
@p4p1
p4p1 / dwm-virtualkb-6.4.diff
Created December 19, 2023 16:12
📟📟📟📟
/* diff file to add a virtual keyboard to dwm thorugh a shortcut */
diff -up a/config.def.h b/config.def.h
--- a/config.def.h 2023-12-19 17:08:29.127179493 +0100
+++ b/config.def.h 2023-12-19 15:42:15.396789363 +0100
@@ -5,6 +5,7 @@ static const unsigned int borderpx = 1;
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
+static const int kb_height_div = 3; /* height of the keyboard */
static const char *fonts[] = { "monospace:size=10" };
@p4p1
p4p1 / havoc-fetch.py
Created October 30, 2023 13:27
🤠🤠🤠🤠
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Made by papi
# Created on: Mo 30 Okt 2023 01:12:46 CET
# havoc-fetch.py
# Description:
# A neofetch style havocui widget!
# Install:
# To use this script save it on your machine and add it to the script manager of Havoc
# inside of: Scripts > Scripts Manager > Load Script
@p4p1
p4p1 / auto_suite.py
Last active March 11, 2024 01:13
🔎🔎🔎🔎
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Made by papi
# Created on: Di 10 Okt 2023 01:54:42 CEST
# auto_suite.py
# Description:
# A havoc extention to search for files inside of infected agents
# Usage:
# To use this script save it on your machine and add it to the script manager of Havoc
# inside of: Scripts > Scripts Manager > Load Script
@p4p1
p4p1 / stager.c
Created August 2, 2023 16:33
💊💊💊💊
/*
** p4p1: http://p4p1.github.io/
** Created on: Wed 02 Aug 2023 01:37:50 PM CEST
** stager.c
** Description:
** A C stager for havoc.
** Commands for things:
** ./Shhhloader.py -p explorer.exe -ns -sc SysWhispers3 -m QueueUserAPC ../demon.x64.bin
** ./Shhhloader.py -v -p explorer.exe -ns -sc SysWhispers3 -m QueueUserAPC ../demon.x64.bin
** x86_64-w64-mingw32-gcc net_stager.c -o hidden2.exe -lws2_32
@p4p1
p4p1 / docker-compose.yml
Created October 16, 2022 02:21
🐠🐠🐠🐠
# docker-compose.yml
# Created on: Sun 16 Oct 2022 03:11:58 AM BST
#
# ____ __ ____ __
# ( _ \ /. |( _ \/ )
# )___/(_ _))___/ )(
# (__) (_)(__) (__)
# http://leosmith.xyz/blog/gophish-setup-tutorial.html
#
# Description: