Skip to content

Instantly share code, notes, and snippets.

@yath
yath / scan.txt
Created September 20, 2011 09:49
scanning de-Muenchen
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
initial transponder 113000000 6900000 0 3
initial transponder 121000000 6900000 0 3
initial transponder 346000000 6900000 0 3
initial transponder 354000000 6900000 0 3
initial transponder 362000000 6900000 0 3
initial transponder 370000000 6900000 0 3
initial transponder 378000000 6900000 0 3
initial transponder 386000000 6900000 0 3
scanning /usr/share/dvb/dvb-c/de-Muenchen
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
initial transponder 113000000 6900000 0 3
initial transponder 121000000 6900000 0 3
initial transponder 346000000 6900000 0 3
initial transponder 354000000 6900000 0 3
initial transponder 362000000 6900000 0 3
initial transponder 370000000 6900000 0 3
initial transponder 378000000 6900000 0 3
initial transponder 386000000 6900000 0 3
#!/usr/bin/perl
use strict;
use warnings;
sub WINDOWS() { $^O eq "MSWin32" }
use Inline C => "DATA",
CCFLAGS => "-W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-comment",
BUILD_NOISY => 1,
WINDOWS ?
@yath
yath / alp
Created September 9, 2011 08:40
#!/usr/bin/perl
use strict;
use warnings;
use 5.012.0;
my $dir;
my $file;
my %x;
while (<>) {
chomp;
#!/usr/bin/perl
use strict;
use warnings;
sub WINDOWS() { $^O eq "MSWin32" }
use Inline C => "DATA",
CCFLAGS => "-W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-comment",
BUILD_NOISY => 1,
WINDOWS ?
@yath
yath / check-kd-stations
Created August 28, 2011 07:31
Watch for changes in Kabel Deutschland's analog TV channel assignment
#!/bin/sh
MYDIR="$(dirname "$(readlink -f "$0")")"
OUTFILE="$HOME/kd-stations.txt"
if [ -e "$OUTFILE.new" ]; then
echo "$OUTFILE.new already exists" >&2
exit 1
fi
"$MYDIR/kdinfo" > "$OUTFILE.new"
@yath
yath / sssh
Last active August 29, 2015 14:11
sssh - sane(r) ssh
#!/bin/sh
# sssh - sane(r) ssh
#
# executes a remote command (more) sanely by passing the arguments url-like
# escaped (foo%23bar for "foo#bar") and unpacking them on the remote side
# with perl again.
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <host> <command> [arguments...]" >&2
exit 1
@yath
yath / patch.sh
Last active August 29, 2015 14:06
#!/bin/sh
URL="https://gist.githubusercontent.com/yath/1c7b8f497b869e9070d5/raw/5fee4133fc11bcb96d07467754fef551aea32160/stripenv.c"
OUT=/usr/local/lib/stripenv
set -e
test_vuln() {
dir="$(mktemp -d)"
cd "$dir"
env ohai='() { echo pwned; }' X='() { (a)=>\' bash -c "echo ohai" > /dev/null 2>&1
if grep -qw pwned echo 2>/dev/null; then rc=0; else rc=1; fi