df@sei.cmu.edu (Dan Farmer) (05/17/91)
(This is fluff, for my own amusement. May it amuse or entertain you as well... -- dan) For any who care, this is the "behind the scenes" in the making of perl cops. It was interesting to me, mainly because of a couple of neat things that happened. One, it was a cooperative effort with people around the world, that for the most part had never met each other before; and two, it was interesting porting mostly shell stuff (gag) to a nifty language that I hadn't had much experience with. For a long time, people have been asking me to port cops over to perl. I was reluctant for several reasons -- one, it seemed pretty much like wasted effort. I was fairly committed to continue working on cops, and part of its' success was that it was so portable. While perl is certainly portable (tho not as much as I could have hoped for, alas, as I found out), it hasn't reached the critical mass on the net yet, and many systems didn't have it -- most of the small ones didn't, and that's who I had originally targetted cops for -- the inexperienced small sites and administrators. Also, if I put out a perl version, then unless I was willing to do two versions of the same program in two different languages, I was just asking for trouble. However, putting in perl *did* have quite a few advantages -- one, since cops was being run on lots of architectures, it would be a lot easier to have one version of cops lying around, and not have to worry about all those damn C executables for all of your machines. Also, I thought that there would be a fair amount of speed increase -- part of the trouble I had with the shell stuff was there was a lot of duplication... I don't know (and am afraid to look :-)) how many times the password file is read and processed. With the perl version, it was much easier (e.g. it was possible :-)) to pass information back and forth between the modules. Also, for the type of work that cops does -- processing mostly text and system stuff into something more manageable -- perl was a lot easier to use, as well as being an order of magnitude easier to write and debug than shell or C. At least for me, it was -- I'm not going to get into theological debates here. Perl hid a lot of the gnarly stuff from me that can be a real pain to learn on various systems... since the shell version of cops runs on over a hundred platforms (at least), I've had more than enough porting problems with just bourne shell and awk stuff. Finally my curiosity got the better of me -- I decided I'd like to learn more about perl, and it seemed like it would be fairly easy to do, and with some help, I could hammer together a quick version in a few weeks, maybe a month of work. And so it began. I started out by posting a note to comp.lang.perl, asking for volunteers to put together the port, and got promptly flamed for asking others to do my work :-) But I did get a dozen volunteers in a short time, about half from people I knew, and half from guys (all male) I had never heard of before. Thankfully, Steve Romig, the heir to the kuang throne, was one of the first volunteers (actually, I twisted his arm 'till he said yes...) and one of the other recruits was Tom Christianson, whose encyclopedic knowlege of perl was only matched by a few other people on the net. As it turned out, Tom would end up doing quite a bit of the work... but I get ahead of myself. Working with a group of volunteers that you've never seen, and have no authority or control over is an interesting venture :-) Also, the problem with making sure everyone has the most up-to-date versions of everything is interesting, at best. I didn't want to give outsiders (friends or not :-)) an account on my machine, so I created a mailing list and tried to make sure that the most up-to-date sources were available via anon-ftp, in a hidden directory (unreadable by all, with a strangely named, world read and write subdirectory known to the group inside). Since cops is pretty modular, my first thought was just to have people send in their hacks of whatever module caught their fancy, and we could work from there. I'm sure anyone who has managed any software project is laughing by now, but what can I say... Of course, this completely ignored one of the big wins that I was hoping for in perl -- that of the sharing of date from the programs. My hope was as the things were being built, someone would step forward and magically have a solid data structure that we could all latch on to. Miraculously, it almost happened. Steve had put together something that kuang was using, and after a bit of bashing, it seemed to work out as the information engine. After a couple of weeks, with me sending progress notes to the group, and vainly trying to keep the sources available via anon-ftp, things were going well -- it's interesting how in most groups, a small percentage of the people do a large percentage of the work... this was no exception. 3 or 4 of the group were doing the actual work (more than I had hoped for, really), and the rest were kind of floundering without direction. This was probably my fault -- having no plan, no cohesive structure or strategy, heck, I was lucky that it was going as well as it did. Certainly everyone was there with good intentions... Then, things ground to a halt. I had to take a two month haitus, and when I got back, discovered that I had nearly forgotten everything :-) No work was done by the group while I was gone, interestingly, so I guess as a project leader and direction giver, I was doing *something* when I was there -- strangely comforting and mildly chilling to realize, just the same. The group had put together a collection of skeltons before we had stopped, and now was the time to put the final pieces together. Thankfully, Tom was suckered into, er, volunteered to help me with this, although, as it turned out, he ended up pulling almost all the stuff together single-handedly, with occaisional bits of guidance from me. The final product was interesting -- as I said before, certain things in perl didn't work on certain machines... also, the many different versions that were around the net didn't help much. Testing the beast (p-cops) was a real bear, because almost all the machines I had used to test the normal cops out on were experimental or lightly used machines that friends had let me bash on, and they usually didn't have perl loaded onto them, or, worse yet :-), had an old version of perl. So I spent lots of time ftp'ing perl, running Configure (mostly hitting the return key :-)), and makeing perl. As much as I like the language, this is not the most fun thing to do. I will be thankful when vendors ship the binaries with their OS releases (if larry can ever resist feature temptation and stabalize the sucker), so this kind of thing is unneccessary. Total time to port cops to perl, oh, about 5 weeks, I'd say, with fairly significant part time work from 3 or 4 people, perhaps. Interestingly enough, near the end of testing, I became very glad that I went through all of this effort. I'm going to be delving into network security next, I think, and am going to be working on a model that will use information gotten at the host level. With networks looking as they do, with lots of different architectures, configurations, etc., the perl cops will be a real boon. It is *so* much easier to maintain, change, and write new code that will do what I want, if it is in perl, plus it should be easy to write my data gathering and remote probing stuff neccessary for the project, too.