<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-14650593</id><updated>2019-01-18T11:49:03.575-05:00</updated><title type='text'>Exploring</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default?alt=atom&amp;start-index=26&amp;max-results=25'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>68</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-14650593.post-7864139484082728766</id><published>2007-09-04T16:29:00.000-04:00</published><updated>2007-09-04T21:30:04.250-04:00</updated><title type='text'>Firefox Caching</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://primates.ximian.com/~federico/news-2007-09.html#firefox-memory-1&quot;&gt;Federico&lt;/a&gt; posted about some work he was doing on making Firefox not cache as many uncompressed bitmaps in memory. I was playing around with the cache stuff and noticed something: my Firefox cache is full of youtube videos. YouTube videos aren&#39;t exactly the best thing for Firefox to cache. My internet connection is fast enough that streaming the videos works just fine. I suspect that most people who use online video frequently do so on a connection that can support streaming (otherwise, YouTube would be painfully slow, and they&#39;d go do something else).&lt;/p&gt;

&lt;p&gt;It turns out that Firefox&#39;s cache is based only on least-recently-used. So, let&#39;s say you have a 50 MB cache. Right now, all 50 MB of it is full with cached javascript, css, images, etc. You go to youtube and start watching a 10 MB movie. 20% of your cache gets blown away. In all likelihood, you&#39;ll never view that video again.&lt;/p&gt;

&lt;p&gt;Even worse is if you listen to a flash-based media player. The MP3s that this downloads are cached just like anything else. So if you listen to 50 MB worth of music your disk cache gets blown away.&lt;/p&gt;

&lt;p&gt;Probably LRU isn&#39;t the best technique to use here. I&#39;m not sure how one would evaluate various choices (what is a representative test set of browsing sessions?)&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/7864139484082728766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=7864139484082728766' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7864139484082728766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7864139484082728766'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/09/firefox-caching.html' title='Firefox Caching'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-7331319491466679012</id><published>2007-08-30T19:53:00.000-04:00</published><updated>2007-08-30T20:07:49.658-04:00</updated><title type='text'>Yay Dual Homing!</title><content type='html'>&lt;p&gt;Today, we had our first drill with dual homing on reCAPTCHA. In Pittsburgh, the water main that serves the Carnegie Mellon area broke today, causing a complete water outage on campus. This has resulted in many servers being shut down. reCAPTCHAs servers were kept up, as they are production servers, however we were told that it was possible they&#39;d be shut down.&lt;/p&gt;

&lt;p&gt;It&#39;s times like these when you just love having a backup. We have a DNS service that does automatic health checking and routes away from unplanned outages. However, with DNS it takes a few minutes for these sorts of changes to take affect. We proactively switched away our traffic off of the pittsburgh servers.&lt;/p&gt;

&lt;p&gt;One of the funny things about using DNS for Dual Homing is how long it takes to really kick in. We&#39;re still getting requests to our pittsburgh servers even hours after we made the switch. This is one reason it&#39;s important to have DNS not be the only load balancing solution (you need a L7 or L4 load balancer as well)&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/7331319491466679012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=7331319491466679012' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7331319491466679012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7331319491466679012'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/08/yay-dual-homing.html' title='Yay Dual Homing!'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-800498391192900919</id><published>2007-08-28T15:42:00.000-04:00</published><updated>2007-08-28T15:56:03.277-04:00</updated><title type='text'>Facebook 2.0</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://bp3.blogger.com/_cTHNT2OZ0ok/RtR673Dy6qI/AAAAAAAAAB8/4tqE01D4XN4/s1600-h/Screenshot-Facebook+%7C+Home+-+Mozilla+Firefox.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;&quot; src=&quot;http://bp3.blogger.com/_cTHNT2OZ0ok/RtR673Dy6qI/AAAAAAAAAB8/4tqE01D4XN4/s400/Screenshot-Facebook+%7C+Home+-+Mozilla+Firefox.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5103839446528354978&quot; /&gt;&lt;/a&gt;

&lt;p&gt;So if your profile says you are single, and looking for women, single women looking for men might soon get a higher ranking in search results? I&#39;m not sure what other &quot;intentions&quot; facebook might know about&lt;/p&gt;

&lt;p&gt;Of course, this could open up a whole new era of social networking: I&#39;d call if AdFaces. If you feel that you are not showing up often enough in search results, you can bid for clicks on your profile with a CPC model. Or maybe Facebook can experiment with a cost-per-action model. Then we&#39;ll need a product like Facebook Analytics to improve profile conversion rate, and FaceSense to allow publishers to embed targeted profile advertisements on their website.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/800498391192900919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=800498391192900919' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/800498391192900919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/800498391192900919'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/08/facebook-20.html' title='Facebook 2.0'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_cTHNT2OZ0ok/RtR673Dy6qI/AAAAAAAAAB8/4tqE01D4XN4/s72-c/Screenshot-Facebook+%7C+Home+-+Mozilla+Firefox.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-6401599019800880157</id><published>2007-07-17T01:13:00.000-04:00</published><updated>2007-07-17T02:19:44.196-04:00</updated><title type='text'>Making bugs... and fixing them</title><content type='html'>&lt;p&gt;Two interesting bugs from today.&lt;/p&gt;

&lt;p&gt;First, you gotta be careful with order of operations. I wrote this code:&lt;/p&gt;

&lt;pre&gt;
int someValue = ...;
storePref(MY_PREF_NAME, &quot;&quot; + someValue + 1);
&lt;/pre&gt;

&lt;p&gt;The code looks innocent enough. However, order of operations kicks in here. The compiler translates this as: ((&quot;&quot; + someValue) + 1), or Integer.toString(someValue) + Integer.toString (1). So rather than adding one, we multiply by 10 and &lt;span style=&quot;font-style:italic;&quot;&gt;then&lt;/span&gt; add one :-). The fun part about this experience was that I had &lt;a href=&quot;http://gafter.blogspot.com/&quot;&gt;Neal Gafter&lt;/a&gt; sitting next to me to explain exactly what I&#39;d done, and also to point out where this problem is discussed in his fantastic book &lt;a href=&quot;http://www.javapuzzlers.com/&quot;&gt;Java Puzzlers&lt;/a&gt; (Neal gave me a copy, which I&#39;ve been meaning to read).&lt;/p&gt;

&lt;p&gt;In the &quot;Fixing bugs&quot; column, I was testing something out on IE 5.0 today (yes, five-point-oh, released in 1999. Sadly, it sill has some market share). The box had Google.com as the homepage, and I noticed that it displayed a JavaScript error (for older versions of IE, displaying this error was a default setting). After reporting this, it turns out that it was actually an interaction with Google Desktop. Now, I don&#39;t expect that there are &lt;i&gt;that&lt;/i&gt; many users with IE 5.0 and Google Desktop, but with millions of users, &quot;not a lot&quot; means thousands or tens of thousands of people.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/6401599019800880157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=6401599019800880157' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6401599019800880157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6401599019800880157'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/07/making-bugs-and-fixing-them.html' title='Making bugs... and fixing them'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-6355793633292019927</id><published>2007-07-10T19:39:00.000-04:00</published><updated>2007-07-10T19:55:06.724-04:00</updated><title type='text'>Yahoo&#39;s and Microsoft&#39;s CAPTCHAs likely NOT broken</title><content type='html'>&lt;p&gt;BitDefender went a bit overboard in their claim about CAPTCHAs. Their statement about CAPTCHAs was issued as a &lt;a href=&quot;http://www.bitdefender.com/NW516-en--Trojan-Uses-Hotmail-Yahoo-as-Spam-Hosts.html&quot;&gt;press release&lt;/a&gt; (which clearly has meet their goals of getting press -- regardless of the accuracy of their statements). The article states that about 500 accounts are being created per hour. This is about the effort of one person solving CAPTCHAs. If they had actually broken the CAPTCHAs of Hotmail and Yahoo, there would be tens of thousands of accounts every hour. The article also mentions that about 15,000 accounts has been created. At 2 cents per CAPTCHA, that&#39;s a $300 investment to manually solve the CAPTCHAs (this rate is easily obtainable in some countries). It&#39;s extremely unlikely that one could hire a person to break the CAPTCHAs of Yahoo and Hotmail for this price. Also, if you&#39;re working on a virus-type program, one of the easiest ways to generate CAPTCHA solutions would be to use your infected users (eg, make them type in a CAPTCHA once per day. If you integrate it into the web browser, it might not raise suspicion).&lt;/p&gt;

&lt;p&gt;The information that BitDefender has published actually suggests that these spammers/virus makers have &lt;i&gt;not&lt;/i&gt; beaten CAPTCHAs using OCR&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/6355793633292019927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=6355793633292019927' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6355793633292019927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6355793633292019927'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/07/yahoos-and-microsofts-captchas-likely.html' title='Yahoo&#39;s and Microsoft&#39;s CAPTCHAs likely NOT broken'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-3717946093724841030</id><published>2007-06-27T14:42:00.000-04:00</published><updated>2007-06-27T15:20:45.894-04:00</updated><title type='text'>Life at Google</title><content type='html'>&lt;p&gt;This &lt;a href=&quot;http://no2google.wordpress.com/2007/06/24/life-at-google-the-microsoftie-perspective/&quot;&gt;blog&lt;/a&gt; is pretty funny. It&#39;s sort of like what the Daily Show might say about Google -- the facts are mostly true (some are pretty out-dated), but they&#39;re twisted in the opposite direction of how things actually are.
&lt;/p&gt;

&lt;p&gt;The blog entry got me thinking about what I like and don&#39;t like about an internship at Google. One of my favorite things is the freedom to set my own hours. I personally have an aversion to waking up any time before 10am. Usually, I wake up, read some blogs, check personal email and reCAPTCHA support email (I can&#39;t check Google email remotely as an intern), then I walk to work around 11:30-12:30. Having the free meals every day (I rarely get to take advantage of breakfast, which ends at 9:30) is a huge plus. The blog article hinted at the end how huge of a factor the free food actually is. It&#39;s a relatively inexpensive perk that makes a huge difference.&lt;/p&gt;

&lt;p&gt;The comments about how the developer&#39;s work areas are laid out is also really interesting. The first time I saw the Google layout, I was a bit surprised. &quot;I thought I was getting an office!&quot;. I ended up really liking this in the end. Before Google, when working on the Mono project, the primary way to communicate with other people was IRC. When I had to ask a question, sometimes it wasn&#39;t always possible to get a response right away. At Google, my coworkers are sitting very close by. I can work something out on a whiteboard with them. I don&#39;t have to walk a long way to their office.&lt;/p&gt;

&lt;p&gt;One thing the article didn&#39;t mention (probably because it&#39;s a problem that&#39;s worse at MSFT than Google) is that going into a big environment like Google can be intimidating. With open source, building things was always easy. ./configure; make; make install. The process takes about  10 minutes the first time, 2-3 minutes every day, depending on how many changes. At Google (and I&#39;m sure pretty much any place similar), checking things out can be an adventure. A simple build process is probably an advantage of working on an open source project, or at a smaller company.&lt;/p&gt;

&lt;p&gt;At the end of the day, the thing I really enjoy about Google is the access to the vast repository of interesting code Google has to offer. Being able to see how a Google product works, under the hood, is just an amazing experience. I remember going snorkeling on an 8th grade trip to the Bahamas. The excitement of being able to see ocean life for the first time is very similar to my experience of being able to look into the moving parts of Google. Surely this isn&#39;t something unique to Google. I&#39;m sure there are as many fascinating moving parts inside Microsoft, or many other large companies.&lt;/p&gt;

&lt;p&gt;On another note, the reCAPTCHA launch went fantastically well. I was happy and relieved that we didn&#39;t have any embarrassing incidents like crashing under the load of Digg (Our servers handled it just fine!). We&#39;ve had some exciting customers adopting our product. I hope to write more soon.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/3717946093724841030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=3717946093724841030' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/3717946093724841030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/3717946093724841030'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/06/life-at-google.html' title='Life at Google'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-2520950564588619238</id><published>2007-06-11T04:08:00.000-04:00</published><updated>2007-06-11T04:49:58.618-04:00</updated><title type='text'>NYTimes Article on CAPTCHAs</title><content type='html'>The &lt;a href=&quot;http://www.nytimes.com/2007/06/11/technology/11code.html?ref=technology&amp;pagewanted=all&quot;&gt;New York Times&lt;/a&gt; is running an article today on CAPTCHAs. The article really misses some key points. For example, it talks about the CAPTCHAs on YouTube. YouTube&#39;s CAPTCHA is really, really bad. The CAPTCHA is mis-designed, using different colors to attempt to provide security. I can&#39;t imagine solving this as a color blind user, it must be nearly impossible. Most CAPTCHA providers have migrated to using a monochrome CAPTCHA (for example Google, Yahoo and MSN). The way to create a challenging CAPTCHA today is to make segmentation difficult. This can be achieved without causing as much pain for humans.
&lt;p&gt;

Then there&#39;s this Asirra thing. Did anybody from the Times actually try it? Here&#39;s an &lt;b&gt;unscalled&lt;/b&gt; image of what it looks like:

&lt;p&gt;
&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://bp1.blogger.com/_cTHNT2OZ0ok/Rm0HDWZdGJI/AAAAAAAAAB0/YHepiuT2KJ4/s1600-h/Screenshot.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;&quot; src=&quot;http://bp1.blogger.com/_cTHNT2OZ0ok/Rm0HDWZdGJI/AAAAAAAAAB0/YHepiuT2KJ4/s400/Screenshot.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5074720109249763474&quot; /&gt;&lt;/a&gt;

&lt;p&gt;

Now, you can hover over an image for a larger version. But now to solve one of these CAPTCHAs, you&#39;ve got to hover over 12 images, and make a decision on each. Asirra is undeniably cute, but it&#39;s not clear that it&#39;s all that much easier than the current, well designed, CAPTCHAs. The security of Asirra is also unclear. It&#39;d be interesting to see what happens if Asirra is ever put in front of a high value target (something that can be used to send email, host pagerank-gaining links, or host porn/warez). I have a feeling that some spammer would find a way to abuse a botnet and take advantage of some of the design issues in Asirra.</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/2520950564588619238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=2520950564588619238' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/2520950564588619238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/2520950564588619238'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/06/nytimes-article-on-captchas.html' title='NYTimes Article on CAPTCHAs'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp1.blogger.com/_cTHNT2OZ0ok/Rm0HDWZdGJI/AAAAAAAAAB0/YHepiuT2KJ4/s72-c/Screenshot.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-2444028090216491265</id><published>2007-05-23T16:31:00.000-04:00</published><updated>2007-11-09T10:40:42.766-05:00</updated><title type='text'>reCAPTCHA: A new way to fight spam</title><content type='html'>&lt;p&gt;
You&#39;ve probably seen a &lt;a href=&quot;http://recaptcha.net/captcha.html&quot;&gt;CAPTCHA&lt;/a&gt; before. It&#39;s those funky letters you have to enter before you sign up for an account on almost any website. I&#39;m proud to announce a new type of CAPTCHA: &lt;a href=&quot;http://recaptcha.net/&quot;&gt;reCAPTCHA&lt;/a&gt;: (&lt;a href=&quot;http://recaptcha.net/learnmore.html&quot;&gt;click&lt;/a&gt; to see a live demo!).
&lt;/p&gt;

&lt;div&gt;
&lt;a href=&quot;http://recaptcha.net/learnmore.html&quot;&gt;&lt;img src=&quot;http://bp3.blogger.com/_cTHNT2OZ0ok/RlSl1qdzvqI/AAAAAAAAABs/DtXk0sM80CM/s400/recaptcha.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5067857822049615522&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;You might notice that reCAPTCHA has two words. Why? reCAPTCHA is more than a CAPTCHA, it also helps to digitize old books. One of the words in reCAPTCHA is a word that the computer knows what it is, much like a normal CAPTCHA. However, the other word is a word that the computer can&#39;t read. When you solve a reCAPTCHA, we not only check that you are a human, but use the result on the other word to help read the book!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.cs.cmu.edu/~biglou/&quot;&gt;Luis von Ahn&lt;/a&gt; and myself estimated that about 60 million CAPTCHAs are solved every day. Assuming that each CAPTCHA takes 10 seconds to solve, this is over 160,000 human hours per day (that&#39;s about 19 &lt;i&gt;years&lt;/i&gt;). Harnessing even a fraction of this time for reading books will greatly help efforts in digitalizing books.&lt;/p&gt;

&lt;p&gt;reCAPTCHA provides an easy to use &lt;a href=&quot;http://recaptcha.net/apidocs/captcha/&quot;&gt;API&lt;/a&gt; for putting CAPTCHAs on your site. Installing is as easy as adding a few lines of code to your HTML and then making a HTTP POST request to our servers to verify the solution. We also wrote plugins for &lt;a href=&quot;http://recaptcha.net/plugins/wordpress/&quot;&gt;WordPress&lt;/a&gt;, &lt;a href=&quot;http://recaptcha.net/plugins/mediawiki/&quot;&gt;MediaWiki&lt;/a&gt;, and &lt;a href=&quot;http://recaptcha.net/plugins/phpbb/&quot;&gt;phpBB&lt;/a&gt; to make it very easy to integrate.&lt;/p&gt;

&lt;p&gt;One other interesting service reCAPTCHA provides is a way to securely obfuscate emails. Many sites display emails like bmaurer [at] foo [dot] com or use hacks with tables, javascript or encodings to get the same effect. Spammers are getting smarter and figuring out these tricks. Spammers are especially diligent at working around the strategies of well known open source software. Consider this warning on bugzilla.mozilla.org:&lt;/p&gt;

&lt;blockquote&gt;Although steps are taken to hide addresses from email harvesters, the spammers are continually getting better technology and it is almost guaranteed that the address you use with Bugzilla will get spam.&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://mailhide.recaptcha.net/&quot;&gt;reCAPTCHA Mailhide&lt;/a&gt; provides a scalable solution to email obfuscation that can be widely deployed without being breakable. Mailhide provides a way to encrypt a user&#39;s email with a key only reCAPTCHA knows. reCAPTCHA will only display the email address when the user solves a CAPTCHA. With reCAPTCHA, I can display my email address as bmau&lt;a href=&quot;http://mailhide.recaptcha.net/d?k=01Atc0uJ8RW6_JzUsp12LmzA==&amp;amp;c=YAKdZX9OtFrZA2IkuUKlsqLExAvjy_6nQ7wujtZIdYE=&quot; onclick=&quot;window.open(&#39;http://mailhide.recaptcha.net/d?k=01Atc0uJ8RW6_JzUsp12LmzA==&amp;amp;c=YAKdZX9OtFrZA2IkuUKlsqLExAvjy_6nQ7wujtZIdYE=&#39;, &#39;&#39;, &#39;toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300&#39;); return false;&quot; title=&quot;Reveal this e-mail address&quot;&gt;...&lt;/a&gt;@andrew.cmu.edu. If you click on the three dots and solve a CAPTCHA, you can see my address. Mailhide provides a way for individual users to encode their email address as well as an API for services (like Bugzilla) to share an encryption key with reCAPTCHA.&lt;/p&gt;

&lt;p&gt;If you&#39;re suffering problems with spam, take a look at &lt;a href=&quot;http://recaptcha.net/&quot;&gt;reCAPTCHA&lt;/a&gt;. Not only can you solve your problems with spam, you can help preserve mankind&#39;s written history into the digital age!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/2444028090216491265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=2444028090216491265' title='74 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/2444028090216491265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/2444028090216491265'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/05/recaptcha-new-way-to-fight-spam.html' title='reCAPTCHA: A new way to fight spam'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_cTHNT2OZ0ok/RlSl1qdzvqI/AAAAAAAAABs/DtXk0sM80CM/s72-c/recaptcha.png" height="72" width="72"/><thr:total>74</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-262715839841602700</id><published>2007-05-14T15:30:00.000-04:00</published><updated>2007-05-14T16:04:09.818-04:00</updated><title type='text'>LD_LIBRARY_PATH empty entries</title><content type='html'>&lt;p&gt;Many of us developers have a bashrc that has lines like:

&lt;p&gt;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/install/lib

&lt;p&gt;I&#39;ve always known that this isn&#39;t perfect, that one should check $LD_LIBRARY_PATH isn&#39;t empty, but had always thought it was just a minor point. It turns out that the loader sees an empty entry as meaning the current working directory. This means that it looks there for libraries.

&lt;p&gt;The reason I noticed this is because I was using sshfs to mount something on my workstation in Pittsburgh from my laptop in California. When I ran any command (for example &quot;ls&quot;), the loader would look for tons of libraries. Each one of these libraries, it&#39;d execute a stat for. A round trip between Pittsburgh and California is 90ms... so you can imagine everything was quite slow.

&lt;p&gt;Of course, there are security implications too. I&#39;m not that worried about a rogue directory on my laptop, but on shared systems (such as some of the university ones), I can imagine this being a risk.</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/262715839841602700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=262715839841602700' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/262715839841602700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/262715839841602700'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/05/ldlibrarypath-empty-entries.html' title='LD_LIBRARY_PATH empty entries'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-9039502811720657316</id><published>2007-05-09T01:36:00.000-04:00</published><updated>2007-05-09T01:39:14.448-04:00</updated><title type='text'>In the Bay Area...</title><content type='html'>Starting this Saturday I&#39;ll be in the Bay Area, specifically Mountain View, for my internship at &lt;a href=&quot;http://google.com&quot;&gt;Google&lt;/a&gt;. While there, I&#39;ll be working on &lt;a href=&quot;http://calendar.google.com/&quot;&gt;Google Calendar&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/9039502811720657316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=9039502811720657316' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/9039502811720657316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/9039502811720657316'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/05/in-bay-area.html' title='In the Bay Area...'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-6165596249579972742</id><published>2007-04-05T15:33:00.000-04:00</published><updated>2007-04-05T15:45:46.848-04:00</updated><title type='text'>A new spam technique</title><content type='html'>A spammer got very clever in terms of ways to make money&lt;p&gt;

&lt;/p&gt;&lt;blockquote&gt;
Subject: Search on Google raise money for charity

Dooniz is now affiliated with Google. That will permit to redistribute a part of the money made on Internet to charity foundations. Internet users
can make a difference by search Google using Dooniz.com. A simple click can help children in difficulty or bring more money to cancer or climatic
changes researches&lt;/blockquote&gt;

&lt;p&gt;This person basically created a homepage with loads of affiliate links, and claims that it helps charity (the site says 75% goes to charity. Yeah, right). Primarily, Google is advertised (using the site specific search stuff that AdSense provides). People get convinced they are helping charity when very little of the money, if any, will actually go that, make it their homepage, the dude profits.&lt;/p&gt;

&lt;p&gt;Hopefully, Google will prevent the guy from cashing in on spamming...&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/6165596249579972742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=6165596249579972742' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6165596249579972742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6165596249579972742'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/04/new-spam-technique.html' title='A new spam technique'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-4023485939072632743</id><published>2007-03-30T11:22:00.000-04:00</published><updated>2007-03-30T11:28:10.182-04:00</updated><title type='text'>Google Job Ads</title><content type='html'>&lt;p&gt;Google likes to advertise job positions with Adwords. I was searching for something about the HTTP protocol and encountered this Google ad:&lt;/p&gt;
&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://bp3.blogger.com/_cTHNT2OZ0ok/Rg0rsxppuXI/AAAAAAAAABg/W_FrJS93xtY/s1600-h/googlehttp.png&quot;&gt;&lt;img style=&quot;cursor: pointer;&quot; src=&quot;http://bp3.blogger.com/_cTHNT2OZ0ok/Rg0rsxppuXI/AAAAAAAAABg/W_FrJS93xtY/s400/googlehttp.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5047738805594470770&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;p&gt;Nice to see a sense of humor in the ad&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/4023485939072632743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=4023485939072632743' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4023485939072632743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4023485939072632743'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/03/google-job-ads.html' title='Google Job Ads'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_cTHNT2OZ0ok/Rg0rsxppuXI/AAAAAAAAABg/W_FrJS93xtY/s72-c/googlehttp.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-952738422682426265</id><published>2007-03-02T17:05:00.000-05:00</published><updated>2007-03-02T17:11:51.006-05:00</updated><title type='text'>Gnomefiles needs love</title><content type='html'>Eugenia Loli-Queru sent me a quick note today that &lt;a href=&quot;http://gnomefiles.org/&quot;&gt;GNOMEfiles&lt;/a&gt; is in need of an owner. The site gets 25,000 pages daily on average. This seems like a pretty important resource for the GNOME community, something worth keeping.</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/952738422682426265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=952738422682426265' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/952738422682426265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/952738422682426265'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/03/gnomefiles-needs-love.html' title='Gnomefiles needs love'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-5776006929521231423</id><published>2007-02-28T22:44:00.000-05:00</published><updated>2007-03-01T01:02:53.045-05:00</updated><title type='text'>Google&#39;s CAPTCHA Broken?</title><content type='html'>A few months ago, I found a nice trick that let me read comments on my blog without polling for them. GData allows you to get a ATOM feed of comments on your blog. For example mine is:
&lt;a href=&quot;http://bmaurer.blogspot.com/feeds/comments/default&quot;&gt;http://bmaurer.blogspot.com/feeds/comments/default&lt;/a&gt;
I put this in to &lt;a href=&quot;http://reader.google.com/&quot;&gt;Google Reader&lt;/a&gt; and blog comments show up just like any other type of blog entry.

Recently, I&#39;ve noticed that, from time to time, I am getting spam comments. However, Google uses a &lt;a href=&quot;http://en.wikipedia.org/wiki/Captcha&quot;&gt;CAPTCHA&lt;/a&gt; to protect it&#39;s comments. This means one of two things:
&lt;ol&gt;&lt;li&gt;Google&#39;s CAPTCHAs have been broken&lt;/li&gt;&lt;li&gt;Some spammers are willing to hire humans to break CAPTCHAs&lt;/li&gt;&lt;/ol&gt;The rate at which spammers post is very small, maybe one or two comments per month. I think this might support a theory that spammers are using humans (if they were using computers, I think it&#39;d be easier to post on the blogs more often). However, Google may be using anti-spam filters in addition to the CAPTCHA (this would be easy enough for somebody to verify, just copy and paste some blatent spam in to blogger, and solve the CAPTCHAs). To be honest, I don&#39;t think blog spam would make enough of a profit to justify humans. Google is using the nofollow tag, so the links don&#39;t get any PageRank. I bet that spammers are able to break Google&#39;s CAPTCHA with a &lt;1% href=&quot;http://www.ceas.cc/papers-2005/160.pdf&quot;&gt;this paper from Microsoft Research on the importance of segmentation in CAPTCHAs).</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/5776006929521231423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=5776006929521231423' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/5776006929521231423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/5776006929521231423'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/02/googles-captcha-broken.html' title='Google&#39;s CAPTCHA Broken?'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-7456521631167978875</id><published>2007-02-28T14:04:00.000-05:00</published><updated>2007-02-28T14:17:50.862-05:00</updated><title type='text'>CMU dorm policy: Nerds gone wild?</title><content type='html'>Recently    Carnegie Mellon announced that it was going to test out a gender neutral housing program next semester. It&#39;s hard to see how this can be all that shocking (most university housing is co-ed by room). Of course, there&#39;s always somebody with an &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;ridiculous&lt;/span&gt; point of view:
&lt;blockquote&gt;Unfair or not, my fear is that nerdy kids at Carnegie Mellon might put aside writing computer language for the space program and attempt to brush up their knowledge of biology in the privacy of their own dormitories. This is wrong. Nerds should not be having love affairs with other nerds. There is always the danger that in the throes of nerd passion, their thick glasses will collide or else they will drop heavy laptops onto vulnerable body parts. [&lt;a href=&quot;http://www.post-gazette.com/pg/07059/765461-154.stm&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;CMU&lt;/span&gt; Dorm Policy: Nerds gone wild?&lt;/a&gt;]&lt;/blockquote&gt;I&#39;m glad to hear that some folks think of students at &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;CMU&lt;/span&gt; as nerds who need to be protected from distractions such as members of the opposite sex.</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/7456521631167978875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=7456521631167978875' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7456521631167978875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7456521631167978875'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/02/cmu-dorm-policy-nerds-gone-wild.html' title='CMU dorm policy: Nerds gone wild?'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-7599783471126824693</id><published>2007-02-07T12:05:00.000-05:00</published><updated>2007-02-07T12:05:49.894-05:00</updated><title type='text'>Big Media DMCA Notices: Guilty until proven innocent</title><content type='html'>&lt;p&gt;
It&#39;s no secret that media companies have started to hire companies such as &lt;a href=&quot;http://www.baytsp.com/&quot;&gt;BayTSP&lt;/a&gt; to automatically find file sharers and send letters to their ISPs. The goal of this is to use fear to persuade people to use legal methods of getting digital content.
&lt;/p&gt;

&lt;p&gt;
Many ISP&#39;s, especially universities, trust the good faith of these companies and will automatically deactivate the Internet connection of those who they get notifications for. As a personal project, and with the help of Carnegie Mellon&#39;s Information Security Office (which employs me to work on various computing security tasks), I decided to investigate the reliability of notices from companies such as BayTSP. The answer: the companies do not actually gather the data they claim to. Their standards for sending DMCA notices are very low.
&lt;/p&gt;

&lt;p&gt;In order to understand the issues, it&#39;s first necessary to have a basic understanding of BitTorrent. In order to download something via BitTorrent you download a &quot;.torrent&quot; file from any number of sites that index the content. This file contains a fingerprint for every piece of the file that you are attempting to download. It also contains a reference to a tracker. This tracker is the way that peers (the people downloading the content) find each other. After contacting the tracker, you contact each of the potential peers that the tracker shares with you (and other peers may contact you). The client then begins swapping parts of the file with each of the peers. What the media companies object to is that in the process of downloading the file, your client will offer parts of their copyrighted content to other users -- a violation of copyright law. In order to catch these violations, BayTSP advertises fake clients to the Bittorrent tracker and uses the list of peers which it gets back to find violations&lt;/p&gt;

&lt;p&gt;
For my investigation, I wrote a very simple BitTorrent client. My client sent a request to the tracker, and generally acted like a normal Bittorrent client &lt;i&gt;up to sharing files&lt;/i&gt;. The client refused to accept downloads of, or upload copyrighted content. It obeyed the law.&lt;/p&gt;

&lt;p&gt;I placed this client on a number of torrent files that I suspected were monitored by BayTSP (For my own protection I don&#39;t want to identify the torrents used for this research. I used the fact that NBC is a client of BayTSP to find trackers. If you want to check if BayTSP is monitoring a torrent, look for IPs coming from ranges in &lt;a href=&quot;http://test.blocklist.org/&quot;&gt;test.blocklist.org&lt;/a&gt;). Because the university&#39;s information security office is very diligent about processing DMCA notices, I would be able to tell if the BayTSP folks sent notices based on this. With just this, completely legal, BitTorrent client, I was able to get notices from BayTSP.&lt;/p&gt;

&lt;p&gt;To put this in to perspective, if BayTSP were trying to bust me for doing drugs, it&#39;d be like getting arrested because I was hanging out with some dealers, but they never saw me using, buying, or selling any drugs.&lt;/p&gt;

&lt;p&gt;The fact that BayTSP does not confirm that the client it is accusing actually uploads illegal content could cause false identification of innocent users. BitTorrent trackers work via a standard HTTP request request, for example:&lt;/p&gt;

&lt;pre&gt;
GET /announce?info_hash=579CC43E4D66D35AE22312985EA04275939AB477&amp;peer_id=asdfasdfadfasdf&amp;amp;port=12434&amp;compact=1
&lt;/pre&gt;

&lt;p&gt;One easy way to make somebody look likea bittorrenter would be to get them to go to a website with the code &amp;lt;img src=&quot;http://tracker.com:12345/announce?info_hash=579CC43E4D66D35AE22312985EA04275939AB477&amp;peer_id=asdfasdfadfasdf&amp;amp;amp;amp;amp;port=12434&amp;amp;compact=1&quot; /&gt;. They&#39;d be on the tracker, and &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;BayTSP&lt;/span&gt; would see their &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;IP&lt;/span&gt; address, and might send them an infringement notice. &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;BayTSP&lt;/span&gt; might check that they are listening on the port they advertise (maybe even check for a &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;BitTorrent&lt;/span&gt; handshake). If the user is using &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;bittorrent&lt;/span&gt; for legal usages, you could just advertise a port they were listening on. More investigation is needed into exactly what triggers the notice.&lt;/p&gt;

&lt;p&gt;One even easier trick you can use: the &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;BitTorrent&lt;/span&gt; clients &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;BayTSP&lt;/span&gt; uses support Peer Exchange. You can give them the name of another peer for them to rat out to the &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;ISP&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;At the end of the day, &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;BayTSP&lt;/span&gt; (and probably other similar companies) are sending &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;DMCA&lt;/span&gt; notices which claim that they detected a user uploading and downloading copyrighted files. This is a lie. They didn&#39;t catch the user in the act of downloading. A lying tracker, a peer using peer exchange, hostile web page, or buggy &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;BitTorrent&lt;/span&gt; client could all result in a false &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;DMCA&lt;/span&gt; notice.&lt;/p&gt;

&lt;p&gt;If your &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_12&quot;&gt;ISP&lt;/span&gt; forwards a &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_13&quot;&gt;DMCA&lt;/span&gt; notice from these guys, point them here. This research suggests that they have no evidence of wrong-doing. If &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_14&quot;&gt;ISPs&lt;/span&gt; learn that the folks sending them &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_15&quot;&gt;DMCA&lt;/span&gt; notices are not being completely honest, they may be willing to reconsider their position about how they respond to the notices. The people I work with at Carnegie Mellon seemed willing to reevaluate their policies given this evidence. I believe that &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_16&quot;&gt;ISPs&lt;/span&gt; should require that any peer-to-peer related &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_17&quot;&gt;DMCA&lt;/span&gt; notice include a statement regarding exactly what evidence of sharing was found. Ideally, the notice should contain evidence that could be corroborated with log files (for example, &quot;we found that the client at 123.1.2.3 uploaded 1 MB of file X to 4.3.2.1&quot;. The &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_18&quot;&gt;ISP&lt;/span&gt; may be able to check that there was 1 MB of traffic between these two clients).&lt;/p&gt;

&lt;p&gt;A piece of good news for anybody who has gotten a &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_19&quot;&gt;bittorrent&lt;/span&gt; related notice from &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_20&quot;&gt;BayTSP&lt;/span&gt;: it doesn&#39;t seem like a studio could do much in terms of court action with the evidence &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_21&quot;&gt;BayTSP&lt;/span&gt; gives them.&lt;/p&gt;

&lt;p&gt;For the technically minded, I though I&#39;d share some observations of the behavior of &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_22&quot;&gt;BayTSP&#39;s&lt;/span&gt; clients&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_23&quot;&gt;BayTSP&#39;s&lt;/span&gt; clients don&#39;t don&#39;t accept incoming connections, only send outgoing ones. I wonder what exactly this is for.&lt;/li&gt;
&lt;li&gt;Some of the &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_24&quot;&gt;BayTSP&lt;/span&gt; clients claim to be using &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_25&quot;&gt;Azureus&lt;/span&gt; (and support &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_26&quot;&gt;Azureus&lt;/span&gt; extensions), while others run &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_27&quot;&gt;libtorrent&lt;/span&gt;. I&#39;m not sure why they are doing this&lt;/li&gt;
&lt;li&gt;When &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_28&quot;&gt;BayTSP&#39;s&lt;/span&gt; clients connect to a &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_29&quot;&gt;BT&lt;/span&gt; user, they claim to not have downloaded any of the file, but refuse uploads. Not only does this behavior not make any sense for an actual user, but it seems like &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_30&quot;&gt;BayTSP&lt;/span&gt; would want to accept data, which might
provide proof of infringement.&lt;/li&gt;
&lt;li&gt;Some of the &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_31&quot;&gt;IP&lt;/span&gt; ranges I noticed coming from &lt;span onclick=&quot;BLOG_clickHandler(this)&quot; class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_32&quot;&gt;BayTSP&lt;/span&gt; were: 154.37.66.xx, 63.216.76.xx, 216.133.221.xx. Sometimes, they make themselves really obvious on the tracker. For example, 154.37.66.xx and 63.216.76.xx will send 10 clients to the same tracker all claiming to listen on port 12320. Maybe trackers should block these folks&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/7599783471126824693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=7599783471126824693' title='27 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7599783471126824693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7599783471126824693'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/02/big-media-dmca-notices-guilty-until.html' title='Big Media DMCA Notices: Guilty until proven innocent'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-4133542235020915610</id><published>2007-01-18T16:23:00.000-05:00</published><updated>2007-01-18T16:28:06.146-05:00</updated><title type='text'>Interning at Google Again</title><content type='html'>&lt;p&gt;This summer, I&#39;m going to do another internship at Google. I&#39;ll be working on Google Calendar.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/4133542235020915610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=4133542235020915610' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4133542235020915610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4133542235020915610'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/01/interning-at-google-again.html' title='Interning at Google Again'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-4222791521946060764</id><published>2007-01-01T15:02:00.000-05:00</published><updated>2007-01-01T15:13:41.674-05:00</updated><title type='text'>Beware random CAPTCHAs found on slashdot</title><content type='html'>&lt;a href=&quot;http://www.omgili.com/captcha.php&quot;&gt;This&lt;/a&gt; CAPTCHA, found on slashdot is pretty silly. First, the HTML doesn&#39;t &lt;i&gt;really&lt;/i&gt; provide that much security. It wouldn&#39;t be that hard to script Gecko to render the thing. Worse, it has a very insecure implementation:

&lt;pre&gt;
if (isset($_POST[&#39;hash&#39;]) &amp;&amp; isset($_POST[&#39;CaptchaStr&#39;]) ) 

{

 if($captcha-&gt;validate_submit($_POST[&#39;hash&#39;],$_POST[&#39;CaptchaStr&#39;]))

  $Message = &quot;Correct.&quot;;

 else

  $Message = &quot;Incorrent.&quot;;

}

  function check_captcha($correct_hash,$attempt)

  {

   // when check, destroy picture on disk

   if(file_exists($this-&gt;get_filename($correct_hash)))

   {

    $res = @unlink($this-&gt;get_filename($correct_hash)) ? &#39;TRUE&#39; : &#39;FALSE&#39;;

    if($this-&gt;debug) echo &quot;\n&lt;br&gt;-Captcha-Debug: Delete image (&quot;.$this-&gt;get_filename($correct_hash).&quot;) returns: ($res)&quot;;

   }

   $res = (md5($attempt)===$correct_hash) ? &#39;TRUE&#39; : &#39;FALSE&#39;;

   if($this-&gt;debug) echo &quot;\n&lt;br&gt;-Captcha-Debug: Comparing public with private key returns: ($res)&quot;;

   return $res == &#39;TRUE&#39; ? TRUE : FALSE;

  }
  /** @private **/

  function get_filename($public=&#39;&#39;)

  {

   if($public==&#39;&#39;) $public=$this-&gt;public_key;

   return $this-&gt;tempfolder.$this-&gt;filename_prefix.$public.&#39;.jpg&#39;;

  }
&lt;/pre&gt;

&lt;p&gt;So, here are a few bad things you can do&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If your OCR can read 1/2 the chars on the page, the md5sum lets you crack the others. Really quickly&lt;/li&gt;
&lt;li&gt;Forget OCR. It doesn&#39;t check that the server itself generated the hashes. Hash &quot;apple&quot; then submit the hash and the word &quot;apple&quot;.&lt;/li&gt;
&lt;li&gt;There are no checks for duplicates. You can solve one captcha and submit it 1000000 times.&lt;/li&gt;
&lt;li&gt;You can delete any jpeg file on the website, due to the non-checking of the hash for the word   &quot;..&quot;&lt;/li&gt;
&lt;li&gt;You can fill up the dude&#39;s disk by requesting lots of captchas but not solving them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don&#39;t trust this kind of script!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/4222791521946060764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=4222791521946060764' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4222791521946060764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4222791521946060764'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/01/beware-random-captchas-found-on.html' title='Beware random CAPTCHAs found on slashdot'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-4620413054890881004</id><published>2007-01-01T14:15:00.001-05:00</published><updated>2007-01-01T14:38:12.177-05:00</updated><title type='text'>Posting Zero-Day Scripting Exploits</title><content type='html'>&lt;p&gt;It&#39;s really sad to see people posting zero day exploits for large applications, such as &lt;a href=&quot;http://cyber-knowledge.net/blog/2007/01/01/gmail-vulnerable-to-contact-list-hijacking/&quot;&gt;this&lt;/a&gt; GMail exploit. First, it&#39;s not clear what this guy&#39;s motives are. Maybe he wants to get slashdotted so that the ads on his page will get clicked due to the massive number of visitors. He might also want to get a bit of fame, which is easier to do if you post a zero-day issue and then get it slashdotted.&lt;/p&gt;

&lt;p&gt;Maybe he just wants the security issue fixed as fast as possible, and having notified the Google security folks is unsatisfied with their response time. If that&#39;s the case, I think he was very irresponsible in the posting of the exploit. First, it&#39;s new year&#39;s day. That means response time from &lt;i&gt;any&lt;/i&gt; website is going to be slow. Thus, it will take longer to get something pushed out. Why not publish something like this on a weekday, when people are at work? The issue will be fixed faster, and slashdot traffic will be higher (more ad clicks, more fame!).&lt;/p&gt;

&lt;p&gt;It&#39;s also worth noting how dangerous such zero-day issues are. Spammers could do quite a bit of damage in a short amount of time (even if it was open for an hour or two). Spammers likely have (or will acquire) pages that get a fair number of clicks (domain landing pages and porn sites are likely good candidates for this). A zero day exploit could easily let them gather some great data for spamming (Imagine being able to send out an email to somebody from one of the people on their contact list, including the full name of the person! It&#39;s a spammer&#39;s dream come true).&lt;/p&gt;

&lt;p&gt;With all that said, I think the use of JSON for things like sending contact lists is becoming a large danger. I&#39;ve found and reported similar issues to Google and Facebook in the last month. I bet lots of web 2.0 sites have the exact same issue. There are two easy and secure ways to fix the issue&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use a secret token. For example, make the url something like google.com/contacts?tok=asdfasdfasdfasdf. Make the tok a per-user string (like a HMAC of their username). If the tok isn&#39;t correct, deny the request&lt;/li&gt;
&lt;li&gt;Rely on XmlHttpRequest. Insert the following code at the top of the JS document &quot;while (1);&quot;. Using XmlHttpRequest, download the code, and remove the token. People trying to use a script tag to include the document won&#39;t be able to do so.&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/4620413054890881004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=4620413054890881004' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4620413054890881004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/4620413054890881004'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2007/01/posting-zero-day-scripting-exploits.html' title='Posting Zero-Day Scripting Exploits'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-6079441138324539004</id><published>2006-12-04T17:32:00.000-05:00</published><updated>2006-12-04T17:35:01.417-05:00</updated><title type='text'>Performance Tip of the Day: Script Tags are Blocking</title><content type='html'>&lt;p&gt;Today I downloaded the fantastic &lt;a href=&quot;http://getfirebug.com&quot;&gt;firebug&lt;/a&gt; extension. It has a mode where it shows network activity:&lt;/p&gt;

&lt;img src=&quot;http://getfirebug.com/net.gif&quot;&gt;

&lt;p&gt;I learned that if you have a JavaScript file, the browser will block rendering of the page until the request is done. I saved about 100ms on a few sites I run by moving the Google Analytics tracker to the bottom of the page (not sure why it wasn&#39;t being cached, probably because I am on an SSL site).&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/6079441138324539004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=6079441138324539004' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6079441138324539004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6079441138324539004'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2006/12/performance-tip-of-day-script-tags-are.html' title='Performance Tip of the Day: Script Tags are Blocking'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-5318677228371007021</id><published>2006-11-28T13:12:00.000-05:00</published><updated>2006-11-28T13:21:00.726-05:00</updated><title type='text'>Posting sensitive data in JSON</title><content type='html'>&lt;p&gt;If you are using JSON in AJAX, make sure not to put sensitive data in the JSON feed. Because script tags don&#39;t follow the same-origin policy, it&#39;s possible to include a script from third party sites.&lt;/p&gt;

&lt;p&gt;Google&#39;s GData-JSON feeds (which I &lt;a href=&quot;bmaurer.blogspot.com/2006/11/using-gcal-json-to-make-freebusy.html&quot;&gt;blogged&lt;/a&gt; about earlier) had just such an issue. Google allowed you to request a URL such as http://www.google.com/calendar/feeds/default/private/basic?alt=json-in-script. If you use Google calendar, take a look at that feed with the alt= part taken off. It likely has your email address, your full name, and possibly some sensitive events in it. Any site you visited could have requested that URL and scraped the data. Note that with more advanced techniques, it&#39;s possible to get data that doesn&#39;t use the callback, ie, array literals. See &lt;a href=&quot;http://jeremiahgrossman.blogspot.com/2006/01/advanced-web-attack-techniques-using.html&quot;&gt; Jeremiah Grossman&#39;s blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Luckily, this was fixed relatively quickly after I reported it.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/5318677228371007021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=5318677228371007021' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/5318677228371007021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/5318677228371007021'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2006/11/posting-sensitive-data-in-json.html' title='Posting sensitive data in JSON'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-6087361734589609335</id><published>2006-11-25T13:27:00.000-05:00</published><updated>2006-11-25T13:43:52.295-05:00</updated><title type='text'>DomBuilder + Functional Programming == Awesome</title><content type='html'>&lt;p&gt;The DOM sucks. It&#39;s so so slow to type document.createElement and document.createTextNode. One nice solution for this is &lt;a href=&quot;http://svn.vivabit.net/external/codedump/javascript/DomBuilder/&quot;&gt;DomBuilder&lt;/a&gt; which allows you to say:&lt;/p&gt;

&lt;pre&gt;
document.body.appendChild(
 DIV({ id : &quot;el_&quot; + times, &#39;onclick&#39; : &#39;alert(&quot;sdsdsd&quot;)&#39;}, 
  STRONG({ &#39;class&#39; : &#39;test&#39; },&quot;Lovely&quot;), &quot; nodes! #&quot; + times
 )
);
&lt;/pre&gt;

&lt;p&gt;When using the DomBuilder in a project of mine, I found that it couldn&#39;t handle data very well. I had a list of items, and I wanted to make a table. There&#39;s no easy way to do that with DOMBuilder.&lt;/p&gt;

&lt;p&gt;However, a bit of functional programming can save the day. Using Prototype, and adding the following line of code to tagFunc gets lots of millage:&lt;/p&gt;

&lt;pre&gt;
arguments = $A(arguments).flatten ().compact ();
&lt;/pre&gt;

&lt;p&gt;What is this doing? First, we turn arguments into an array so that we can handle it cleanly. Then we flatten any arrays (turn [a,[b,c]] into [a, b, c]) and then compact any null entries ([a,null,b,c] into [a,b,c]). What&#39;s the win? Now this library can handle data very elegantly:&lt;/p&gt;

&lt;pre&gt;
var stocks = [{ name : &quot;NOVL&quot;, price : 6.28 }, { name : &quot;GOOG&quot;, price : 505.00 }];
document.body.appendChild($table (
   $tr ($th (&quot;Name&quot;), $th (&quot;Price&quot;)),
   stocks.map (function (stock) {
       return $tr ($td (stock.name), $td (stock.price.toString ()));
   })
));
&lt;/pre&gt;

&lt;p&gt;Note the use of map to handle each of the stocks. Without the flatten, this would not have worked. It&#39;s pretty easy to build up HTML from data like this very elegantly.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/6087361734589609335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=6087361734589609335' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6087361734589609335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/6087361734589609335'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2006/11/dombuilder-functional-programming.html' title='DomBuilder + Functional Programming == Awesome'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-8778705241295940673</id><published>2006-11-22T23:44:00.000-05:00</published><updated>2006-11-22T23:54:55.680-05:00</updated><title type='text'>Using GCal JSON to make a free/busy schedule</title><content type='html'>&lt;p&gt;Lately, I seem to be getting lots of emails of the form &quot;When are you free this week, I&#39;d like to meet with you sometime&quot;. Each time I get this email, I have to go to my calendar, copy my appointments for the next week, and send it in a reply.&lt;/p&gt;

&lt;p&gt;In an ideal world, I could just paste a link to my calendar in iCal format. Sadly, not enough people use a calendaring client for this to be reliable (and worse off, many of the people I interact with use the horror that is Oracle Calendar, which doesn&#39;t really handle external ical).&lt;/p&gt;

&lt;p&gt;This week, Google added JSON output to their Google Calendar feeds. This allows me to make a pure-javascript solution to this problem. I created a bit of Javascript code (&lt;a href=&quot;http://www.contrib.andrew.cmu.edu/~bmaurer/freev1.html&quot;&gt;here&lt;/a&gt;) which loads my calendar in JSON format and tells the other person when I&#39;m busy&lt;/p&gt;

&lt;p&gt;It&#39;s nice to be able to only show a free-busy projection of my calendar (I don&#39;t want the world to know who I&#39;m meeting with, where I am, etc at every moment. I also use the calendar as a place to dump event related date, for example, airline confirmation numbers). I also like that I only have to host a small static html page to do this. No figuring out where to put a PHP script, no SQL, just a bit of javascript&lt;/p&gt;

&lt;p&gt;TODO:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handle multi-day events&lt;/li&gt;
&lt;li&gt;Better date formatting (use day of week, month names, etc)&lt;/li&gt;
&lt;li&gt;Combine events (If I&#39;m busy from 10:30-11:30 and 11:30-12:30, I can just be busy between 10:30 and 12:30)&lt;/li&gt;
&lt;li&gt;Not depend on prototype (or only take what I need)&lt;/li&gt;
&lt;li&gt;Make it pretty&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/8778705241295940673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=8778705241295940673' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/8778705241295940673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/8778705241295940673'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2006/11/using-gcal-json-to-make-freebusy.html' title='Using GCal JSON to make a free/busy schedule'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-3131017942215111445</id><published>2006-11-13T16:10:00.000-05:00</published><updated>2006-11-13T16:14:56.430-05:00</updated><title type='text'>Now that javac is open source...</title><content type='html'>&lt;p&gt;Maybe somebody (me?) can &lt;b&gt;finally&lt;/b&gt; make a patch for this issue:&lt;/p&gt;

&lt;pre&gt;
[bmaurer@omega ~]$ cat x.java
public class x {
        public static void main (String[] args) {
                System.out.println (&quot;hello world&quot;);
        }
}
[bmaurer@omega ~]$ time javac x.java

real    0m0.766s
user    0m0.604s
sys     0m0.040s
&lt;/pre&gt;

&lt;p&gt;For the record, mcs has a time of:&lt;/p&gt;

&lt;pre&gt;
[bmaurer@omega ~]$ time mcs x.cs

real    0m0.483s
user    0m0.440s
sys     0m0.024s
&lt;/pre&gt;

&lt;p&gt;But Java is using a form of Ahead of Time compilation (they call it class file sharing or something) while my MCS is not.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/3131017942215111445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=3131017942215111445' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/3131017942215111445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/3131017942215111445'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2006/11/now-that-javac-is-open-source.html' title='Now that javac is open source...'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-14650593.post-7212331201721997230</id><published>2006-11-01T22:14:00.000-05:00</published><updated>2006-11-01T22:20:07.863-05:00</updated><title type='text'>Don&#39;t echo back plain text passwords</title><content type='html'>&lt;p&gt;Today I found two nice little security issues on an e-commerce site I use. First, the site has a page that allows you to change passwords. The code on the page is of the form &amp;lt;input type=&quot;password&quot; name=&quot;password&quot; value=&quot;MY PASSWORD IN PLAIN TEXT&quot;&amp;gt;. Secondly, the site had some Cross Site Scripting issues. At the end of the day, it was drop-dead easy to phish for people&#39;s passwords. Yikes.
&lt;/p&gt;

&lt;p&gt;
Never, ever, ever echo sensitive data back to the user. It makes an XSS attack really damaging (and is also bad if somebody leaves their computer unlocked).
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://bmaurer.blogspot.com/feeds/7212331201721997230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=14650593&amp;postID=7212331201721997230' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7212331201721997230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/14650593/posts/default/7212331201721997230'/><link rel='alternate' type='text/html' href='http://bmaurer.blogspot.com/2006/11/dont-echo-back-plain-text-passwords.html' title='Don&#39;t echo back plain text passwords'/><author><name>Ben Maurer</name><uri>http://www.blogger.com/profile/00743319148021355050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry></feed>