Patch for the CLI password manager “pass”

I use Pass ( to store and synchronize all my passwords.

When I use Pass via SSH on a remote system in order to retrieve a password, I cannot make use of it’s clipboard feature. In order to output the password without actually displaying it, I wrote the following patch which prints the password in red on a red background while still being able to be manually copied to the clipboard:

Comments closed

Dear visitor,

I’m sorry but I had to disable new comments on posts since I’m not able to answer them at the moment. I will reactive commenting as soon as it will be possible for me to react in a timely manner.

NSE-Script: SQLite output for Nmap

I wrote this little NSE script that allows you to store the output of Nmap into a SQLite database:

This might come in handy when performing large inventory scans. The SQLite database can be queried and sorted easily or exported as a CSV file. This way you can, for example, easily generate tables for your assessment report.

$ nmap -sS -A -F --script sqlite-output
$ sqlite3 scan.sqlite
sqlite> select * from scandata;||22|tcp|ssh|open|OpenSSH5.3p1 Debian 3ubuntu7.1||80|tcp|http|open|Apache httpd2.2.14

One-button audiobook player features in new book

The One-button audiobook player has been included in the new book Raspberry Pi For Dummies by Sean McManus and Mike Cook. The book covers setting up the Raspberry Pi, using Linux on it, using the Pi for work and play, programming the Raspberry Pi in Scratch and Python, and creating electronics projects.

Co-author Sean McManus told me: “We wanted to finish the book by highlighting some inspiring projects that would give people an idea of what they could do by taking their new programming and electronics skills further. The one-button audiobook player is a nice example of an electronics project, but I particularly like the way it’s really improving someone’s quality of life, by making it possible for your wife’s grandmother to listen to audiobooks. I get a lot of enjoyment from audiobooks myself, so I can imagine how much it means to her to be able to listen to them, especially given her visual impairment.”

Other inspiring Raspberry Pi projects mentioned in the book include a synthesiser, a bird feeder webcam, a weather station and a jukebox.

You can find out more about Raspberry Pi For Dummies at Sean’s website.


I’d like to share my very first software project from 1992 with you which was written in BASIC 2.0 on my C64. It has never really been finished but had a nice intro screen with moving sprites and was able to print labels on a wire printer :)

In order to archive it for myself, I’ve set up a github repository where the source code is available:

Here’s a little screen-cap of it:

Here’s a pic of the floppy disk:

The One Button Audiobook Player

This little Raspberry Pi based project is a gift for my wife’s grandmother for her 90th birthday. Being visually impaired, she is hard to entertain but loves to listen to audiobooks. The problem is, that she isn’t able to handle a ghetto blaster or MP3 player.

The solution to this problem was – tadaaaah – a one button audiobook player :)

It basically consists of:

  • 1 Raspberry Pi
  • 1 ModMyPi enclosure
  • 1 button
  • 2 resistors (330 Ohm, 10 Kilo-Ohm)
  • 1 blue LED
  • 1 (slow) 8GB SD-Card
  • some wire
  • a pair of speakers

The following software has been used:

The features are the following:

  • always on: When you power on the raspberry, it will boot up and start the python script with the audio book in pause
  • one button usage: The button pauses and unpauses the audio book or goes back one track when you press the button longer than 4 seconds
  • remembers position: It will always remember the last played position
  • only one audiobook: There will always be only one audio book on the Raspberry
  • easy audio book deployment: When you plug in a USB thumb drive with a special name/label, the Raspberry will stop playing, mount the thumb drive, deletes the old audio book, copies the new one, rebuilds the playlist and – after unplugging the thumb drive – starts the new audiobook in pause mode
  • multi format: Since it uses mpd, the player supports  Ogg Vorbis, FLAC, OggFLAC, MP2, MP3, MP4/AAC, MOD, Musepack and wave

Some pics and a video:


(The audiobook used in this video is a free version of Cory Doctorows “Little Brother” from Fabian Neidhardt)

If you like to build your own one button audio book player, here are the super simple schematics:

And last but not least – the python script. The code might be crappy, please comment if you have improvements (especially regarding loadMusic). You can find it on github:

Update (2013-11-26)

Here’s what Russel wrote in a comment to this post:

“I just completed building this and have some addendum notes adding more details:

Install the following packages:
sudo apt-get install mpd
sudo apt-get install mpc
sudo apt-get install python-mpd
sudo apt-get install python-pyudev

(below assumes using defaults for /etc/mpd.conf)
sudo mkdir -p /music/usb
sudo ln -s /var/lib/mpd /music/mpd
sudo ln -s /var/lib/mpd/music /music/mp3

Copy the script to /home/pi
nano /home/pi/
Change these in the script or flip the connections in wiring diagram.
LED = 24

Rename a USB stick to “1GB”
Copy 1 MP3 onto the stick
Insert the stick into pi

sudo mount /dev/sda1 /music/usb
sudo /etc/init.d/mpd stop
sudo rm /music/mp3/*
sudo cp /music/usb/* /music/mp3/
sudo umount /music/usb
Remove the USB stick

sudo rm /music/mpd/tag_cache
sudo /etc/init.d/mpd start
mpc clear
mpc ls
mpc ls | mpc add
sudo /etc/init.d/mpd restart
mpc play

Plug in earphones
You should hear audio
Next try the python script:
sudo python /home/pi/
Insert USB stick
the LED should flash and the USB file copy to /music/mp3/
the LED should flash again. Remove the Stick and LED flashes again.
Press button to start playing
Press button again to stop
Press & hold button to rewind to beginning.

sudo crontab -e
Add following line run at startup
@reboot python /home/pi/ &
sudo reboot
Then retest again to be sure all is well.”







Planned: Cat lift

I plan to build this cat lift, so my parents don’t have to pull up the cat basket manually all the time. The problems here are, that it has to be very quiet and should also be hardly visible from the outside when not in use: