Skip to content

Instantly share code, notes, and snippets.

@kadin2048
kadin2048 / bettercap-debug.txt
Created Jun 24, 2022
Error log from bettercap 2.32.0 on Debian Bullseye amd64
View bettercap-debug.txt
$ sudo bettercap -version
bettercap v2.32.0 (built for linux amd64 with go1.15.15)
kevin@thinkpad:~$ sudo service bluetooth restart
kevin@thinkpad:~$ sudo bettercap -debug
192.168.1.0/24 > 192.168.1.123 » ble.recon on
192.168.1.0/24 > 192.168.1.123 » [01:36:17] [sys.log] [dbg] ble.recon starting discovery ...
192.168.1.0/24 > 192.168.1.123 » [01:36:17] [sys.log] [dbg] ble.recon state changed to PoweredOn
192.168.1.0/24 > 192.168.1.123 » [01:36:17] [sys.log] [dbg] ble.recon started devices pruner with ttl 30s
192.168.1.0/24 > 192.168.1.123 » [01:36:17] [ble.device.new] new BLE device detected as 43:FE:CD:XX:XX:XX (Apple, Inc.) -68 dBm.
@kadin2048
kadin2048 / Metafilter Infodump SQL.md
Created Mar 3, 2022
Metafilter "Infodump" SQL scripts
View Metafilter Infodump SQL.md

What is this stuff?

These are some SQL scripts that are designed to process the output of Metafilter's "Infodump" files.

@kadin2048
kadin2048 / Instant Messaging Formats.md
Last active Apr 7, 2022
Effort to document and describe a variety of (mostly obsolete) instant messaging log file formats.
View Instant Messaging Formats.md

Instant Messaging Client Log Formats

An effort to document and describe a variety of (mostly obsolete) instant messaging log file formats.

by Kadin2048 kadin@sdf.org

Last updated 2021-11-03

Introduction

Instant messaging—of one sort or another—has been a part of my life almost as long as email has. But unlike Internet email, which benefits from widely-accepted standardization (RFC 822, 2822, 5322, etc.) and open-source implementations, instant messaging has generally been the domain of relatively short-lived, proprietary products, each with their own wire protocols and on-disk storage formats.

@kadin2048
kadin2048 / pidgintoeml.py
Created Nov 3, 2021
Turn a Pidgin HTML chatlog into a Thunderbird-compatible .eml file so that it can be imported into IMAP for archive purposes.
View pidgintoeml.py
#!/usr/bin/env python
# Turn an Pidgin HTML chatlog into a Thunderbird-compatible .eml file
# so that it can be imported into Gmail for archive purposes.
#
# Syntax: $ python pidgintoeml.py pidginlogfile.html [outputfilename.eml]
#
# Version: 2011-09-28
#
@kadin2048
kadin2048 / CIMtoXML.java
Created Nov 2, 2021
Very old Java-based conversion utility for migrating CenterIM flat file logs to XML "Unified Log Format" logs used by Adium. Requires argv and xmlwriter libraries.
View CIMtoXML.java
/** This program converts history files produced by CenterIM
* into "Unified Log Format" XML files used by Adium and some
* other instant messaging programs.
*
* Basic Usage:
* $ java CIMtoXML -i inputfile -d destdir -n localnickname
*
* Inputfile must be a CenterIM history file, located in
* the normal ~/.centerim/ hierarchy.
*
@kadin2048
kadin2048 / mefi_parser.py
Last active Nov 24, 2021
Metafilter exported comments parser/converter
View mefi_parser.py
#!/usr/bin/env python3
#
# Script to convert Metafilter comments export to other formats
#
# JSON: mefi_parser.py inputfile.txt outputfile.json
# HTML: mefi_parser.py inputfile.txt outputfile.html
# MBOX: mefi_parser.py inputfile.txt outputfile.mbox
import sys
import json
@kadin2048
kadin2048 / snmp_notes.md
Created Oct 14, 2021
Just some notes on an old SNMP monitor-and-graph project
View snmp_notes.md

Some Notes on SNMP Dashboarding

My SNMP "dashboard" consisted of three parts: one, a set of Round Robin Databases created with rrdtool; two, a set of shell scripts run frequently by cron to add new data to the databases; three, a set of less-frequently run scripts to generate the graph PNGs displayed on a web page.

Round Robin Databases

The empty Round Robin Databases need to be initialized first, before you can add data to them.

Tutorial here: https://oss.oetiker.ch/rrdtool/tut/rrd-beginners.en.html

View calendar-0-1i
#!/usr/bin/perl -w
# Blosxom Plugin: calendar
# Author: Todd Larason (jtl@molehill.org)
# Version: 0+1i
# Blosxom Home/Docs/Licensing: http://www.raelity.org/blosxom
# Categories plugin Home/Docs/Licensing:
# http://molelog.molehill.org/blox/Computers/Internet/Web/Blosxom/Calendar/
package calendar;
@kadin2048
kadin2048 / m2cache.py
Last active Jul 6, 2016 — forked from morrelinko/m2cache.py
Copy gradle store of libraries into .m2 local cache
View m2cache.py
import os
import shutil
gradle_cache_dir = '/Users/myusername/.gradle/caches/modules-2/files-2.1/'
maven_cache_dir = '/Users/myusername/.m2/repository/'
"""
Copy dependencies from the Gradle cache to the M2 cache
"""
packages = {}
@kadin2048
kadin2048 / openscad_template.scad
Created Jan 21, 2016
OpenSCAD Complex Model Skeleton
View openscad_template.scad
// name
// author
// GLOBALS
prefix_varname = 10;
module myObject() {
difference() {
union() {
// primitives you want to ADD to the model go here