Xen, LVM and friends
I’m going to write 3 articles next, the first on installing Xen on a Debian Lenny host (Dom0) with Debian Lenny guests (DomU) on a regular loopback filesystem. Next I’m going to write about setting up...
View Articledd progress update
While a long `dd’ is running, how can you get a progress update? kill -USR1 `pidof dd` This will send the SIGUSR1 signal to dd, which according to it’s man page causes it print it’s progress to STDERR....
View ArticleInstalling and Configuring Xen with guests
Installing and Configuring Xen on a Debian Lenny machine is pretty easy. Firstly, install the system: apt-get install xen-tools xen-utils-3.2-1 xen-linux-system-2.6.26-2-xen-686...
View ArticleMove Xen Guest from loopback filesystem to LVM
Moving a Xen Guest into an LVM container from a loopback sparse image is easy enough. You’ll need to power down the VM using xm shutdown mymachine Once done, create the logical volume with: lvcreate...
View ArticleBASH Script – Blank Out CC Details
Edit: I should have pointed out originally, as I have now received feedback on this. This is NOT the best or optimal way of performing this task. I was trying to illustrate as many shell scripting...
View ArticleEasy Reverse Engineering
Compiling a program doesn’t protect it or necessarily hide the source. Take the following example C program. It serves no real life purpose and should never print anything to the console: #include...
View ArticlePHP Developer – Looping through database results
As a PHP Programmer, a very routine PHP/MySQL procedure is fetching a set of records from the result of a query. $sql = "SELECT ..."; $result_set = mysql_query($sql); for ($ctr = 0; $ctr <...
View ArticleString replacement with sed
Sed – stream editor is a powerful tool to manipulate strings. It will take STDIN as well as operating on a file: The most common usage is to replace text: echo “this is a test string” | sed s/i/z/g...
View ArticleWebsite Security Scan
Websites get hacked every day, customers details taken, and it’s usually REALLY EASY to do. As a security consultant, I often get a call after a Google search turns up with my details as the guy to...
View ArticleLinux Controlled Door Entry
Having recently moved to a new apartment, one of the first things that I decided to do was build an RC entry system Here’s some pictures: The black box at the top is a simple Velleman RC control kit...
View ArticleLinux LUKS Crypt HOWTO
Linux kernels now support encrypted filesystems. Setting one up should take 5 minutes, or 3 hours if you’re like me and can’t read. Firstly, install the right tools: apt-get install cryptsetup Make a...
View ArticleUDP Tunneling to avoid hotspot or firewall restrictions
UDP tunneling is an attack that is often overlooked when manufacturers design wireless hotspot and other firewall/proxy based devices. When you try and resolve a domain name, you make a request to a...
View ArticleCommunicating with the Twitter API via curl
Twitter provides an extensive API that allows developers to write interactive applications. Utilizing this API is deceptively simple, and here is an example with curl: curl -u username:password...
View ArticleSSL increases confidence
If you run a commerce website, you’ve probably heard about SSL certificates. Depending upon the level of certificate that you have, they verify the validity of your domain, up to detailed information...
View ArticleZeroshell Router
I’ve been using Zeroshell on a Routerboard 532a as my office LAN router for over a year now. It’s one of the best router operating systems that I’ve used and it’s really easy to set up. I’ve configured...
View Article