Skip to content

Instantly share code, notes, and snippets.

@zqu4rtz
zqu4rtz / auto-connect-midi.sh
Last active September 15, 2023 00:57
Simple bash Script to Auto Connect Midi Devices, and use Linux Host (i.e. Raspberry) as a Midi Host.
#!/bin/bash
# This script will connect all masters to slaves
# So the communication is only unidirectional.
# Some midi devices can act as input and output, so differentiating them
# Helps to prevent unwanted communications between devices
# Identiy Master and Slaves using names
# Put here the masters (or devices that will act as inputs of other devices)
#If you find a script or bin which invokes another command.
#Something like this. (NOTE: Also you can use ltrace or strace to check if a binary calls system libc function)
#include <stdio.h>
int main(void)
{
if(system("ls") != 0)
printf("Error!")
return 0;
# Simple powershell script to extract keys from usb keyboard pcap.
#
# first, extract payloads or keys from pcap file: tshark -r file.pcap -T fields -e usb.capdata -w D:\Data.txt
# then run script
$dataClean = get-content D:\Data.txt
$al = @{"04"="a";"05"="b";"06"="c";"07"="d";"08"="e";"09"="f";"0a"="g";"0b"="h";"0c"="i";"0d"="j";"0e"="k";"0f"="l";"10"="m";"11"="n";"12"="o";"13"="p";"14"="q";"15"="r";"16"="s";"17"="t";"18"="u";"19"="v
";"1a"="w";"1b"="x";"1c"="y";"1d"="z";"1e"="1";"1f"="2";"20"="3";"21"="4";"22"="5";"23"="6";"24"="7";"25"="8";"26"="9";"27"="0";"28"="\n";"2b"="\t";"2c"=" ";"2d"="-";"2e"="=";"2f"="[";"30"="]";"37"=".";"38"="/";"11e"="!";"11f"="@";"120"=
"#";"121"="$";"122"="%";"123"="^";"124"="*";"125"="(";"126"=")";"12d"="_";"12f"="{";"130"="}";"50"="izq";"4f"="der";"34"="'"};
@zqu4rtz
zqu4rtz / TtapNetQemu
Last active February 12, 2019 02:15
#!/sbin/openrc-run
#
# OpenRc Script to create a service that can configure a Internal or Host-Only Network
# it create tun/tap and bridge interfaces, you'll able to use them how do you like
#
# INSTRUCTIIONS:
# 1- create file /etc/ttapnetqemu/network.conf put follow lines
#
# mode=hostonly|inet #hostonly -> Host Only Network or inet -> Internal Network
# host_numbers=2 #Number of hosts to configure. it create same number of tun/tap and bro interface depending to mode