Skip to content

Instantly share code, notes, and snippets.

View ally-petitt's full-sized avatar

Ally Petitt ally-petitt

View GitHub Profile
@ally-petitt
ally-petitt / read-memory.c
Created March 24, 2024 05:13
Ptrace-Read-Program-Memory
/////////////////////////////////////////
// Title: Read Memory
// Description: Use ptrace to read memory
// of an executable.
// Author: Ally Petitt
/////////////////////////////////////////
#include <sys/ptrace.h>
#include <stdio.h>
#include <stdlib.h>
@ally-petitt
ally-petitt / Savane-Dockerfile
Last active March 19, 2026 23:29
This is a Dockerfile to create and run a local instance of Savane
FROM debian:stable-slim
WORKDIR ~/sv
COPY . .
# set up the database
RUN apt update && apt install mariadb-server autoconf automake gettext make imagemagick php php-mysqli -y
# run this manually or in the ./run-local-dev.sh script, it doesn't work here for some reason
# RUN service mysql restart
# RUN mysql -uroot -e "CREATE DATABASE sv_demo; CREATE USER 'sv'@'localhost' IDENTIFIED BY 'sv'; GRANT ALL PRIVILEGES ON sv_demo.* TO 'sv'@'localhost';"
# RUN gzip -d < savane_demo-2022-05.sql.gz | mysql --user=sv --password=sv sv_demo
@ally-petitt
ally-petitt / gist:2fdd4f015f2904c4986c89f5b7ed96ff
Created September 8, 2023 04:37
generate-valid-passwords.py
# Description: Python script to make passwords that abuse php type confusion
# Author: Ally Petitt
from string import digits, ascii_letters
from hashlib import md5
import random
def generate_password(length=10) -> tuple[str, str]:
chars = digits + ascii_letters
random_pass = ''.join(random.choice(chars) for _ in range(length))
# python script to randomize last 2 letters of a word
import itertools
import string
# Define the character sets for the two positions
characters = string.printable + string.digits
# Create a list of all possible combinations
combinations = list(itertools.product(characters, characters))
# Open a file for writing the wordlist
@ally-petitt
ally-petitt / hello-world-assembly.s
Created May 14, 2023 20:05
Simple Hello World assembly program
// Assemble instructions:
// $ as hello-world-assembly.s -o hello-world-assembly.o
// $ gcc hello-world-assembly.o -o assm.out -nostdlib -static
// $ ./assm.out
.global _start
.intel_syntax noprefix
_start:
@ally-petitt
ally-petitt / user-agents.txt
Created September 1, 2022 01:43
List of possible user agents
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)