WP Blog Network Admins - Quickly Find Old WP Installs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PornDiscounts-V
    Confirmed User
    • Oct 2003
    • 5744

    #1

    WP Blog Network Admins - Quickly Find Old WP Installs

    Here is a quick way to find your old WP installs that might be open to cyber attacks.

    Code:
    grep 'wp_version =' */wp-includes/version.php|grep -v '3.5.1'
    Each time the version changes just put the correct one in the end of the command line code.

    Also, you might have to add something to the */wp-includes like */htdocs/wp-includes or */public_html/wp-includes to make up for how your server is handling where your installations are compared to your user directory.
    Last edited by PornDiscounts-V; 02-16-2013, 05:51 PM.
    Blog Posts - Contextual Links - Hardlinks on 600+ Blog Network
    * Handwritten * 180 C Class IPs * Permanent! * Many Niches! * Bulk Discounts! GFYPosts /at/ J2Media.net
  • fris
    Too lazy to set a custom title
    • Aug 2002
    • 55705

    #2
    wp-cli is good for this
    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55705

      #3
      Originally posted by vvvvv
      Here is a quick way to find your old WP installs that might be open to cyber attacks.

      Code:
      grep 'wp_version =' */wp-includes/version.php|grep -v '3.5.1'
      Each time the version changes just put the correct one in the end of the command line code.

      Also, you might have to add something to the */wp-includes like */htdocs/wp-includes or */public_html/wp-includes to make up for how your server is handling where your installations are compared to your user directory.
      you are always assuming 3.5.1 is the latest, which will be needed to changed when updates come out.

      you can do something like this.

      Code:
      #!/bin/bash
      
      YOURS=$(grep 'wp_version[[:space:]]*=' wp-includes/version.php  | head -1 | cut -d\' -f2)
      CURRENT=$(curl -s http://core.svn.wordpress.org/tags/ | awk -F '">' '{print $2}' | awk -F"/<" '{print $1}' | grep "^[0-9].[0-9]" | sort -n | tail -n 1)
      
      if [[ "$YOURS" != "$CURRENT" ]]; then
      	echo "Your Install is out of date, you are running $YOURS, and the current version is $CURRENT";
      else
      	echo "Your install is current at version $YOURS"
      fi
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      Working...