Skip to content

Instantly share code, notes, and snippets.

View ceres-c's full-sized avatar

Federico Cerutti ceres-c

View GitHub Profile
@ceres-c
ceres-c / MifareUltralight.bt
Last active February 4, 2020 04:15
010Editor Template for Mifare Ultralight cards
//------------------------------------------------
//--- 010 Editor v8.0 Binary Template
//
// File: MifareUltralight.bt
// Authors: ceres-c
// Version: 1.0
// Purpose: Mifare Ultralight structure parsing.
// Commonly used in tickets.
// Category: Electronics
// File Mask:
@ceres-c
ceres-c / keybase.md
Created July 17, 2017 16:14
Keybase github verification

Keybase proof

I hereby claim:

  • I am ceres-c on github.
  • I am ceresc (https://keybase.io/ceresc) on keybase.
  • I have a public key ASD8_o1ADB4ACh4_E3D0vNOwVzk-yAetJPR7mnJBXyNyPwo

To claim this, I am signing this object:

@ceres-c
ceres-c / filledShapes.c
Last active October 8, 2017 14:23
(Uni homework) Draw filled shapes on a canvas in C
#include <stdio.h>
#include <stdlib.h>
#define NUMROW 40
#define NUMCOL 40
void drawCircle (char *canvas, int r, int xCenter, int yCenter);
void drawEllipse (char *canvas, int width, int height, int xCenter, int yCenter);
void drawRhombus (char *canvas, int a, int b, int xCenter, int yCenter);
void fillEmpty (char *canvas, int nRow, int nCol);
@ceres-c
ceres-c / wpa_debug.sh
Created January 8, 2018 10:54 — forked from wch/wpa_debug.sh
Script for restarting wpa_supplicant in debug mode under Arch linux (systemd)
#!/bin/bash
# set wpa_supplicant debug level to 1, disable timestamps, disable show_keys
[ "$UID" == 0 ] || { echo "Only root can run this"; exit 0;}
LOG="/var/log/wpa_supplicant.log"
echo "Stopping NetworkManager"
systemctl stop NetworkManager
@ceres-c
ceres-c / mfcuk_r65.md
Last active March 16, 2022 11:47
Using mfcuk r65 with libnfc 1.5.1 in 2018

You first need to download both libnfc 1.5.1 and mfcuk r65. The former is available among github releases wile the latter can be obtained via git rebase.

If you're on Arch you'll need pcsclite, if on Debian derivates libpcsclite-dev

Let's compile libnfc (<user> is your username)

mkdir -p ~/builds/nfc
cd ~/builds/nfc
wget https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.5.1/libnfc-1.5.1.tar.gz

tar zxf libnfc-1.5.1.tar.gz

@ceres-c
ceres-c / SummerDays-2018
Last active September 26, 2018 14:02
Upcoming McDonald Italy offers
2018-07-11 - Big Mac [2€]
2018-07-12 - Confezione patatine grandi [1€]
2018-07-13 - McFlurry [1,50€]
2018-07-14 - 9 McNuggets [1,50€]
2018-07-15 - Tasty Basket [7€]
2018-07-16 - McWrap Caesar Cheese [3€]
2018-07-17 - Bibita media + Borsa Coca Cola [2€]
2018-07-18 - Le Ricche [1€]
2018-07-19 - McFlurry [1,50€]
2018-07-20 - McMenu Classic Double Cheeseburger/Double Cheeseburger BBQ [4€]
@ceres-c
ceres-c / frida-extract-keystore.py
Last active April 5, 2024 19:22
Automatically extract KeyStore objects and relative password from Android applications with Frida - Read more: https://ceres-c.it/2018/12/16/frida-android-keystore/
#!/usr/bin/python3
'''
author: ceres-c
usage: ./frida-extract-keystore.py
Once the keystore(s) have been exported you have to convert them to PKCS12 using keytool
'''
import frida, sys, time
@ceres-c
ceres-c / CUEupdater.py
Created January 6, 2019 21:15
I needed a script to traverse my music collection and quickly update cuesheets with correct titles. Given all files in my collection are tagged with MusicBrainz archive, the best way to do so is reading flac files tags.
#!/usr/bin/python3
# Author: ceres-c 2019-01-06
# Updates recursively cue files to reflect track's title present in flac files.
import os
from mutagen.flac import FLAC
def cueupdater (path, cuefile):
title = None
@ceres-c
ceres-c / Dockerfile
Last active January 28, 2019 15:34
Dockerfile to create a welcoming environment on top of base/devel arch image
FROM base/devel:latest
MAINTAINER federico@ceres-c.it
# update system
RUN \
pacman -Syyu --noconfirm
# install basic dependencies
RUN \
@ceres-c
ceres-c / CR95HF_ICODE_psw_dump.py
Created December 31, 2019 12:54
CR95HF Python script to read NXP ICODE tags in privacy mode
#!/usr/bin/python3
# Author: ceres-c 2019-12-29
# Authenticate to ICODE SLI tags
import hid
# Global defines & commands
password = [0x00, 0x00, 0x00, 0x00] # You have to find it yourself, try to search online in german ;-)