Moisture Sensor & Raspberry Pi – Part 1

This is stage one of my project to water tomato plants with a Raspberry pi. No C programming used yet, im only using Bash at the moment to configure and retrieve the data from the sensor.
Next phase of my project is to find a suitable water valve so i can control the water of the plant as well, once i find this thats when i will start writing up a program in C to control everything.

To setup the gpio pin to use in bash you need to do the following:

22 is the pin i chose for this, which one you choose is upto you!

then to get the current state:

this will give you a 0 if its moist or 1 if its not.

If you can not wait for me to do the second part and want to start using C straight away go over to wiringpi to grab the C libraries these will get you set on the right path.

This sensor it self is fairly simple and inexpensive, i bought this for £0.93 from Amazon, it didn’t come with instructions but the pins on it are self explanatory, it has both analog out as well as digital out as well.





Finally i had my main home server retrieve the data from the raspberry pi via scp so i could display the plants status on my server web interface, this way i could see how the plant is doing!

This only needed a tiny bit of php code to execute:


Poor mans DDOS tool in 5 lines of python

This is ONLY for EDUCATIONAL purposes!!

with threading:


Welcome back…..

Yay, well thats me back again with lots of new content when i get the time, a few projects on their way and some fun hackery!

Going to be covering some topics on programming this time around and electronics as well. Adding a few old projects on here that i never published before purely because i forgot i even did them.

Up coming projects, hacking my electric meter key to see if i fail or succeed at reading the data from the key or not! Automating your unemployment search results for the job center using python and php!

oh and not to forget programming a moisture sensor in C for the Raspberry Pi.

A Decade of My Workspaces

For a long time i have been taking snapshots of my workspaces at home so i could see the changes over the years, and now over a decade has passed and i thought it was time to post some photos here.


^ – Scotland, Dundee – 2003


^- Denmark, Copenhagen – 2004


^- Denmark, Copenhagen – 2006


^- Scotland, Dundee – 2007


^- Scotland, Dundee – 2007


^- Scotland, Dundee – 2008


^- Denmark, Copenhagen – 2008


^- Denmark,Copenhagen – 2010


^- Denmark, Copenhagen – 2011


^- Denmark, Copenhagen – 2011


^- Denmark, Copenhagen – 2011


^- Denmark, Copenhagen – 2011


^- Denmark, Copenhagen – 2011


^- Denmark, Copenhagen – 2012


^- Denmark, Copenhagen – 2012


^- Scotland, Brechin – 2012


^- Holland, Heiloo- 2013 – The Hacker Cave


^- Holland, Heiloo- 2013

Picture Frame Server

I was inspired by an episode of Hak5 years ago when they placed a desktop machine within a picture frame so i decided to do the same, except use an Acer Aspire one and strip the case off of it. This was a nice low power solution for a home server.




Transparent Laptop Screen

This was a little project i did years ago, i simply took apart the screen for one of my laptops and stripped it right down to the actual LCD element.





hide Lighttpd version and PHP version.

This is a quick tutorial on techniques you can use to hide information about services running on your server.



add:  server.tag = “nothing to see here”



search for expose_php = On

and set to Off

Secure browsing with SSH & Firefox

For those who spend a lot of time in cafes and insecure locations, browsing over ssh is the simplest way to go.

In order for this to work you must have a server or home computer with linux on it and setup with port 22 open and forwarded so you can access it from another location.

ssh -C2qTnN -D 8181 user@hostname
check the man pages to see what all the options do!

in Firefox:

type into the address bar: about:config

search for - network.proxy.socks_remote_dns

and set to true by double clicking it.

Then go to edit > preferences > advanced > network > settings

choose manual proxy configuration

in SOCKS Host and port 8181

if you want to keep the connection constant i recommend using autossh just apt-get install autossh, no configuration needed, simply put autossh instead ssh, this will keep a connection alive and reconnect if it drops.


Creating a Debian Template from a guest machine – qemu-kvm

Templates save a lot of time, its impractical to install an OS and setup the environment every time you need to do something.
I am assuming you have qemu-kvm and libvirt installed already, and have reasonable knowledge of virtualization.

Easiest option out there,  use virt-manager to install debian.

Make sure to install libguestfs as we need virt-sysprep on the host

It is also important you figure out what size the template is going to be, as you don’t want to take up any more space than you have to, you can use virt-resize later to increase the size of your clone, this makes for easy storage.

Read More

When did i install/update or remove a package? Debian

At some point or other you will wonder when you installed, updated or removed  a package on Debian.

so to find out simply login in as superuser and open /var/log/dpkg.log with your editor of choice.

here you will see when something  was installed or updated or removed.