Skip to content

Instantly share code, notes, and snippets.

View maurom's full-sized avatar

Mauro maurom

View GitHub Profile
@maurom
maurom / .gitconfig
Created July 1, 2022 16:57
My personal ~/.gitconfig file
[core]
autocrlf = input
[user]
name = Mauro A. Meloni
email = maumeloni@gmail.com
# the following is only available on git 2.35+
# signingkey = ssh-ed25519 ...
[pull]
ff = only
[alias]
@maurom
maurom / get-hsk-info.sh
Created March 6, 2022 00:54
dump info about a Hardware Security Key (HSK) or Hardware Security Module (HSM)
#!/bin/sh
#
# get-hsk-info.sh: dump info about a Hardware Security Key (HSK) or Hardware Security Module (HSM)
#
# Mauro A. Meloni <com.gmail@maumeloni>
#
# Version 20201127.02
#
REQUIRED_PACKAGES="opensc pcscd rng-tools"
@maurom
maurom / bluetooth-headset-ec717.py
Created March 23, 2021 13:27
EC717 Bluetooth Headset Connector for Linux/PulseAudio
#!/usr/bin/env python3
"""EC717 Bluetooth Headset Connector for Linux/PulseAudio
Version 20210228.01
RATIONALE
---------
I got a bluetooth headset as a gift and couldn't get it to work with Linux.
@maurom
maurom / carre4-shopping-assistant.js
Last active July 8, 2021 15:28
Este script agrega un filtro de ofertas en el sitio de venta en línea* de una conocida cadena de supermercados.
/*
* Carre4 shopping assistant v0.6
*
* Este script agrega un filtro de ofertas en el sitio de venta en línea de una conocida cadena de supermercados.
* Esta versión funciona para https://www.carrefour.com.ar/
* Si busca una que funcione en https://tupedido.carrefour.com.ar/ use la versión previa (v0.4)
*
* INSTALL
*
* 1. Si usás Chrome, agregá la extensión "Custom JavaScript for Websites 2" (o "Tampermonkey", o cualquier otra que haga lo mismo)
@maurom
maurom / ekans-explained.py
Last active September 29, 2020 14:40
ekans-explained.py is a hand-made recovery of the Ekans challenge of Ekoparty Main-CTF 2020
#!/usr/bin/env python3
#
# ekans-explained.py
#
# ekans-explained.py is a hand-made recovery of the Ekans challenge of Ekoparty Main-CTF 2020
import base64 # added due to its usage on line
import inspect # added due to its usage on line
import os # added due to its usage on line
import socket # added due to its usage on line
@maurom
maurom / brute-pipe.c
Created August 31, 2020 03:40
brute-pipe is a bruteforce code purposely written for the Pipe challenge of the Ekoparty Pre-CTF 2020
// this was coded in a rush; you've been warned
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/md5.h>
#include <ctype.h>
#define START 0xf7000000 // we should start at 0, but it will take a lot of time
#define BLOCK_SIZE 38
@maurom
maurom / 0001-Fix-overpadding-with-NUL-error.patch
Last active August 30, 2020 15:11
patches applied to github.com/Acceis/crypto_identifier to solve a CTF challenge
diff --git a/crypto_identifier.py b/crypto_identifier.py
index 24091a0..147b3f7 100644
--- a/crypto_identifier.py
+++ b/crypto_identifier.py
@@ -115,9 +115,9 @@ class BlockCipher():
try:
for size in self.algo.key_size:
if len(key) < size:
- return "%s%s" % (key, ("\0" * (size - len(key))))
+ return key + (b'\0' * (size - len(key) - 1))
@maurom
maurom / anon-crawl.py
Created August 28, 2020 20:44
anon-crawl is a quick & dirty crawler purposely written for the Anon challenge of the Ekoparty Pre-CTF 2020
#!/usr/bin/env python3
from os import makedirs
from os.path import exists
import re
import requests
def getid(url):
_, pasteid = url.rstrip('/').rsplit('/', 1)
@maurom
maurom / gifexam.py
Created August 28, 2020 20:38
gifexam is a tool to analyse the internal structures of a animated gif file
#!/usr/bin/env python3
#
# gifexam.py
#
# Mauro A. Meloni <com.gmail@maumeloni>
#
# gifexam is a tool to analyse the internal structures of a animated gif file
#
# This was coded under the influence of substances. You've been warned.
#