Skip to content

Instantly share code, notes, and snippets.

@m0rb
m0rb / vt_tail.pl
Last active February 24, 2024 17:21
virustotal auto-uploader for stupid botnet droppers
#!/usr/bin/perl -w
use strict;
use warnings;
use utf8;
use DateTime;
use JSON;
use File::Tail;
use File::Basename;
@m0rb
m0rb / bsky_wss.pl
Created February 8, 2024 02:06
bluesky websocket firehose client for perl
#!/usr/bin/perl -w
use 5.12.0;
use strict;
use warnings;
use utf8;
use AnyEvent::WebSocket::Client;
use CBOR::XS;
my $derp = AE::cv;
@m0rb
m0rb / metroid_metal.sh
Last active December 27, 2023 05:55
MSU-1 Enhanced SNES Metroid -- Metroid Metal setlist / master info
#!/bin/bash
#
# Metroid Metal (https://www.metroidmetal.com/about/) for the MSU-1 enhanced SNES Metroid port
#
# req:
# wav2msu (https://github.com/jbaiter/wav2msu)
# sox, wget
#
# I took some creative liberty with the track lengths / edits
#
@m0rb
m0rb / shocktroa.sh
Created December 13, 2023 01:49
neo-geo repacked rom carving
#!/bin/bash
# DotEmu Shock Troopers -> MAME romset (shocktroa)
# shoutout to Richard Roe // milkchoco.info
#
# 12/12/23 -- morb
TITLE=shocktroa
OUTDIR=${TITLE}
tiles2crom() {
@m0rb
m0rb / webp-carve.pl
Last active September 10, 2023 22:48
#!/usr/bin/perl -w
use strict;
use warnings;
my $header = 'RIFF';
my $sbuf = 1024;
open my $file, '<', $ARGV[0] or die $!;
binmode $file;
my $i = 0;
@m0rb
m0rb / pbash64.sh
Last active May 5, 2023 05:01
pure bash bash64.sh
#!/bin/bash
B=({A..Z} {a..z} {0..9});p=printf\ ;I=$(B=$@
for((;i<${#B};i++)){ for y in {31..128};{
[[ ${B:i:1} = "$($p\\x`$p%x $y`)" ]]&&(a()((q=y/2,r=y%2));a;o=$r
for((;q;)){ y=$q;a;o=$r$o;};$p%08d $o)} })
for((;e<${#I};e+=6)){ y=${I:e:6}0000;O+=${B[2#${y::6}]};}
for((;${#O}%4;)){ O+=\=;}
$p$O
@m0rb
m0rb / nodelpr.ino
Created February 3, 2023 14:05
nodemcu famiclone lpr
/*
nodemcu line printer for Subor Famiclones
- morb
*/
const int pins[] = { 16, 5, 4, 0, 2, 14, 12, 13, 15 };
const int busy = 3;
byte out;
void ICACHE_RAM_ATTR readStrobe() {
@m0rb
m0rb / nes_extract.sh
Created January 31, 2023 03:03
Quick and dirty NES ROM binifier
#!/bin/bash
# yet another NES ROM to BIN script
# got tired of doing this all by hand
# - morb
TITLE=$1
ROMSIZE=65536
RSIZES=($(file "$TITLE" | cut -f2- -d: | awk '{print $5"\n"$7}'))
BIN=${TITLE/.nes/.bin}
CHR=${BIN/.*/_chr.bin}
@m0rb
m0rb / phony.pl
Last active November 25, 2022 00:36
phony.pl - phonetic alphabet - now with navajo
#!/usr/bin/perl
use Getopt::Std;
%alpha = (
"A" => [ "Alpha", "WOL-LA-CHEE", "BE-LA-SANA", "TSE-NILL" ],
"B" => [ "Bravo", "NA-HASH-CHID", "SHUSH", "TOISH-JEH" ],
"C" => [ "Charlie", "MOASI", "TLA-GIN", "BA-GOSHI" ],
"D" => [ "Delta", "BE", "CHINDI", "LHA-CHA-EH" ],
"E" => [ "Echo", "AH-JAH", "DZEH", "AH-NAH" ],
"F" => [ "Foxtrot", "CHUO", "TSA-E-DONIN-EE", "MA-E" ],
"G" => [ "Golf", "AH-TAD", "KLIZZIE", "JEHA" ],
@m0rb
m0rb / gist:2f2ab9c981cedbf3181880b97c0fa9bb
Last active October 31, 2022 01:55
Lenovo ThinkBook 15 G2 ARE (20VG) BIOS/UEFI Upgrade via UEFI Partition
This is now how I flash the UEFI/BIOS on my ThinkBook instead of running h2offt from some random laptop manu's support page.
Maybe it won't void your warranty? :)
Proceed at your own risk.
From a Linux Environment:
1) Download latest BIOS/UEFI firmware from Lenovo: https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkbook-series/thinkbook-15-g2-are/downloads/driver-list/component?name=BIOS%2FUEFI