Wed, 04 Jul 2007urledit firefox extension project page is up.
I put up a project page for the new urledit extension. It includes download
links and a screencast demo.
Comments: 1 (view comments)
Mon, 07 May 2007My svn repo now online-ish.
Lack of updates due to all energy being spent on upgrades/fixes to my new
house! Sorry folks ;)
Having recently merged all of my code repositories into one single subversion repository, I decided it was time to look into running a web-based interface to it. Looks like some short time ago ViewCVS (like cvsweb) was rewritten to support different version control systems and renamed to ViewVC. It's dead easy to configure, so within minutes I had a happy web-based view into my new, single, repository. This repository contains most of the code I've ever written (excluding (job and school)-related stuff). Looking back at it now, there's code in there I haven't touched in years. One of those is rssnews, which I wrote to teach myself perl back in 2002. The rewrite barely got started but made its way into source control. Seems funny now, where there are entire dot com businesses built around serving syndicated feeds, that I wonder where I might be if I had continued to maintain it? Surely I'd be a millionaire ;) Another is 'diesel', a project I started to make automagic configuration of CSH's new FWSM context easy. I only finished the first part, which was an expect script which would read a config file in and install it into the firewall over ssh. CSH recently added a user-configurable web tool that allows members to configure firewall access rules for their registered machines. It uses this expect script to set rules, last I recall.
Good times. Oh, and I found this neat site the other day:
It has some decent writing. Brian Jones makes some good points in this piece about sysadmins and technical books; that sysadmins are starting to lean towards writing more code than simple administrative tasks. He (I think it was him) also talks about how programming methodolgies have become more popular and adopted and questions why no common-practice sysadmin methodologies have risen.
Comments: 1 (view comments)
Mon, 29 Jan 2007Comment spam that got through
I get emails from this site when someone comments.
This morning, this showed up: Name: Virtual Pharmacy Email: [snipped] URL: [snipped] Hostname: 114.199.36.72.reverse.layeredtech.com (72.36.199.114) Entry URL: http://www.semicomplete.com/blog/geekery/barcamp-sanfrancisco-2 Comment location: [snipped] Everyone repeat, what alcohol should be consumed moderately, but what it means? Why to women recommend to drink more moderately than to men? What is the female alcoholism? WBR LeoPA quick google search for the strange tail token, "WBR LeoP" reveals a clear indication that this is comment spam (as if the content didn't give it away). The url the spammer used points at pharmacynewsblog.com, which looks like a normal blog. It's not. The content is entirely viagra-and-friends related, which is fine. However, examine a simple visible text snippet of the following (this is from the frontpage): Drug treatment may beat psychotherapy at ...Google for this phrase and you'll find that it's been plagiarized. But deliciously so: View source, you'll see: <p>Drug <b class=ne>joint pain are </b>treatment <BLINK class=ne>of purchase </BLINK>may <sup class=ne>wellbutrin at </sup>beat <small class=ne>and paxil vs </small>psychotherapyThe css class 'ne' sets 'display: none' among other properties that make it stay out of the way of the browser. This is quite clever, and appears automated. pharmacynewsblog.com seems to be a somewhat autogenerated spam blog that takes news postings about viagara and the like and injects random html into it, with the intention of defeating antispam solutions. Anti-spam engines probably aren't smart enough to know that it should ignore the text pieces that are invisible. Who knows. But, back to the spam comment. I use javascript to poke parts of the comment form indicating that a javascript-capable browser was used to submit the comment. If javascript is not detected, the comment is denied. This comment got through, which means that javascript was enabled, which means that it was probably a webbrowser that did it. Here's the apache log snippet: 72.36.199.114 - - [29/Jan/2007:13:01:17 -0500] "GET /blog/geekery/barcamp-sanfrancisco-2.html HTTP/1.1" 200 15903 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" 72.36.199.114 - - [29/Jan/2007:13:01:18 -0500] "GET /style.css HTTP/1.1" 200 2584 "http://www.semicomplete.com/blog/geekery/barcamp-sanfrancisco-2.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" 72.36.199.114 - - [29/Jan/2007:13:01:20 -0500] "POST /blog/geekery/barcamp-sanfrancisco-2 HTTP/1.1" 200 16392 "http://www.semicomplete.com/blog/geekery/barcamp-sanfrancisco-2.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" 72.36.199.114 - - [29/Jan/2007:13:01:21 -0500] "GET /style.css HTTP/1.1" 200 2584 "http://www.semicomplete.com/blog/geekery/barcamp-sanfrancisco-2" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"It didn't fetch any images, but it did pull style sheets, which is strange behavior if it's a simple spam bot that doesn't care about how a page looks. It also pulled the blog posting page first, then submitted a comment. Further indication that this bot is either really clever, or a person is behind the wheel. If you search for the ip, 72.36.199.114, the first hit on google is an automagically updated list of known comment spam hosts.
Comments: 3 (view comments)
Wed, 27 Dec 2006New ssh vpn article, soon.
I keep an eye on my apache access logs to see what kind of traffic my site gets
and why it gets here. It seems that a non-trivial number of searches are for
'vpn over ssh' and similar variants. These land at the
ppp over ssh
article.
New versions of openssh have built-in support for tunneling, and do not require ppp at all. Seeing as how I've never really used this new feature, and there's a nontrivial number of searches ending up on the ppp-over-ssh article, I think it's time to write a little article on how to use the new openssh built-in tunneling. Stay tuned...
Comments: 0 (view comments)
Wed, 15 Nov 2006What next?
I've still been swamped with work, life, more work and more life. As as result,
I've posted much less frequently lately than I have in the past.
This is mostly due to lacking time to spend on research. I've learned many new things in recent weeks that I'm eager to post about, but I haven't had time to sit down and actually write. So. This site has very few regular visitors, but to those of you who do read: What should I post about next? Ideas would be much appreciated. :) I'm also working on a new site layout and planning on putting more time and effort into research and posts here. We'll see how far that actually goes, though. Site layout should be done soon. My awesome (?) GIMP-fu created a new logo. Thoughts and suggestions welcome.
Comments: 5 (view comments)
Tue, 03 Oct 2006Site host relocation
I noticed that this site's up on waxy.org/links. In preparation for traffic, I have moved the site to another server that can better handle the traffic load.
Let me know if there are problems.
Comments: 1 (view comments)
Sun, 23 Jul 2006Pyblosxom comment antispam plugin
Ever since I added comments to this site, I've started getting comment spam. To
combat this, I hacked together a comment management system using jquery and
python. It lets me search comments and delete them via web interface.
I'm bored of deleting comments by hand. So, I wrote a little antispam plugin. This plugin creates a token that expires after a given period of time. This token is used as a hidden item in the comment form. If this token is expired when the form is submitted, the comment is rejected. Spam seems to come entirely from solo-connection POST requests. This means that the bots don't bother viewing the page first. In theory, the bots will be using a cached idea of the form, which will be expired. We'll see how well this works. Right now it just uses a timestamp. If that fails, I'll add other tokens such as source IP, etc. Perhaps cookies too? This should be simple to filter out, becuase the spam bots don't act anything like humans with regards to browsing behavior. I have enabled the plugin on this site. I'll post the source when I see it actually working correctly. Waiting for spam bots to come by is boring :(
Comments: 3 (view comments)
Sat, 22 Jul 2006Dynamic DNS + DHCP Article
I wrote a new article (due to overwhelming demand of 1 person asking) about how
to get dynamic dns and dhcp working.
Comments: 0 (view comments)
Tue, 11 Jul 2006Pyblosxom single-entry page title plugin
The page titles pyblosxom provides are usually great. However, when there is
only one entry displayed, I feel it would be better to rely on that entry's
title.
I wrote a very short plugin to do just that. Turns out the plugin api for pyblosxom is quite easy to understand, and this hack was only about 10 lines. pagetitle.py adds a new variable which will contain the standard page title, unless there is only one entry in view. If there is only one entry in view, the page title is augmented with the story title aswell. This makes search engine results and browsers happier, as they can recognize what your page is about by the title. User experience good, also good for search engines. The new variable you want to use is: $blog_title_or_entry_title If you want to get a better idea of what this plugin does, you can click the permalink below to view only this entry. The page title (in the url bar) should now reflect this entry's title.
Comments: 1 (view comments)
Fri, 30 Jun 2006jQuery autofill version 2
This post marks 4 in one day. Whew!
Resig and I were bouncing ideas around after I made the form filler, and we came up with something that fits very nicely into the jQuery api (in the form of something very pluggable).
You'll need the following code that will extend jQuery's functionality.
Basically, it adds 'saveAsCookie' and 'loadAsCookie' function calls to
$.fn.saveAsCookie = function(n,t){
return this.each(function(){
createCookie( (n || '') + (this.name || this.id), this.value, t );
});
};
$.fn.loadAsCookie = function(n){
return this.each(function(){
this.value = readCookie( (n || '') + (this.name || this.id) );
});
};
You can safely put that code somewhere and load it anywhere you need autofill. Reusable code is awesome.
Now, we don't want to cache *all* input elements, becuase only some contain user-input and only some need to be saved. For this, I put the class 'cookieme' on all input elements I wanted to save.
$(document).ready(function(){
$("form#comments_form").submit(function(){
$("input.cookieme",this).saveAsCookie("formdata");
})
.find("input.cookieme").loadAsCookie("formdata");
});
The arguments to 'saveAsCookie' and 'loadAsCookie' are namespace prefixes. This way, you can avoid namespace collisions with other cookies. All of my autofill cookies will be prefixed with 'formdata' and suffixed with the element name or id attribute.
So, we squished the code down to 6 lines, 4 of which are actually meaningful. jQuery++
Comments: 5 (view comments)
|
Search this siteNavigation Page 1 of 3 [next]
MetadataHome About Resume My Code (SVN Web)ArticlesARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work EfficiencyProjectsfex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scriptsPresentationsYahoo! Hack Day '06 Unix Essentials Vi/Vim EssentialsTag CloudCalendar
FriendsBarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler ShieldsTechnorati |
|||||||||||||||||||||||||||||||||||||||||||||||||