Archive for the ‘hacking’ Category
…becomes a mame-cabinet
The scrapmame cabinet is getting to a functional level. Today I was able to play a game of asteroids, pacman and galaga on it.
All the buttons have been wired up to the controller using screw terminals (kroonsteentje) for easy (dis)assembly.

Galaga running on scrapmame
Before getting there I had to do some creative wiring, as it seems I cut some corners with wiring up the controller. A few separate ground-points were connected, however this was causing interesting signals on the analog joystick axes. A lot of trial-and-error later it seems I have clean inputs from all buttons and the digital joystick.
I still need to hook up the second stick (which will hopefully arrive from DX this week), some buttons (insert coin, start game) and a usb keypad (for misc buttons). A set of speakers should also arrive this week, allowing the scrapmame to make a decent amount of noise.
Next week I’ll probably fit in the PC (I’ve been using my laptop for testing so far) and then I’ll start on the launcher/menu interface.
I’ll try to add some more pictures of the inside of the cabinet later.
Some woodworking…
At Revelation Space I have been doing some woodworking for a project I’m working on. I’m normaly the guy with two left hands when it comes to working with heavy machinery and old-skool hardware, but I must say I’m not doing too bad.
It helps that revspace has more then enough of the necessary tools (at home I only have a hammer and a screwdriver
)
The project is a self-built Arcade cabinet, which at this time has been called ‘ScrapMAME’, as it’s been built completely out of scrap-materials.

I
have built the frame and outsides of the cabinet from wood boards that were originally bolted onto the windows in the workshop, together with some wood beams that were still lying around the space.
The buttons and joystick have been ordered from DealExtreme, and the first batch has arrived. Hopefully my second shipment with the remaining parts will arrive soon.
I’m using this arcade stick, and these buttons from DX. The buttons will be wired to the pcb of an old PSX controller, which will be connected to a PSX->USB adapter.
2010/06/26: The buttons and joystick arrived, so I could finally drill the holes.


There is still lots to be done… which will be added as soon as I get to it ;P
Replacing/updating my PGP key
I’ve decided that my PGP key could use some updating after 9 years. I have created a new (longer) and better-hashed PGP key. Now using 4096 bits of RSA, and using sha2 from now on
And the new key is:
pub 4096R/C4F69BD2 2009-05-11 [expires: 2019-05-09]
Key fingerprint = 6AFC 0D83 5346 C729 6754 113F D867 4D8F C4F6 9BD2
I have placed the key on my server: http://www.maniac.nl/maniac.gpg and uploaded it to the pgp keyserver(s).
I have also created a transition document, which is signed by my old and new keys, located on http://www.maniac.nl/key-transition.txt. If you have signed my old key (0×357D2178) please consider re-signing my new key after verifying the signatures on this document.
If you prefer to meet me face-to-face for a key verification, that shouldn’t be too hard to arrange. I’ll try to keep some keyslips on my at all times.
Update 2009/05/18: The file was signed first with my old key, and the result was signed with my new key. This gave some problems, and the file is now replaced by a new version which is signed by both keys simultaniously. This should verify correctly.
curl -s http://www.maniac.nl/key-transition.txt | gpg –verify
gpg: Signature made Mon 18 May 2009 11:00:17 AM CEST using RSA key ID C4F69BD2
gpg: Good signature from “Mark M. Janssen <maniac@maniac.nl>”
gpg: aka “[jpeg image of size 1522]”
gpg: Signature made Mon 18 May 2009 11:00:17 AM CEST using DSA key ID 357D2178
gpg: Good signature from “Mark Janssen (Maniac) <maniac@maniac.nl>”
gpg: aka “Mark Janssen <maniac@maniac.nl>”
gpg: aka “Mark Janssen <markj@markjanssen.nl>”
gpg: aka “[jpeg image of size 1522]”
I have also updated the old key to expire on 2009/12/31
!diff — Finding lines that are the same between 2 files
Someone asked if there was a way for diff to only show lines that are the same between 2 files. A little digging in the manpage for gnu diff got me this nice result:
diff --unchanged-line-format=%L --old-line-format= --new-line-format= FILE1 FILE2
This seems to work… but i’m open to other suggestions
Solaris 10 as LDAP client (to OpenLDAP 2.4.x)
During the last couple of weeks I’ve been working on getting a central directory setup for my client, running on OpenLDAP 2.4. Not having worked with LDAP a lot before it proved quite a challenge, especially getting Solaris 10 to work with the LDAP server without any glitches.
In this document I’ll try and describe how this setup was made, because I have been unable to find a single consistent document describing all the intricate details.
At this time I have all my problems fixed (AFAIK), but during the setup phase I experienced various problems:
- Solaris 10 not seeing any users from LDAP
- Solaris seeing users, but not letting them log in
- Log-in working from console, but not ssh
- Passwordless login (pubkey) not working in SUN-SSH
- Users being able to hack extra permissions for themselves
- etc…. etc….etc…
The entire article has been moved to a more permanent location, as a page on this site. You can find it under the ‘Pages’ header on the right. Setting up ldap
HAR2009 Publishes its CfP
HAR2009, the four-yearly Dutch outdoor technology-conference has published the Call for Papers. I’ll include it verbatim here:
From the ancient days long before the first wayback-machine snapshot, hackers have a track record for appropriating technology that was meant for something completely different and putting it to alternative uses. And every four years since 1989, the international hacker community has descended upon The Netherlands in great numbers for a conference that focuses on contemporary and future issues surrounding technology and its social and political consequences. One reason that these conferences have been successful is the wide range of participants: from students, amateurs and aficionados to researchers, scientists and entrepreneurs who are recognized as some of the best in their respective fields.
Read the rest of this entry »
Optimizing memory usage on Virtual Private Servers
A repost from vps.stoned-it.com:
The smaller VPS’s might be a bit limited in memory if you want to run more advanced web-setups. In this post I’ll try to give some pointers on reducing memory usage, so you can have a more feature-full environment without running out of memory:
Looking at the memory usage in a smaller VPS a few things are obvious:
- sshd
- mysql-server
- apache
These processes are essential to the functioning of a VPS, but they can be tuned a lot. I’ve tuned a 80MB VPS from 4MB free back to 30MB free by making a few small modifications:
- Replace openssh-server and clients with dropbear, dropbear only uses 900K vs more than 3MB for OpenSSH
- Configure mysql for low-memory systems, by using the my.cnf recommended by vpslink
- Run apache’s prefork-mpm with the following settings:
-
StartServers 1
-
MinSpareServers 1
-
MaxSpareServers 5
-
ServerLimit 50
-
MaxClients 50
-
MaxRequestsPerChild 5000
-
- Disable any apache-module that you don’t really need with:
- a2dismod <module>
Using ‘top’, and sorting on the “RES” column you can easily spot the memory hogs. Try looking for smaller or simpler alternatives for large processes.
Also consider if you need various services, or that you could possibly do without.
Update 2008/11/04: Some more pointers for reducing your memory footprint (from the perspective of a debian etch install):
- Install ‘dash’ and make that the default shell (saves 2MB per shell)
- Install ‘runit’ to replace init and ‘runit-run’ to replace sysv-rc
- Install ’socklog-run’ to replace sysklogd/syslog
- Remove the getty’s (as you only login over ssh anyway) from /var/service and /etc/sv, then reload runit.
This resulted in (on an otherwise idle and default debian-etch minimal install) in a memory-usage of 2564kb, with the following processes running:
root 1 0.0 0.0 104 20 ? Ss 10:38 0:00 runit
root 2930 0.0 0.7 2736 564 pts/0 Ss 10:48 0:00 dash
root 3429 0.0 0.0 132 32 ? Ss 10:57 0:00 runsvdir -P /var/service log:
root 3431 0.0 0.0 108 28 ? Ss 10:57 0:00 runsv socklog-unix
log 3432 0.0 0.0 160 76 ? S 10:57 0:00 svlogd main/main main/auth main/cron main/daemon main/debug main/ftp main
root 3433 0.0 0.0 108 32 ? Ss 10:57 0:00 runsv socklog-klog
log 3434 0.0 0.0 128 40 ? S 10:57 0:00 svlogd -tt main/main
nobody 3435 0.0 0.4 2528 332 ? S 10:57 0:00 socklog unix /dev/log
root 3436 0.0 0.3 2528 300 ? S 10:57 0:00 socklog ucspi
You still have all the features, and can still use bash for your interactive shells, but you can have the memory resources free when you need them, and also still have cron, syslog and sysv-rc functionality.
You can limit diskspace usage (not mentioned up to here) by using busybox and friends and uninstalling some packages busybox replaces. However, in my experience, diskspace is less an issue than memory.
Visiting Linux-Kongress.de
This week I’ll be at the Linux Kongress in Hamburg Germany. It’s a quite small congress, with 2 technical tracks which go quite in-depth into kernel stuff.
There doesn’t seem to be any official WiFi here that’s free to use, so I have been using Iodyne dns tunnels, and I’m not using an event accesspoint that’s put up by the GUUG guys.
My hotel only has paid wifi as well, but I couldn’t get Iodine working there. I did notice that ping traffic is allowed and let trough, so I’ve setup a ping tunnel now, using icmptx, which I’ll be testing tonight, when I’m back at the hotel.
Yesterday evening after I arrived in Hamburg I walked around town a bit, looking for a nice bar to have a drink… There aren’t too many near the reeperbahn (mostly just private clubs, sex joints and hookers…) but I finally found a nice Irish bar, with an unhealthy supply of Guinness and Murphy’s
Update: I was back at the hotel, and the pingtunnel (icmptx) works over wayport wifi
I also got the gifts I wanted to buy today
Proxytunnel over JoikuSpot
JoikuSpot Light is an application for Symbian S60 devices (like the Nokia E70) which will turn your gprs/umts mobile phone into a WiFi hotspot. The free ‘light’ version of Joikuspot only allows HTTP and HTTPS connections, by proxying them. I always like to possibility to use SSH, and other protocols, so I tried to use proxytunnel to connect with ssh. I couldn’t get a connection working, while regular HTTPS traffic from my browser to a banking-site worked perfectly.
After playing around a bit with Wireshark, netcat and proxytunnel I found out that the Joikuspot accesspoint will only proxy connections created with the HTTP/1.1 protocol, and not with the 1.0 protocol.
Proxytunnel only uses 1.0 connections, and netcat would also not work when using ‘-X connect’ proxy support. Proxytunnel was quickly fixed to use the 1.1 protocol, as I don’t think there are any proxies out there that do not support 1.1, I expect this won’t have any side-effects.
So, if you are a proxytunnel user, please test the current subversion snapshot (r248) and report any regressions/issues to the proxytunnel list. If you are a JoikuSpot user, please try out this new proxytunnel version, as it should now work with your mobile accesspoint.
Eth-0 — A very nice and small lanparty
This week I spent my days at eth-0.nl, a new but very nice outdoor lanparty, organised by KillerCow and friends in a nice location near Wieringerwerf, Netherlands. As usual when you plan an outdoor lanparty you can guarantee lots of rain… which was present this time, as usual. The partytent village I was staying in with Buzz, Alex, Jeroen, Gido, Psy and Stoney managed to keep most of our stuff dry, even during some of the worst weather.
During the week we spent much time near the campfire, attending lectures and general ‘lamballen’
.
There were even some small competitions, including a team-based scavenger-hunt, which consisted of weird tasks like eating grass and garlic to solving mathematical problems. Another activity that I’ve spent a lot of time on was the water-rocket competition, where my rocket kept first-place for quite some time, to eventually end in third place. The Photo-website isn’t up yet… (will paste like when it does become available) but there are a few video’s below.


