How to do housekeeping with a lot of text files

If you save a lot of textfiles, e.g. you store historical versions of webpages, you do not want to store empty files or duplicate files.

Housekeeping can be done that way:
1. find empty files

find $PATH -type f -empty

if you want to delete them:

find $PATH -type d -empty -delete

2. find duplicate files

fdupes -r $PATH

In order to delete the duplicate files:

fdupes -rdN $PATH

r - recursive
d - preserver first file, delete other dupes
N - run silently (no prompt)


That will result in a reduced number of files and in a reduced number of duplicate content.

FHEM HMLAN1 help me

While looking at FHEM logs, that appeared:

2014.12.11 22:00:16 3: HMLAN1: Unknown code A0F51BB102BBB1E 0000000AE0BB0E000F::-85:HMLAN1, help me!

The device ID is:

Multiple times.

After googling for a while a potential solution is to create a vccu:

define vccu CUL_HM <$hmId> 
attr vccu model CCU-FHEM 

Where <$hmId> is your HM ID of your Lan interface or similar.

Or it might be a device from a house nearby, and you want to ignore that device:

define IGNORE_ME CUL_HM <$hmId>
attr IGNORE_ME ignore 1

That should help

homematic lan konfigurations-adapter probleme

Probleme bei der Installation eines Homematic LAAN konfigurations Adapter?

Als ich das versuchte habe ich die Software installiert und dann das Programm:
HomeMatic Lan-Interface Configurator“ gestartet.

Dort hatte ich jedoch nur ein leeres GUI.
Auch refresh hat nichts geholfen. In der Übersicht der Fritz-box habe ich jedoch gesehen, dass der Adapter eine IP Adresse bezogen hat.

Lösung des Problems: mein Windows System hat mehrer Netzwerk-Interfaces. Das Programm scheint damit Probleme zu haben.
Abhilfe schafft das Deaktivieren aller Interfaces bis auf jenes Interface, dass die Verbindung zum LAN Adapter bzw dem Switch herstellt.

Schon funktioniert es.

universal car mount with velcro

Today a „Hack“-Report:

I was using iPhone for quite a while, my last Phone was a iPhone4 for last three years. Part of my phone gear is a Navigon cell phone holder which is indeed the same like a Garmin cell phone holder.

As I moved to Samsung Galaxy S5 mini, I wanted to be more flexible, and to use my Phone also on my bike I bought:

SPITZEL – Samsung Galaxy S5 Halterung für das Fahrrad

They are made in Germany.

First impression: very solid!

So as the phone case is now equiped with velcro, I want to use it the same way in the car.

Buying 2 m of velcro is very cheap.

velcroNow use the old cell phone car mount and stick two parts of velcro on the car mount:

velcro stickedAnd now, let’s test it:


Very nice, very solid and super flexible, it can still be used with the old iPhone 4 and other cell phones with velcro.

Ergo: universal car mount with velcro for a fair amount of money.

In german: Universal Auto handy halterung mit Klett

Android Samsung Galaxy S5 mini Osx Mavericks sync

Samsung has recently released a pretty nice Phone, Samsung Galaxy S5 Mini. Water resistent etc etc.

Having that phone after some days I found a serious problem: how can you sync and backup your Samsung Galaxy S5 mini with your Apple Mac running the latest version Apple OSX 10.9 called Mavericks?

Of course you can use File transfer for Android to transfer single files / Folders. But being a iPhone user for quite some time, I was compfortable using Apple iTunes, simple to use, mostly no problems.

So what can you do with your Android Phone? According to Samsung you should use „Kies„. This is also avaliable for Mac.
Starting the Application in latest version:



So what now?
I found an tutorial: with a link to an older Version. First I check the linked file if it contains malware, nothing found.
I followed the instructions, started the Application, at least no crash.
Tried to install drivers for the device, but even then, no success for syncing my Android Samsung Galaxy S5 mini.

Last chance: Use Kies for Windows…

Anyone else any suggestions?

Is rooting of the device a possible solution? Maybe a virtual machine within OSX in order to run KIES and then pass USB to the virtual machine?

Is there any software available for syncing your Android device with Linux (Ubuntu, Debian etc.)?

Upload kippo ssh honeypot files to viper

You want to store all your samples catched by your SSH-Kippo Honeypot to your malware repository operated with viper?

Go that way:
Start Viper API:

foo@bar ~/scripts/viper $ ./ -H -p 8080

and upload all your samples to viper:

for i in /home/pi/kippo-read-only/dl/*; do curl -F file=@$i -F tags="honeypot" http://covert:8080/file/add; done 


    "message": "added"
    "message": "added"

(you might want to modify the dir to your setup)
Why not automate uploading from kippo to viper?
– The „attacker“ might upload more then just malware / samples. You do not want to waste space in your malware zoo with another copy of netcat…

Raspberry Pi ZNC IRC bouncer problem and SSH tunneling into bouncer

Installing Raspberry Pi with a ZNC IRC bouncer and having the following problem:

<*status> Cannot connect to IRC (Cannot assign requested address (Is your IRC server’s host name valid?)). Retrying…

Even when your irc server adress is correct?

Looks like the dev team of znc is aware of the problem and the following will help:

/znc setbindhost
/msg *status jump

To make it persistent:

user@host /home/pi $ killall znc
user@host /home/pi $ vi $HOME/.znc/configs/znc.conf
BindHost = //to every user
Start znx:
user@host /home/pi $ znc

Happy bouncing

Btw. a bouncer is a tool to stay connected to your irc network(s) in order to buffer stuff that is being posted while you are not on your keyboard.
The bouncer will stay on the server and in the channels you configured.
Also private messages will be stored, so you will get them after you return to your keyboard.

The other feature is that the bouncer also is your one and only irc server, so you do not have to connect to multiple server instead just the bouncer, which might be quite handy.

To install ZNC on your raspberry:

user@host /home/pi $ sudo apt-get update
user@host /home/pi $ sudo apt-get upgrade
user@host /home/pi $ sudo apt-get install znc
user@host /home/pi $ znc --makeconf
follow the instructions to configure your Bouncer
Remember Port, username and password!

To connect to your bouncer use:

[ ** ] Try something like this in your IRC client...
[ ** ] /server +$PORT $USERNAME: [ ** ] And this in your browser...
[ ** ] https://:$PORT/

You can also configure the bouncer via web interface, if you have choosen to use SSL remember to connect https:// and not http://

To secure your bouncer it might be worth to activate the module fail2ban within znc, that will ban users that have n wrong login attempts.

Also it might be worth to not bring your bouncer to the public internet, better hide it in your local network and just ssh to your system and forward the port via SSH, so it will be a IRC over SSH tunnel.


IRC via SSH tunnel

tcp 0 0* LISTEN aus (0.00/0/0)
tcp 0 0* LISTEN aus (0.00/0/0)

SSH is available from public internet and 1025 is firewalled with DENY

Use the following SSH tunnel:

ssh pi@yourpublicip -L 7778:

where 1025 is your znc port
7778 will be the port your local system is listening to
So you can then connect to your bouncer using:

/server +7778 username:passwort

Happy remote bouncing!

Windows 7 Window outside of visible area

If you are running Windows 7, maybe with an external screen attached to your Notebook, you might find the problem that sometimes new Windows will be opened outside of the visible area.

To get the windows back, activate the window in Task bar, go with the mouse to the sub item of the window –> right klick -> move

Now the window is active and you can easily move it with arrows on your keyboard.