Here’s an analog bandwidth meter made to look like an old pressure gauge. It’s actually new, but the paper showing the graduated scale was stained in a bath of black tea, then dried in an oven to give it an aged appearance. We think it’s quite effective.
The dial itself is a volt meter driven by an Arduino in much the same way as the multimeter clock. Bandwidth data is pulled from a Linux router, filtered down to the target data using ‘grep’, and sent over the serial connection by a Perl script. Since the meter itself is just waiting for serial data, alterations to the router’s scripting make it easy to represent a count of unread emails, tweets, or whatever data your code can scrape.
Here’s a study in sprite animations that [Travis Goodspeed] put together. He’s working with one of his favorites, the pink IM-ME device that he’s been hacking on for a while now. But if you don’t have this hardware that shouldn’t discourage you. There’s a lot to be learned from his methods which will translate to any microcontroller working with a graphic LCD.
He starts with a 24-bit PNM sprite that includes three frames of his desired animation. From there he needs a way to store the data for use with 8-bit microcontrollers. He chose to write a Perl script that will translate the image format into a 1-bit map. Each frame of the animation takes up a column width that is a multiple of 8 for easy retrieval by the processor. This translation into a C array, and the accompanying code that translates it into data for the frame buffer is the key to the animation process. What is he shooting for? A sprite-based video game on the handheld.
[Dodgy] wrote in to talk about his power meter data harvesting programs. This uses the same hardware by CurrentCost as the hack we looked at over the weekend but [Dodgy’s] implementation is different. It’s separated into two parts, the first is a webserver written in C that harvests the data and makes it available at an address on the network, the second is written in Perl to format and upload data to Google PowerMeter.
The C program serves data on a configurable port, defaulting to 3090. All of the data can be accessed in one line of code by loading http://127.0.0.1:3090, or individually with subdirectories like /watts, /time, or /tempr. From there you can do what you want with the data. The second part of [Dodgy’s] suite is a Perl script that polls the C server and sends the data to your Google account.
One thing that interests us is his comment that you should be able to compile the server side C code for an embedded device. It would be a nice energy savings to be able to upload data regularly without a PC running constantly.
[Graham Auld] got his hands on an energy monitor for free from his utility company. The device seen in the insert provides a nice LCD display but he wanted a way to graph the data over time. There was an included cable and a method of using Google PowerMeter but only for Windows computers. He did a little poking around and came up with a Perl script to interface the meter with Google’s tools.
The hardware module is known as the Current Cost CC128 and the developer was nice enough to publish an XML output description which [Graham] used in his script. From there it’s just a matter of registering and authenticating through the Google PowerMeter API. The script is not fully polished yet but it serves as a road map for your own implementation.
[Reza] sent in his mood rock. Unlike other “mood” devices, instead of showing what mood you’re in, it shows what mood the internets are in. Two ShiftBrite modules are controlled by an AVR ATmega8 which then connects to a computer via USB. The assembly is placed inside of a piece of alabaster.
USB communications are controlled by the ATmega8 running V-USB (formerly AVR-USB) firmware. [Reza] wrote some code to control the colors from the web using Perl and AJAX. Head over to the web interface to set the colors yourself. We’d love it if a live webcam was added so we could see our mood on the rock itself. Continue reading “Web controlled Dark Crystal”
[RSnake] has developed a denial of service technique that can take down servers more effectively. Traditionally, performing a denial of service attack entailed sending thousands of requests to a server, these requests needlessly tie up resources until the server fails. This repetitive attack requires the requests to happen in quick succession, and is usually a distributed effort. However, [RSnake]’s new technique has a client open several HTTP sessions and keeps them open for as long as possible. Most servers are configured to handle only a set number of connections; the infinite sessions prevent legitimate requests from being handled, shutting down the site. This vulnerability is present on webservers that use threading, such as Apache.
A positive side effect of the hack is that the server does not crash, only the HTTP server is affected. His example perl implementation, slowloris, is able to take down an average website using only one computer. Once the attack stops, the website will come back online immediately.
Update: Reader [Motoma] sent in a python implementation of slowloris called pyloris
tircd is an ircd proxy for talking to the Twitter API. It should work with any standard IRC client. After running the Perl script, you authenticate to the IRC server using your Twitter username as your /nick. Join the room #twitter and the /topic will be set to your last update. Any message you type will update Twitter and the room’s topic. All of the people you are following show up in the room as users and post messages as they tweet. If you private message one of them, it will become a direct message on Twitter. Other commands work too: /whois to get a person’s bio, /invite to start following, and /kick to unfollow. The project is brand new and will be added new features in the future like Search API support. Follow @tircd for updates.