By brute-forcing a full dictionary attack on a site? Seems a little too invasive, can be seen as a hack attempt (especially since your dictionary contains admin type folders etc) and/or a denial of service attack - and at the very least can cost a user real money depending on their hosting setup.<p>Anyhow - besides not liking the <i>point</i> of this - good code, but the same can be accomplished with a oneliner:<p><pre><code> grep -v '^#' dictionary | grep -v '^$' | xargs -I DICTIONARYITEM curl -o /dev/null -w "%{url_effective} returned %{http_code}\n" -s http://domain.com/DICTIONARYITEM</code></pre>