SysAdmin

BASH script for viewing unread GMail

By Glenn Ansley  |  February 22nd, 2011  |  Published in SysAdmin  |  0 Comments

I spend most of my day in BASH lately. When my phone buzzes I know I have new mail but I don’t want to go check it. Placing the following function in your .bash_profile allows you to quickly view unread email and summaries from terminal by typing ‘gmail’ and pressing enter. Thought I would share:

function gmail() {
    curl -u yourgamilusername --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | perl -pe 's/^<title>(.*)<\/title><summary>(.*)<\/summary>.*?<name>(.*?)<\/name>.*$/\n$3\n\t$1\n\t$2/'
}

Help Preventing WordPress Brute Force Attacks

By Glenn Ansley  |  November 30th, 2009  |  Published in News, SysAdmin, WordPress  |  1 Comment

It has recently been reported that WordPress blogs are being attacked by a Brute-Force campaign.

A Brute-Force attack happens when a malicious individual creates an automated script with the sole purpose of guessing your administrative password. It does this by pointing the script at your blog’s login URL: http://yourblogsdomain.com/wp-login.php. The script repeatedly guesses at your login name and password from a dictionary of commonly used usernames and passwords.

Here is an explanation from the post linked above:

The wp_brute_attempt() function takes 3 parameters, $ch which is cURL’s structure (cURL is a command line tools that can be used to perform HTTP requests). The other two parameters define the site and the password that will be tried. If the script logged in successfully, the page that gets returned by the server will contain the phrase “Log Out”, and the function will return a true value.

If you are currently running a WordPress blog and would like to secure your site against these attacks, the easiest thing to do is to simply change your admin username and to make sure you have a strong password in place.

If you would like assistance securing your site against this attack, FullThrottle is available to help. Simply contact us for more details.

SysAdmin, Web Developer PC Setup

By Lew Ayotte  |  July 15th, 2009  |  Published in Development, SysAdmin  |  0 Comments

I just got a new Desktop PC, it’s a DELL 760, with two Dell 2208 WFP monitors. I thought this might be a good opportunity for me to list all the software and packages I install on my machines. I am a Systems Administrator and a Web Developer, so I use a lot of different tools.

Development Tools:

  • XAMPP – An easy to install Apache distribution containing MySQL, PHP and Perl.
  • Notepad++ – A free (as in “free speech” and also as in “free beer”) source code editor and Notepad replacement that supports several languages.
  • Tortoise SVN – Subversion client for Windows.
  • Adobe Web Premium Suite – mostly for Dreamweaver and Photoshop
    • SubWeaver - Tortoise SVN Plugin for Dreamweaver.
  • GIMP – Free GNU image manipulation program (similar to Photoshop).

Browsers:

  • Firefox – 90% of my browsing is done with Firefox.
    • Adblock Plus – Block annoying Ads.
    • Download Statusbar – I like this for my download management.
    • Firebug – Necessary tool for any web developer.
    • Firesizer – Also pretty nice tool to see how your site looks in specific resolutions.
    • Forecastfox – Nice little forecast plugin for FF.
    • Gmail Manager – Best Gmail plugin out there, reports on my 16+ gmail and gmail hosted accounts.
    • IE Tab – Two uses: 1) for sites that only work in IE – but you don’t want to open IE and 2) to test a site in IE.
    • oldbar – I don’t like the big fat URL bar with firefox, this makes it one size with all the benefits of the new bar.
    • SecurePassword Generator – Great tool for generating secure passwords.
    • TwitterFox – Twitter plugin.
    • Ubiquity – Don’t really use this much, but it’s there just in case.
    • User Agent Switcher – Testing iPhone-enabled sites and hacking airport wireless.
    • Xmarks – Bookmark syncing.
    • YammerFox – Yammer plugin.
  • IE – Comes with Windows, barely ever use it for anything except testing.
    • Xmarks – Bookmark syncing.
    • IE7Pro – Use for Ad Blocking.
  • Google Chrome – Browser compatibilty and some productivity uses.
  • Safari – Mostly to test browser compatibility.
  • IETester – For testing browser compatibility in IE6 – IE8

Utilities:

Productivity:

  • VMWare Player – Using for virtual Kubuntu and Mac OS X desktops.
  • VMware Infrastructure Client – Using for Linux and Windows Servers.
  • PuTTY – SSH client for Windows.
  • WinSCP – Easy to use SCP client for Windows; also does SFTP and FTP.
  • Microsoft Office Professional

Unproductivity:

That’s pretty much everything that I install and use on a regular basis. There are some other small utilities, and such, that I have installed for non-business related tasks, so I didn’t include them here.

If you have any questions or comments about what I use, please ask. I’d love to know what you use on a regular basis. So if you have a blog I encourage you to do a similar write-up and let me know about it.