Archive for November, 2008

Bashload – Rapidshare download script

November 3, 2008

I wrote a little script that is able to download files from Rapidshare, you can provide the urls via the command line or through the path to files the contain a list of urls(one url per line).

There are already scripts that do this, though most of them require certain perl modules or like tuxload they need a perl version that has threads enabled, this is not always the case, e.g. for embedded devices. This script only uses standard unix tools, like bash, wget grep etc.

I haven’t had time to test it thoroughly, I would like you to report any problems. Furthermore if you know how to write bash scripts you could implement other 1-click hoster, and provide the source.(you can add other hosters to bashload easly)

It can be downloaded here.

Buffalo Linkstation Pro Duo

November 1, 2008

My Linkstation Pro Duo arrived yesterday. So what is this thing? Basically it is a NAS, that meens storage provided via a computer network. It has two harddrives that can be configured as software RAID, either 0 or 1. The operating system is Linux(is there a device linux is not capable of running on?^^), what makes it flexible like hell, at least after you gained shell access. In the following lines I will describe the things I struggled with and how I configured the device. I’m planning to use it for:

  • Backups via the network
  • share storage in a heterogeneous network (WinXP, Vista and Ubuntu machines in it)
  • store data
  • downloading things without being forced to turn a “real” machine on, e.g. the DVD of the distribution of my choice during the night
  • I probably can’t resist running a web server on it accessible via dyndns

On other NAS from buffalo you can use a debian-like linux called freelink, though this is not yet ready for the Duo version of the Linkstation pro. Therefore I used the stock version and customized it.

The Web Interface is quite good, there are many things you can do via it, though having shell access invaluable. Therefore the first thing to do is gaining access via the shell. A good guide to do so can be found here. installing the addons.tar is not a bad idea, it will give you the executable of wget, which will be needed a lot. I prefer logging in via public key authentication over the old password method. To enabled it you have to uncomment the following lines in /etc/sshd_config:

PubkeyAuthentication yes
AuthorizedKeysFile      .ssh/authorized_keys

Now copy the key of the client to the server, if you have not yet created one you can do this with:

ssh-keygen -t dsa

now copy it to the machine

ssh-copy-id -i ~/.ssh/ root@

The permissions of the dir /root where odd, which caused failures with the pub key auth. therefore I changed them with

chown root:root /root

From your favorite linux distribution you know that thing called “package manager” which eases the management of software on your computer. There is a package manager designed especially for embedded devices called ipkg. You can install it with some bootstrapping script. How to do so is described here.

There is a default samba share called info, this can be disabled by adding those lines:

cp /etc/samba/smb.conf /etc/samba/smb.orig
sed '/^\[info\]/,/guest ok = yes/d ; /^###info###/d' /etc/samba/smb.orig > /etc/samba/smb.conf

at the end of the configure() method in /etc/init.d/

ok enough for now,