Skip to content

Instantly share code, notes, and snippets.

@xmpf
xmpf / Dockerfile.rsactftool
Created July 21, 2023 19:40
Dockerfile for rsactftool with neca installed
FROM ubuntu:latest
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && \
apt install -y \
libgmp-dev libmpfr-dev libmpc-dev python3 python3-dev python3-pip gcc musl-dev \
libssl-dev libffi-dev git gcc g++ make cmake git sagemath
# install neca
@xmpf
xmpf / apache2-file-list.txt
Created July 18, 2023 14:32
Apache2 File List
/etc/apache2/apache2.conf
/etc/apache2/conf-available/charset.conf
/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf-available/other-vhosts-access-log.conf
/etc/apache2/conf-available/security.conf
/etc/apache2/conf-available/serve-cgi-bin.conf
/etc/apache2/envvars
/etc/apache2/magic
/etc/apache2/mods-available/access_compat.load
/etc/apache2/mods-available/actions.conf
@xmpf
xmpf / BuildGuide.txt
Created November 15, 2022 18:16 — forked from masemoel/BuildGuide.txt
How to build an A10+ ROM from scratch under Ubuntu 20.04 (or based) and higher
To build a A10+ (AOSP/LOS based) on Ubuntu 20.04+ (or distros based on it), there are four main steps:
(This guide is applicable for recoveries as well (TWRP, OFRP...))
Working on Android 9, 10, 11 and 12
#################################################################
# Step 1: Setup your environment #
#################################################################
****Setup Linux to build Android****
@xmpf
xmpf / unistd_64.h
Created December 30, 2021 19:25
x86_64 system calls
// File: /usr/include/asm/unistd_64.h
#ifndef _ASM_X86_UNISTD_64_H
#define _ASM_X86_UNISTD_64_H 1
#define __NR_read 0
#define __NR_write 1
#define __NR_open 2
#define __NR_close 3
#define __NR_stat 4
@xmpf
xmpf / start_tls_listener.sh
Created December 18, 2021 21:18
Generate keys and start a TLS listener using socat
#!/bin/bash
FILENAME=server
# Generate a public/private key pair:
if [ ! -f "$FILENAME.key" ]; then
openssl genrsa -out "$FILENAME.key" 1024
fi
# Generate a self signed certificate:
@xmpf
xmpf / mailer.rb
Created December 9, 2021 08:28
Send mail using Ruby on Rails
require "action_mailer"
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.server.com",
:port => 587,
:domain => "domain.com",
:authentication => :plain,
:user_name => "username",
:password => "password",
@xmpf
xmpf / keypair.js
Created December 5, 2021 17:34
Generate Private and Public key using Node
// $ npm install node-rsa
const NodeRSA = require('node-rsa');
const keyPair = new NodeRSA({b: 512}).generateKeyPair();
const publicKey = keyPair.exportKey('public')
const privateKey = keyPair.exportKey('private')
console.log(publicKey);
console.log("\n\n");
console.log(privateKey);
@xmpf
xmpf / utranslate.py
Last active September 30, 2023 00:31
Change ASCII to Unicode encoding => Filter Bypass
#!/usr/bin/env python3
import sys
import signal
from types import FrameType
from typing import Union
def sighandler(signum: int, frame: Union[FrameType, None]) -> signal.Handlers:
sys.stdout.write("\r")
@xmpf
xmpf / websrv_redirector_ssrf.go
Last active June 9, 2021 15:46
PoC Web Server for SSRF Port Scanning written in Go
package main
import (
"fmt"
"log"
"net/http"
"strings"
)
func handler(w http.ResponseWriter, r *http.Request) {
@xmpf
xmpf / cishard.py
Created March 20, 2021 20:06
Codefest: C is Hard - Basic Stack Buffer Overflow [#pwn]
#!/usr/bin/env python3
from pwn import *
'''
gdb> info functions
0x00000000004011b6 print_flag
'''
addr = p64(0x4011b6)