automated downloads

Hmm… I’ve set-up a script to automatically download a TV show about a year ago and just remembered it…

Apparently 1 year of this show is 167 Gbyte…

For completeness the download script – ignore my bad scripting:

#!/bin/bash

# parameter 1: month
# parameter 2: from day
# parameter 3: to day
# parameter 4: year

# data -dmonday +%d

next_monday=$(date -dmonday +%d)
next_monday_month=$(date -dmonday +%m)
next_monday_year=$(date -dmonday +%y)

previous_monday=$(date -d'monday-7 days' +%d)
previous_monday_month=$(date -d'monday-7 days' +%m)
previous_monday_year=$(date -d'monday-7 days' +%y)

next_friday=$(date -dfriday +%d)
next_friday_month=$(date -dfriday +%m)
next_friday_year=$(date -dfriday +%y)

previous_friday=$(date -d'friday-7 days' +%d)
previous_friday_month=$(date -d'friday-7 days' +%m)
previous_friday_year=$(date -d'friday-7 days' +%y)

for i in `seq 1 7`;
do
        day=$(date -d'today+'$i' days' +%d)
        month=$(date -d'today+'$i' days' +%m)
        year=$(date -d'today+'$i' days' +%y)
        wget -c "https://rodlzdf-a.akamaihd.net/none/zdf/"$year"/"$month"/"$year$month$day"_sendung_dku/1/"$year$month$day"_sendung_dku_3328k_p36v14.mp4"
done

IP-over-DNS

Picture yourself in this situation. You connect to a network and nothing works. Except for this:

It is quite common to have DNS working in networks while everything else is not. Sometimes the network requires a log-in to give you access to a small portion of the internet.

Now, with the help of a tool called iodine, you can get access to the full internet with only DNS working in your current network:

iodine lets you tunnel IPv4 data through a DNS server. This can be usable in different situations where internet access is firewalled, but DNS queries are allowed. 

It runs on Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD and Windows and needs a TUN/TAP device. The bandwidth is asymmetrical with limited upstream and up to 1 Mbit/s downstream. 

iodine

Setting it up is a bit of work but given that you are anyway having access to a well connected server on the free portion of the internet it can be easily done.

Of course the source is on github.