Search Results: "ed"

6 February 2011

Kees Cook: fun with game memory

So, I was testing a (closed source) single-player offline game recently and thought this exercise might be fun to document. I didn t want to spend any time actually earning in-game money since I d played it before and I wanted to just skip ahead to other aspects of the game. I was curious how straight-forward adjusting my cash might be. So, noting the in-game bank account number of 219393 and account balance of 3000, I dived right in. First up, what s the memory layout of the heap look like? I looked at the brk and the mmap regions without a mapped library or file, marked with w in the permissions column, from /proc/PID/maps:
0827e000-08282000 rw-p 00000000 00:00 0
0a22e000-0b08a000 rw-p 00000000 00:00 0 [heap]
efa59000-efd00000 rw-p 00000000 00:00 0
efd00000-efd21000 rw-p 00000000 00:00 0
Knowing these, I could use gdb s find command, after attaching to the process:
$ gdb /some/cool/game

(gdb) attach PID

(gdb) find /w 0 0827e000, 0 08282000, 219393
(gdb) find /w 0 0a22e000, 0 0b08a000, 219393
0xaf03d08
0xaf06ca8
No hits in the first region, but I see two hits for the account number value in the second region. Let s start there and see what s near them
(gdb) x/8x 0xaf03d08
0xaf03d08: 0 00035901 0 00000000 0 00000000 0 0af06ce0
0xaf03d18: 0 0af06be0 0 00000059 0 0af03d98 0 0af041e8
(gdb) x/8x 0xaf06ca8
0xaf06ca8: 0 00035901 0 00000bb8 0 00000bb8 0 0820b148
0xaf06cb8: 0 00000001 0 00000000 0 00000000 0 00000000
In that second hit, I see the value 0xBB8, which is 3000, and matches our account balance. Let s see what happens if we just change both of those to add a bit a few orders of magnitude above the current value
(gdb) set var *0xaf06cac = 0 00100bb8
(gdb) set var *0xaf06cb0 = 0 00100bb8
(gdb) x/32x 0xaf06cac
0xaf06cac: 0 00100bb8 0 00100bb8 0 0820b148 0 00000001
(gdb) continue
And presto, clicking on the bank account details in-game shows a huge account balance of 1051576 now. No need to reverse-engineer any saved games, whew.

Debian News: Debian 6.0.0, codename Squeeze, is out!

After two years of intense work, the Debian project has published a new stable release.

You are welcome to read the full release announcement to get an overview of the changes, the installation manual if you are doing a fresh installation and the release notes before upgrading your systems.

Choose your preferred installation media from http://deb.li/squeeze Squeeze Countdown

Also, don t miss checking out the new design of the Debian website, Debian Wiki, Debian Lists Archive, Debian Planet , package information system and Debian Git web.

Thank you to everybody who made it possible!

Jan Wagner: Debian 6.0 squeeze released

Our baby was release just some moments ago. Many thanks to all who made this happen, I m very proud!
Also many thanks to the release team, ftpmaster, cd people, www-team, press folks and all who worked so hard today instead of having release party, to make it real.

5 February 2011

Tim Retout: Swirl

My employer moved offices to Park Gate about a year ago - there's a coffee/sandwich place just down the road, which I generally walk past to get my lunch. And it's got a sign outside: Cafe Crema served here I can't believe I didn't notice that swirl sooner. It will join my picture of the FreeBSD naughty toys machine from DebConf7. In other news, Debian squeeze is being released as I write this. It's been a fun two years. :) Also currently happening is FOSDEM - this is the second year I've missed it, so I reckon I'll make an effort for next year. Instead, today I was at a choral workshop with the Soton Phil, which was really good fun - especially when we danced (yes) through the Osanna from Mozart's Mass in C Minor.

Joerg Jaspert: Squeeze Release

So after quite a while I again had the opportunity to do the ftpmaster works of a Debian release. Not quite my first and hopefully not my last one, lets see. And, like last time, Mark joined to help with the work. Again, a few moments and not a detailed log (times in UTC): Right now (that is, 21:38 UTC) I am mosty waiting for the rest of the people working on the release (CD builders, press, website, ) to finish their task (building hundreds of images just takes ages). When that is done we can then do a coordinated push to the world. Last plans for that would mean in about an hour . Lets see, Mr. Murphy sure can be around. Thanks go out to everyone involved in preparing this release, be it in the past by fixing bugs, uploading packages, doing whatever was needed, as well as doing the work today. Update: If you miss us setting the new testing AKA wheezy to something inside there - there is no need to. It is simply the continutation of testing with just another name, which did not get changed contents, so nothing done for that. :)

Vincent Fourmond: ctioga superseded by ctioga2

First, some historical details: some 6 years ago, I discovered Ruby together with Tioga, a great library for producing plots. That immediately resulted in my first Ruby program, ctioga. But as years passed and more features were forced into ctioga, I was compelled to see my initial design mistakes, and think about a complete rewrite. This is where ctioga2 was born, some time at the beginning of 2009. I completely stopped using the old ctioga a few month after starting to work on ctioga2, but it took ages before I finally came up with a decent enough documentation to release and announce publicly. But now, it's done, and the first public release of ctioga2 is out, still fresh ! Here are a few highlights of the differences: In any case, you can make yourself an opinion of ctioga2 by looking at the galleries. Enjoy !

Andrew Cater: Debian 6.0 release is happening now

Debian Squeeze 6.0

As predicted - the release is starting this weekend 5/6 February 2011. IRC channels are starting to buzz -- irc.debian.org #debian-release - and there's also a live commentary session at http://identi.ca/debian

For many people, this is yawn-worthy: Debian stable is seen as old, outdated, outmoded. This is the climax of two years work.

Debian 6.0 will be supported for the lifetime of this release + one year if the past few releases are a guide.

A wrap up release 5.0.9 is planned for the previous Debian 5.0 [Etch Lenny] which will be supported for another year.

Debian works on many machine architectures: it's the upstream for Ubuntu and many other Debian derivatives: it works in many languages, has 1034 developers and maintainers maintaining 28693 packages [last number may vary fractionally depending on machine/architecture].

This is big - and I'm pleased and proud to be part of it. Oh, and there's now over 80 parties worldwide to celebrate :)

[UPDATE - Thanks to my colleagues who pointed out my mistake - Debian 4.0 was Etch, 5.0 is Lenny, 6.0 is Squeeze and 7.x will be Wheezy. Developer/maintainer and party numbers also updated]

Julien Blache: pommed v1.36/v1.37: updates, fixes, MacBook7,1

pommed v1.36 is out and brings support for the MacBook7,1, along with a few fixes and updates. A typo in the pmac keyboard backlight has been fixed, so fading now works there too. Product IDs for the ANSI and JIS keyboard variants for pmac machines were also added. It s been like forever since I last touched that code; not a lot of people still use those (great) machines. This release also contains a small update that will make it compatible with future kernel releases as applesmc will no longer have a fixed a name and location in sysfs. Update: I just noticed a bug in 1.36, so 1.37 is out now. It also contains two patches that were submitted through Alioth.

Matthew Palmer: I Am Certified!

I figured I may as well give the Hurricane Electric IPv6 certification a go, just for shits and giggles. As it turns out, it was pretty simple -- it took me about an hour to get through it all -- and it prodded me into doing a few things I'd never bothered with before (like finding out that my DNS registrar already supports v6 glue, which is nice). As a result: IPv6 Certification Badge for mpalmer YAY!

Craig Small: Syntax Highlighting with Mid-Century themes

As a site that discusses a variety of programming languages, I thought it would be good to have syntax highlighting for the code snippets. This blog runs Movable Type so it had to fit in with the setup I have already. So I found the Syntax Highlighter module ok and the initial installation went fine, it was simply:
  1. Download the .zip archive
  2. Unzip the archive into a temporary directory
  3. Copy the plugins/SyntaxHighlighter directory to my plugins directory
  4. Copy the mt-static/plugins/SyntaxHighlighter directory to static/plugins
You then need to edit the HTML Head template and add to the bottom of it the following line:
<$MTSyntaxHighlighterInclude$>
Next, I like to use Markdown as my markup language. But you can only have one type text filter. Another plugin called FormatStack solves this. Create a new stack and put Syntax Highlighter before Markdown. You can then create documents with both sorts of tags and it works quite nicely, well almost. Mid Century Problems This is probably not a Mid-Century specific problem but the modern templates or styles may cause a problem. You ll find you switch styles and suddenly, no more syntax highlighting. The problem is the onLoad functions get overloaded. Some styles have an onload property on their body. You ll see lines similiar to
 <body id="blogbase" class="whatever" onload="mtEntryOnLoad">
This onload event stops other onload events, which means Syntax Highlighter cannot do its thing. The fix is rather simple, you just adjust the templates so they look like the following:
<body id="blogbase" class="mt-entry-archive layout-wtt">
<script type="text/javascript">
 mtAttachEvent("load", mtEntryOnLoad);
</script> 
After doing this and publishing it all worked! You may also see this sort of problem with other plugins that use the mtAttachEvent() Javascript call. Reducing Includes By default, the script includes all syntaxes it knows. If you want to only include some, you do this by specifying what brushes you want. For example if you only will highlight perl and python scripts then you can change the line to:
<$MTSyntaxHighlighterInclude brush="perl,python"$>
Syntax Themes The other attribute the Include line will take is theme. There are several themes but default is alternating white on grey with the rest being variations on light text on a dark background.

Ian Wienand: Comcast self-setup with Netgear routers

I just got a Zoom 5341 modem to replace a very sketchy old Motorola model and so far it seems to work fine. However, the Comcast self-install switch process was not seamless. After you plug your new modem in the process starts fine, capturing your session and prompting you for your account. However at the next step it prompts you to download the Windows or Mac only client, directing you to an address http://cdn/.... It is at this point you can get stuck if you're behind a Netgear router (I have a WNDR3700) and probably others. The simple problem is that, for whatever reason, the factory firmware in this router does not pass on the domain search suffix through its inbuilt DHCP client. Without that, cdn doesn't resolve to anything, so you can't download the self-help tool and you're effectively stuck at a "can not find this page" screen. If you google at this point you can find many people who have hit this problem, and various information from erroneous suggestions that you've been hacked (?) to most people just giving up and moving into Comcast phone support hell. Assuming you now don't have internet access, you can complete the process with a quick swizzle. Somebody might be able to correct me on this, but I don't think you want to run the self-install tool from an actual computer plugged directly into the modem if you have a router in the picture, because the wrong MAC address will get registered. So, your best solution is to turn everything off, plug your computer directly into the modem, turn it on, get an address, download the tool, turn everything off, plug the router back-in to the modem and then run the self install tool. At this point, everything just worked fine for me. Netgear should probably fix this by correctly passing through the domain search suffixes in their routers. Comcast should probably fix this by doing some sort of geo-ip lookup to give clients a fully-qualified address in that webpage to download the tool even if their router is broken (or really, does downloading that file really require a content-delivery network?). You can probably fix this by running Openwrt on your router before you start. Otherwise, the Zoom modem and the Netgear WNDR3700 seem to make a very nice combination which I would reccommend.

Craig Small: JFFNMS and IPv6

ipv6-google-rrt.png One of the many Free Software projects I work on is JFFNMS, which is a network management system written in PHP. In light that the last IPv4 address blocks have now been allocated to APNIC it s probably timely to look at how to manage network devices in a new IPv6 world. First you need to get the basics sorted out and for that it is best to use the net-snmp command line utilities to check all is well. Then its onto what to do in JFFNMS itself. Now fixed with proper markup, I hope.
    strlcpy(hostname, a1, sizeof(hostname));
        if ((pptr = strchr (hostname, ':')))  
            remote_port = strtol (pptr + 1, NULL, 0);
         
Special Agent 6 All devices that are capable of being managed with SNMP have an agent. It s basically the SNMP server on the router, switch or server. The first step is to make sure it can accept and send traffic using IPv6. Depending on what the device is, it can be real simple. For example, my little Juniper router its a matter of setting the community and access control, just like IPv4 settings:
csmall@juniper1# set snmp community public clients 2001:db8:62:d0::/64
And then run snmpget on the command line to check
csmall@elmo$ snmpget -v 1 -c public udp6:2001:44b8:62:d0::4 system.sysObjectID.0
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.2636.1.1.1.2.41
We have success! For Linux systems that use net-snmp you will need to make the snmp daemon listen on UDPv6 ports as well as adjusting the access control. Access control is a matter of adding com2sec6 lines to /etc/snmp/snmpd.conf They are the same format as com2sec lines and are reasonably straight forward. Next, get the daemon to listen to requests on the IPv6 ports as well. The snmpd(8) man page says:
By default, snmpd listens for incoming SNMP requests on UDP port 161 on all IPv4 interfaces. However, it is possible to modify this behaviour by specifying one or more listening addresses as arguments to snmpd.
It wouldn t of killed them to put comma separated list somewhere, now would it? My /etc/default/snmpd file now looks like:
SNMPDOPTS= -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid udp:127.0.0.1,udp6:[::1]:161
The bits in bold are the changes. Then its a quick check:
csmall@elmo$ snmpget -v 1 -c public udp6:[::1] system.sysObjectID.0
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
And we have working agents! JFFNMS Changes OK, we have a working IPv6 network and snmp works across our network so we can query devices. JFFNMS uses PHP so all should be well, shouldn t it? Database Tables This is an almost classic problem with converting IPv4 to IPv6. You have 15 bytes for a IP address string 111.222.333.444 . Ipv6 can be much larger than that. JFFNMS has things like
  CREATE TABLE  hosts (
    [...]
   ip  char(20) NOT NULL default '',
A simple fix to use a char(39) or varchar(39) will do the trick. Fixing the JFFNMS code One of the most troubling problems with the host entries is that the values entered by a user can be a hostname, IP address or IP address and port separated by a colon. There are lots of bits of code that separate out the port or address by just finding the colon or use non-IPv6 aware functions like gethostbyname() that will need to be fixed. I ve got a function to check for an IPv6 address, using the inet_pton() function.
  function is_ipv6($addr)
 
  $net_addr = @inet_pton($addr);
  if ($net_addr === FALSE   strlen($net_addr) < 16)
    return FALSE;
  return TRUE;
 
PHP functions PHP still has the old IPv4 only functions, but unlike libc does not have the Address Family independent functions. The most significant absence is the replacement functions for gethostbyname(). There is dnsgetrecord() but it is quite low-level (it won t recurse lookups if you get alias or CNAME results). It s a little hit and miss in PHP-land with what functions work with IPv6 addresses and what ones do not. fsockopen() and file() do work with IPv6. PHP and SNMP To query remote devices using SNMP, JFFNMS uses the PHP SNMP functions. Unfortunately, while there is some IPv6 support in PHP, it doesn t extend to the SNMP functions. The library does it, as the net-snmp command lines use the same library, it is just that the small shim between the script and net-snmp that is PHP gets in the way. Looking at the PHP code itself you find things like
    strlcpy(hostname, a1, sizeof(hostname));
        if ((pptr = strchr (hostname, ':')))  
            remote_port = strtol (pptr + 1, NULL, 0);
         
which definitely need to be fixed for IPv6. There is also some simple address lookup going on somewhere as well which will also need to fixed. In short, JFFNMS won t be doing SNMP based queries over IPv6 until php5-snmp can do it. Reachability JFFNMS also has a different sort of query called a reachability type. It s essentially a ping from the server running JFFNMS out to the device being managed. It uses fping to do this work, but there is also a program called fping6. It s a simple matter of checking the address type and then selecting fping or fping6 to do the reachability work. The JFFNMS code soon to be pushed into git has this change in it now. Anything Else? The next stage is to find anything else that will work with IPv6. A likely candidate is the TCP and UDP port types as they use nmap to discover the ports and the fsockopen() function call to poll it. fsockopen() does handle IPv6 addresses if you escape them in square brackets.

Benjamin Mako Hill: Antifeatures at the Free Technology Academy

In addition to lecturing for two courses at MIT this term, I recently had the pleasure of giving a lecture on antifeatures at the Free Technology Academy -- a program which offers Masters courses over the Internet. Quite a few of the FTA courses are about free software, free knowledge, and related topics! It was my first time giving a lecture to microphone and an empty room. Although I found it a little tricky to adapt to the lack of any audience, the FTA folks put together a great video. I'm psyched that the course material will be available as open education resources for anyone who might want to incorporate it into another course. If you've seen my LCA keynote about antifeatures (which is also available online), there's not going to be a whole new in the lecture. If didn't see it, you might want to check out the lecture. I'll be in the online discussion group around the Lecture for the next couple weeks but you need to sign up to participate.

Craig Small: ncurses into experimental

Sven has been very busy getting a new Debian ncurses packages into order. With the multiple changes made and the fact that so many things depend on the shared libraries, we decided that it is best to put the first cut of these packages into experimental.

We're now using the Quilt 3.0 source format for our packages, which means that we should have a better handle on the patches, especially as they all now have Dep-3 patch tags .

So what has changed, why should you go over and try the experimental packages?

Craig Small: dh-make and cdbs

If you use dh-make with CDBS then you need to know that CDBS is no longer a package type, but is a rules format. This is where it should of been in the first place and for a few versions of dh-make there was this half-hearted attempt to change it over. Version 0.57 has the right fixes and just got uploaded. I'm not sure how many people actually use CDBS on new packages anymore, but it should work fine now. Oh, and dh-make is now of Alioth git repository instead of subversion.

Craig Small: A few minor updates

No real terribly exciting updates lately but all important in their own way. ncurses A new version of ncurses got uploaded into sid. It should hopefully fix the backspace versus delete problem some of the FreeBSD people have been having with some of the terminal emulators. Oh, and if you are pining for the good old days when 8 colours and 64kB of memory was good enough for everyone, checkout ncurses-examples which have a bunch of interesting things you can do with curses, including some games. Anyone remeber the tower of Hanoi? dh-make dh-make, the tool to take a raw tar (or zip) archive and make a Debian package has been updated too. One of the interesting side-effects of maintaining dh-make is you find out (usually through bug reports) the little changes that happen to the Debian package build process. Most people, including myself, though the main big thing between versions 1 and 2 and version 3 of the source formats was the inclusion of quilt patches right inside the source files. And probably for the sake of "main things" this is true. What I didn't realise is that dpkg-source has changed in other ways too. Bug 580804 tripped this one up. For most people, you run dh_make, fix some things up and use debuild. If you didn't have the original tar file (perhaps you got the source from git or svn) you just use --creatorig and it copies the current directory into ../whatever-1.2.3.orig Source format 3 doesn't like this. Previously it would find that there was no orig.tar.gz archive but there was a orig directory and make the archive from that. Now you have to do it yourself and dh_make does it like that too. pidgin-musictracker Now this should of been a pretty simple stock-standard upstream upgrade. Download the file, uupdate, debuild and release. The problem is that upstream didn't fix their po files. These are the translation files that convert the raw english texts in a program into whatever language. This means the first time you run the build process, you have no diff file. However when you run it the second time, part of the install target rebuilds the po files (mainly the line references), you have differences and then a big diff file of these po updates. The real fix is to make sure your po files are up to date before you release! The trick is that they don't automatically and I have been caught myself; though it happens in the release testing phase (because my release testing involves usually building the debian archive so I see my own problem). irc came to the rescue again. Someone there suggested getting dpkg-source to ignore the changes. The way you do that is put parameters into debian/source/options. I wanted to ignore the changes to the po and pot files so my file has:
extend-diff-ignore=po/.*\.pot?
I put that in and it works!

Craig Small: Playing text adventures with mudlet

Mudlet I've been playing text based multi-user games on and off for years, or perhaps that's decades. When I first started playing them, all you had was telnet. Then this program called TinyFugue appeared which is still shipped by Debian. The generic term for these sorts of games are MUDs, or Multi User Dungeons. Anyhow, I recently came across a new MUD client called Mudlet. It's a very slick program and works quite well. The way it does its triggers (reactions to what the mud sends you) and aliases (reactions to what you type) is done well and is fast. For some people you may have 100s of potiential matches on a incoming or outgoing line so you want it to be fast. After trying it out, my next reaction was "ok, so is it packaged in Debian?". To my surprise, it wasn't so the only obvious thing to do was for me to package it. It is now sitting in the NEW queue waiting for our ever-overloaded ftp masters to have a look at it. While the program is done well, as shipped it doesn't play too well with a Linux system. The package carries about 4 different other packages around. I've changed that now so it uses the system libraries and fonts. All of them are shipped in Debian and I'm sure they individually get more attention and love then I would give them being a sub-part of the main package. It of course cuts down on build times and archive sizes too. I still play muds, no matter what client. For me there they're fun on two levels. The first is the puzzles and gameplay of the MUD itself. I play some MUDs run by Iron Realms who continuously update them, giving you new challenges. The second level is the scripting and customisation you can do. Instead of typing "sip health" you can write some scripts to check your health level and get the script to do it. Mudlet (and a lot of other MUD clients) use the Lua langauge to do this scripting. It's a little funny language but is easy to learn and use. You won't be able to build some epic programs with it, but for scripting it is pretty good. Languages in Hunspell Mudlet uses the hunspell library for spell checking. I have, of course, linked it with the Debian library. The difficulty now is what language? I was surprised that when you intialise the library, you specify what language files to use right there. Now for me its simple, the english dictionaries should be used! What I don't undertand is if there is a way of determining the right dictionary globally for a user. I first though it would be one of the locale parameters, those LC_whatever fields. Mine is en_AU.UTF8, which there is no dictionary for as I'd use en_US or en_UK. I could possibly patch Mudlet and find a dialog box somewhere where you can set the language, but to me an environment variable makes more sense. Does anyone use the DICTIONARY variable, for example?

4 February 2011

Richard Darst: DebianNYC Squeeze release party

DebianNYC is having a Squeeze release/super bowl party this Sunday. It is in Park Slope, Brooklyn, and there will be both super bowl watchers and Debian installers/hackers who didn't know the super bowl was this weekend. For more information and to RSVP, see the wiki.Someone in IRC had the bright idea to have a "upgrade to half-broken testing" party in a few weeks. This sounds a lot more fun - and educational. We have been having so many events lately that I am a bit worried about having things too close together, so I guess we'll take it as it comes and people want to organize things. In the near future, we could have a Novice Night in Brooklyn, a Novice Night in the Bronx, a workshop on configuration management of clusters, and now this testing upgrade party.

Marco d'Itri: Being an early adopter

This object from the old 6bone whois database is the earliest trace I could find of my IPv6-related activities:
inet6num:     3FFE:1001:210::/48
netname:      ILSWAN-NET-6BONE
descr:        Italian Linux Society geographically dispersed test network
country:      IT
admin-c:      MDI-RIPE
tech-c:       MDI-RIPE
rev-srv:      attila.bofh.it
rev-srv:      spock.linux.it
mnt-by:       MNT-ILS-6BONE
changed:      md@linux.it 20000530
changed:      md@linux.it 20010123
source:       6BONE

Lars Wirzenius: Edinburgh squeeze release party

Moray and I decided to celebrate the Debian squeeze release in Edinburgh, Scotland. http://wiki.debian.org/ReleasePartySqueeze/Scotland/Edinburgh has the details, and will get updated as necessary, but here's a repeat: If you like Debian, please join us.

Next.

Previous.