Skip to content

Instantly share code, notes, and snippets.

View nomius's full-sized avatar

David Cortarello nomius

  • Accenture
  • Rosario, SF, Argentina
View GitHub Profile
@nomius
nomius / mp3-renamer.sh
Created December 26, 2023 14:27
Renamer using id3lib
#!/usr/bin/env bash
for x in *.mp3; do
artist=$(id3info "${x}" | awk -F ':' '/TPE1/ {print $2}' | sed 's/ //1')
name=$(id3info "${x}" | awk -F ':' '/TIT2/ {print $2}' | sed 's/ //1')
album=$(id3info "${x}" | awk -F ':' '/TALB/ {print $2}' | sed 's/ //1')
number=$(id3info "${x}" | awk -F ':' '/TRCK/ {printf("%02d", $2)}' | sed 's/ //1')
mkdir -p "${artist}/${album}"
cp "${x}" "${artist}/${album}/${number} ${name}.mp3"
done
@nomius
nomius / brave_logins_decrypt.py
Created February 22, 2021 02:19
Brave password manager decrypter
#!/usr/bin/env python3
# El DaveC / Nomius de la gente :-)
import sys
import sqlite3
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
salt = b'saltysalt'
@nomius
nomius / inittab
Created June 5, 2016 23:28
Nomius' /etc/inittab
#
# /etc/inittab: system runlevel description
#
+HOSTNAME::henry:
+TIMEZONE::UTC:
+KEYMAP::us:
+NETDEV::wlan0:
# Runlevels:
@nomius
nomius / gist:9878988
Created March 30, 2014 20:11
Kwort iso grub.conf
set default=0
set timeout=99
insmod iso9660
insmod udf
insmod linux
search --file --no-floppy --set root /kwort-version
set prefix=($root)/boot/grub
@nomius
nomius / gist:9196206
Last active August 29, 2015 13:56
Small grub installer for Kwort 4.1
#!/usr/bin/env bash
PARTITION_TABLE=${1}
error() {
tput setaf 1
echo "${1}"
tput sgr0
}
nomius@Aquiles:~$ cat rockethttpd_chdir_bugfix.diff
Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
Date: 30-01-2010
Initial Package Version: subversion
Description: Fix the chdir bug
This patch provides the following bugfixes:
* This patch is a security fix. Instead of using chdir, use chroot so requests like http://localhost//etc/passwd (outside the chroot) are treated like 404 instead of getting the file.
Index: src/rockethttpd.c
===================================================================
nomius@Aquiles:~$ cat wrong_constant_to_futex.patch
Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
Date: 17-01-2010
Initial Package Version: 2.10.1
Description: The patch was created from the original glibc package
This patch provides the following bug solution:
* Wrong constants passed to fuxex, causing pthread_mutex fail in certain operations
diff -Naur glibc-2.10.1.old/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S glibc-2.10.1/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
--- glibc-2.10.1.old/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2010-01-17 17:45:50.000000000 -0300
/* vim: set sw=4 sts=4 : */
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[])
{