Skip to content

Instantly share code, notes, and snippets.

View mrworf's full-sized avatar

Henric Andersson mrworf

View GitHub Profile
@mrworf
mrworf / mac-resolve.sh
Last active November 27, 2019 19:24
Resolve all unknown devices on your network. Run on your filrewall, assumes DNS names with dhcp in it to be unknown devices and then resolves the owner of the MAC address space.
#!/bin/bash
PREFIX=dhcp
if [ ! -z "$1" ]; then
PREFIX="$1"
fi
if [ ! -f /tmp/macdb ]; then
curl 'https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf' > /tmp/macdb
fi
@mrworf
mrworf / PlexSkype.au3
Created March 30, 2019 17:26
Allows making/receiving calls on a computer used for Plex Media Player
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
Opt("SendKeyDelay", 50)
Opt("SendAttachMode", 1)
Opt("SendKeyDownDelay", 50)
Global $g_bInACall = False
HotKeySet ( "+!^c" , "Call" )
@mrworf
mrworf / screen-rec.sh
Created December 1, 2016 18:23
Takes a unpacked ISY994 backup and scans it for odd Device Links. Requires Linux or OSX
#!/bin/bash
# 1 = Filename
# 2 = Record (starting from 0)
function getrecord()
{
BASE=$((180 + $2 * 8))
hexdump -v -s $BASE -n 8 -e '8/1 "%02x " "\n"' $1
}
@mrworf
mrworf / VerifiedHttpClient.java
Created May 4, 2016 14:09
Android HttpClient with cert pinning
/**
* Copyright 2016 Henric Andersson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mrworf
mrworf / wifipresence.sh
Created January 5, 2016 17:08
WiFi Presence for ISY994 - Let ISY know when you're in the house
#!/bin/bash
#
# WiFi Presence for ISY994
#
# Keeps track of your presence by the virtue of the WiFi in your
# cellphone. This script assumes that the server that runs it
# is also your Firewall/Router so it will see the device in
# question.
#
# You CANNOT run this on a machine which doesn't see all traffic
@mrworf
mrworf / normalize.sh
Created October 4, 2015 20:01
When you need to normalize the audio of a video file
#!/bin/bash
#
# Normalizes the audio in the supplied video file. Will cause some audio
# degradation since there is a recompression step going on here.
#
# You must have a done folder and processed folder in the same path as
# this script.
#
# Script depends on avconv (ffmpeg on ubuntu 14.x) and sox
#

Keybase proof

I hereby claim:

  • I am mrworf on github.
  • I am huckabay (https://keybase.io/huckabay) on keybase.
  • I have a public key whose fingerprint is C7B5 2124 9611 E098 52D1 872F 4256 7B63 44C3 77F0

To claim this, I am signing this object:

@mrworf
mrworf / insteon.php
Created April 7, 2015 22:41
PHP Class for interacting with INSTEON device hooked up to a Universal Device's ISY994i using REST API
<?php
/**
* A handy PHP class which allows communication with
* Universal Device's ISY994i over their exposed REST
* API.
*
* Primarily this class was created to interface with any
* INSTEON product hooked up to the ISY994i. It does not support
* all functionality of the REST interface, instead it's expanded
* as the need for a feature arises.