MGLEE's Journal http://use.perl.org/~MGLEE/journal/ MGLEE's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:36:14+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 MGLEE's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~MGLEE/journal/ Virus ! http://use.perl.org/~MGLEE/journal/19438?from=rss Doh ! An<nobr> <wbr></nobr>.exe from a friend in my email. What is the one thing you dont do. And what did I do ? A moments lapse in several years, and I work in email security too. Instantly recognised what I'd done and ran the virus scan, which found the offending files and removed them, apparently it was a trojan worm (aren't the all). What really scared me though was the number of dialers it found that I certainly hadn't downloaded. I removed all them too and resolved only to use Opera as my browser. I must run the virus scanner manually on my other windows machine too, it should run automatically, but there is always the possibility that its found a virus and is patiently waiting for me to click an 'ok' box sat in its quiet and rarely visited personal cellar. MGLEE 2004-06-23T12:54:09+00:00 journal Goddess of IT http://use.perl.org/~MGLEE/journal/19344?from=rss <p>An indian friend of mine as a small Hindu shrine in her home. One of the pictures is of Durga a sort of patron-goddess of hers. Durga is one of the coolest of all gods. She rides a tiger. How cool is that ? She has eight arms, each one holding a different weapon which she uses to fight demons and the forces of email. Wow that is so cool. Jesus only has sandals, walks or rides a donkey and touches people to cure them, although the water to wine thing was cool, but walking on water really is of little benefit unless the bridge is out.</p><p> Durga's weapons include the standard, spear, sword, shield, bow and arrow, mace, axe and trident, the discus which is a bit greek but why not, and what superhero would be without a thunderbolt. Along with the esoteric and downright bizarre. I imagine the conch shell is used for making noise or at a pinch throwing, or possible for scaring demons afraid of the sea. But a rosary ??? Worry demons to death perhaps. The bell I really dont understand, frighten off demons afraid of Hare Krishna sects ? The noose I can only guess is useful for finishing off demons already suicidal, or possibly lasooing cows. Perhaps the rod is good for blocked toilet demons and goodness only knows what use a lotus flower is in a battle. But my two favourite weapons are the pitcher and wine cup, what better way to celebrate your success.</p><p>This got me thinking, what would the goddess of IT carry in her 8 hands ?</p><p>Obviously she would ride a sack barrow, preferably one of those with 3 wheels that can go upstairs, all the better to lug around heavy boxes and equipment without damaging her back. One hand would carry a cross head screwdriver, another a flat head, obviously. The pliers of wire cutting would be useful as would small spanner of sdjustment. I think she should carry a caffeinated energy drink and a set of headphones for those quieter moments. A can of compressed air is good against the ever invading dust and fluff demons but what else ? Ideas ?</p> MGLEE 2004-06-18T09:45:26+00:00 journal Monkey up the Pole http://use.perl.org/~MGLEE/journal/19258?from=rss Whenever I see a BT (telecom provider) van in the road my heart drops. You just know something is going to go wrong with your phone, normally involving loosing broadband connection. Then many happy hours our spent talking to more monkeys about how you havent accidently unplugged the cable or blown a fuse, your net connection has been disconnected by them. I think their van drivers roam the streets at will, select somewhere they like the look of, then unplug and replug wires at random. When their desire to fiddle with cables is satiated they move on. This time the monkey was up the telegraph pole in front of our house. One minute we had a working telephone and DSL connection, then the monkey climbed the pole, then we had no telephone connection, nothing, not even a dial tone, just silence. First telephone call, explain the problem. Wait for the engineer<nobr> <wbr></nobr>... wait<nobr> <wbr></nobr>... wait<nobr> <wbr></nobr>... Another phone call, apparently the problem is with our equipment. No it isnt its with your monkey up the pole, explain, wait<nobr> <wbr></nobr>... wait<nobr> <wbr></nobr>... wait. Another phone call resulted in someone wanting to know if we'd sorted the problem with our equipment, I explained not our equipment but your pole is wrong, but we did get promissed an engineer. Who arrived 8am Saturday morning, 'I understand there is a problem with your equipment.' Noooooo just climb up the pole and plug the wire leading to our house into wherever its supposed to go. This he did, and hey presto the telephone and DSL connections sparked back to life. So back to waiting for the evil monkey visits again<nobr> <wbr></nobr>.... MGLEE 2004-06-15T09:25:13+00:00 journal Shameless Plug http://use.perl.org/~MGLEE/journal/17544?from=rss <p>Its been cooking for way too many months, but today it goes live. Minus a few features I wanted, fault of time, but they can always be put in at a later date.</p><p>So here it is Essence of Provence, <a href="http://www.essenceofprovence.com/">finest decorative tableware from France</a>.</p><p>Before anyone accuses me of being a big woolly softy for selling flowery table decorations, I'd like to point out that my wife looks after the commercial side, I just sell the goods and write the website.</p> MGLEE 2004-02-21T17:25:53+00:00 journal Burgled 2 - Plod http://use.perl.org/~MGLEE/journal/15309?from=rss <p>I've only ever been burgled twice in my life. The first time was in Paris, they took the video (and another worthless bag). The attitude of the police was - we cant do anything, we wont catch them, you wont get your property back.</p><p>Thames Valley police have a very different and much more positive attitude. The crime officer came round, took down the details, then sent round a forensics officer. The TV was dusted for fingerprints, the windows were dusted, the front door dusted, the newspaper the thief might have glaced at, taken away for examination, the envelope that had been stepped on taken away for further examination. They even leaned out of an upstairs window to dust the drainpipe the thief probably climbed up to check for fingerprints (and found a nice fresh beauty too).</p><p>Apparently we're not the only people to have a thief shin up the drainpipe, there is a cat burglar in the district. They have prints from that crime too and when they pull someone in for something minor and check their prints, the police will have some questions to ask them.</p><p>All I can say is well done Thames Valley Police, I'm very impressed.</p> MGLEE 2003-10-21T12:46:14+00:00 journal Burgled http://use.perl.org/~MGLEE/journal/15293?from=rss <p>Sunday night I come back from a weekend away to find the front door swinging in the wind, and cabling strewn across the living room floor. We'd been burgled.</p><p>You can tell a criminal mastermind by the value of the goods they take. I was most disappointed that my stereo system and extensive CD collection went completely untouched. The TV/video connection was dismantled and then abandoned, presumably there isnt much of a market in 10yr old 14" PAL/SECAM TV's. That surprises me, they're pretty rare. </p><p>The video collection was obviously rifled through, apparently 'Toy Story 2' and a dodgy copy of 'Peter Pan' (dubbed in French) cant be exchanged against a heroin dose. But much to my relief my dungeon full of computers went unnoticed.</p><p>So what did they take ? Ummm well<nobr> <wbr></nobr>... my slightly mouldy and distinctively odourous gym bag. They did tip out the trainers and deodorant first, even so I dont think this will put off any tracker dogs. A cheap watch, and my wife's camera, which was actually quite valuable, and no doubt will be soon on sale at a local neighbourhood car boot sale.</p><p>Perhaps its time I wrote all my software projects to CD, you never know when it might be needed.</p> MGLEE 2003-10-20T13:19:36+00:00 journal My new toy. http://use.perl.org/~MGLEE/journal/15220?from=rss <p>Its not often you see a mechnical calculator these days. Obsolete for over 25 years the functionality they provided can now be included on your wrist watch.</p><p>Its incredible to think that this was type of instrument that was used to design concorde or the 747. To modern eyes its large, heavy and cumbersome, but the quality of the engineering is all apparent. It still works and makes a wonderfuly satisfying sound when the keys are pressed and the handle turned.</p><p>Lack of ink in the printer ribbon precludes us from working out exactly what the buttons do. What exactly does 'triangle' and 'diamond' mean on the operator switch ?</p><p>But its wonderfully tactile and satisfyingly noisy.</p><p>Pics and sound <a href="http://195.72.176.3/summa/index.html">here</a>.</p> MGLEE 2003-10-15T14:34:25+00:00 journal The Article Problem http://use.perl.org/~MGLEE/journal/15135?from=rss <p>Something good happened this week, I was invited to contribute an article to a journal. Not a particularly scholarly journal, but a relatively well respected technical journal nevertheless.</p><p>I like to think that there are a few people out there who know me and who consider that I can write a balanced informative article on my personal areas of interest. Since the subject was directly related to my employment, I asked for management approval. Management said legal would have to clear it. Legal said marketing should clear it, and another big bod should clear it too.</p><p>My nice concise balanced piece is in danger of being edited out of existence, or worse, sat on until the deadline for submission passes, so that nobody can be potentially embarassed and nothing possibly untowards can happen.</p><p>What was even more amusing was one comment, 'same conclusions could have been reached in half a dozen lines'. I like to imagine the newspapers this individual reads, "War happens somewhere, could have been avoided.", "Self-important person says something, few take notice.". Thrilling indeed.</p><p>If a few lines were needed, a few lines would have been asked for, if a press release was required, marketing would have been asked. It could be so easy. A few balanced, informative column inches could have been added to the world, and maybe someone would have read it and thought more about what they were doing. But this is a scary thing, brand equity must be preserved, synergy must be leveraged and investments in resources productized.</p><p>The sound you hear is soft sobbing.</p><p> <b>update<nobr> <wbr></nobr>:</b>permission was granted in time (just)</p> MGLEE 2003-10-09T13:14:25+00:00 journal Using Perl to write PHP http://use.perl.org/~MGLEE/journal/15086?from=rss <p>Her indoors wants an e-commerce web site to sell table mats &lt;link posted + discount to journal readers when available &gt;. Despite enthusing about Perl and using it daily, I actually prefer to write dynamic websites in PHP &lt;hiss boo&gt;. Its quick, simple, very easy to prototype, and if an ISP is offering PHP then you know your site will work, rather than having to negotiate module installation and/or maintaining your own mini-CPAN in your user directory.</p><p>Most of the donkey work going on behind the scenes in an e-commerce site is simply writing and retrieving data from a database, and adding things together once in a while. My object model might require a dozen classes, although the attributes of each class are very different, the methods are very similar.</p><ul> <li>Store this object.</li> <li>Retrieve this object</li> <li>Show me a list of objects that fulfill these criteria.</li> </ul><p> I guess I could write a meta-class and identify the common functionality between each class and overload when needed. But this becomes a maintenance nightmare when you try to extend the system and have to walk through the code to find what functionality is coming from where.</p><p>So to automate the creation of my PHP I've reduced the various classes to a simple XML template. This template is parsed by a Perl script which not only spits out a fully formed PHP class from the template but also writes the common 'store', 'retrieve', 'retrieveLike' methods too. All thats left is for me to write the unique methods for the classes, about 3 or 4 per class. I dont have to worry about the simple methods, since I know they'll work (sure I'm going to test anyway), any errors I made in the template will tend to be very obvious since the class wont look like the object model or wont interface with the database. Now I have a templating system to help me rapidly create new PHP classes when I need them.</p><p>Cool or what !</p> MGLEE 2003-10-06T13:42:00+00:00 journal Another Upgrade .... http://use.perl.org/~MGLEE/journal/14960?from=rss <p>I'm a sucker for bright shiny new things. So I just coulndt resist the call of bright shiny 5.8.1 download.</p><p>Its happened before, you think everything will go swimmingly, that little annoying bug that you've had to work around will be fixed, and you'll be able to lie back in the state of smug self satisfaction thats usually reserved for LISP programmers. But then reality bites.</p><p>It could have been worse, only three of my 'daily use' modules refuse to compile under 5.8.1, but what a downer it is. My bright shiny new download has been tarnished, it didnt quite sort my life out, it might have fixed any number of annoying little bugs, but it brings its own new annoying little bugs with it.</p><p>Never mind I'm sure 5.8.2 will prove to be the grand solution to all my problems.</p> MGLEE 2003-09-29T13:05:32+00:00 journal Distributed DNS blacklists # 2 http://use.perl.org/~MGLEE/journal/14902?from=rss <p>The best architecture I can think of is using the distributed nature of Usenet to disseminate incremental updates to DNS blacklists using some authenticated structured format. The most appropriate I can think of is signed XML.</p><p>This system allows users to access blacklist information anonymously and create local (or regional) blacklist mirrors which are private to a local network (or ISP) or at the least not widely advertised. In any case, if one mirror is taken out, it doesnt affect any of the other mirrors.</p><p>The newsgroup would be moderated, trusted maintainers of blacklists given a key with which to create an 'approved' header with their own stamp of trusted approval.</p><p>The obvious attacks are post flooding and cancel bots. The former can be defeated with an official cancel bot, the latter by a resurrection bot.</p><p>Signing the content of the posts allows users to determine if they trust the assertion that the post content relates to the named blacklist and detect and reject attempts at poisoning the lists.</p><p>Its an imperfect solution, but its a start. Ideas ?</p> MGLEE 2003-09-25T12:52:22+00:00 journal Distributed DNS blacklists http://use.perl.org/~MGLEE/journal/14882?from=rss <p>Now that yet another DNS blacklist (monkeys) has been retired due to a continuing massive denial of service attack perhaps its time to rethink DNS blacklists.</p><p>Using DNS to rapidly query a server to check if an IP address is listed in it is a great idea. Its fast, little overhead involved, DNS is a well known and supported protocol. Querying against a single server allows the owners of the list to rapidly ammend the list when needed.<b>BUT</b> it also provides a single point of attack.</p><p>Somebody (maybe a spammer ?) has taken it upon themselves to launch continued denial of service attacks on the servers hosting the DNS lists. DNS wasnt designed to withstand such attacks, but surely with all the knowledge that has gone into designing distributed P2P networks there must be another way of distributing DNS blacklists.</p><p>Napster got taken out due to its client server architecture, Gnutella continues due to being entirely distributed. You can force a single server to go down through court action, or a DoS attack, but that will only affect a small part of the network, the rest continues unaffected.</p><p>So how can we apply this architecture to DNS blacklists ?</p><p>continued tomorrow...</p> MGLEE 2003-09-24T15:51:20+00:00 journal Bogus Email addresses http://use.perl.org/~MGLEE/journal/14854?from=rss <p>Interesting question this morning - <i>Can I block all these viruses being mailed to me by email address alone ?<nobr> <wbr></nobr></i>.</p><p>My first thought was, if the addesses are obviously bogus strings of random characters that manage to pass simple email address syntax checkers, you could trap them by applying <a href="http://www.mtm.ufsc.br/~taneja/book/node3.html">Shannon's Entropy</a> and detecting the randomness. But this may not work in email since many usernames and even domain names can appear to be entirely random, <i>k5031@hotmail.com</i> for example.</p><p>I then started thinking about <a href="http://mathworld.wolfram.com/BenfordsLaw.html">Benford's Law</a> and the entropy of numbers and wondered if that could be applied to emails.</p><p>I have a small number of friends who email me frequently and a large number of aquaintances (and newsletters) who email me occasionally. The most anyone would ever email me in a day is 20x, and that is a case of spending way too much time conducting an all day email conversation. Being a boring stay-at-home type, my set of friends is unlikely to change, and any new friend will more than likely start off in the set of acquaintances before being upgraded. Strangers write to me from time to time, frequently its spam, although sometimes it is an aquaintance with a new email address, or a new newsletter I have subscribed too.</p><p>Therefore I should be able to deduce an algorithm predicting the frequency with which any given email address sends me email. Armed with this I should be able to construct an allowed message frequency band for email communication. If an email address suddenly jumps outside this allowed frequency band, then something is wrong. Either this is a spam, or a friend (or acquaintance has a virus). Either way I dont want this email in my inbox, but quarantined.</p><p>hmmm could work.</p> MGLEE 2003-09-23T13:36:59+00:00 journal Net::Milter http://use.perl.org/~MGLEE/journal/14829?from=rss <p>On Friday I was given permission to release the last month's or so work to CPAN. How cool is it to work for an employer that allows you to both take from and give to the open source community.</p><p> <i>Net::Milter</i> is a module that acts as the Sendmail end of a Sendmail-Milter conversation. Milter is Sendmail's API for email filters that can test if an email is spam or a virus, or whatever. While <i>Sendmail::Milter</i> exists if you want to write an email filter in Perl, nothing existed that allowed you to query a Milter filter unless you were Sendmail itself. Hence you could only query Milter filters through Sendmail.</p><p> <i>Net::Milter</i> changes that, you can now query a Milter filter through an easy Perl interface. Sure the software is only alpha tested at the moment, and as far as I'm aware only works in my development environment with one Milter filter, but I'm certain others will test it and use it. If anyone finds any filters or environments where it doesnt work, tell me and I'll look into it.</p><p>Martin</p> MGLEE 2003-09-22T09:01:08+00:00 journal