DenyHosts on FreeBSD

On a tip from the news site RootPrompt, I discovered a small security utility called DenyHosts which is for Linux systems to help thwart ssh server attacks. It examines the sshd logs and looks for multiple failed login attempts. It then collects the IP addresses of the offending hosts and writes them out to /etc/hosts.deny […]

URL Scraper Script

Description I wrote the command-line filter to scrape HTML, XML, and plaintext documents for the URLs that they contain. It reads from standard input and gives the results on standard output, one URL per line. The heart of the script is the following regular expression, in Python: url_pattern = re.compile(”'["’]http://[^+]*?[‘"]”’) which basically looks for […]