Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created March 16, 2011 21:07
Show Gist options
  • Save rwaldron/873306 to your computer and use it in GitHub Desktop.
Save rwaldron/873306 to your computer and use it in GitHub Desktop.
#!/bin/sh
# phpinfo-mine
# Finds and retrieves phpinfo() pages from Google results.
#
# Requires WhatWeb and gggooglescan in the current working directory.
#
# It is highly recommended that you change your passwords if your servers'
# passwords appears in this list.
##
# Google Results as at 2011-01-21 #
# 52 results for intitle:"phpinfo()" "mysql.default_password" "Zend Scripting Language Engine"
# 33 results for inurl:"phpinfo.php" intitle:"phpinfo()" "mysql.default_password"
##
# Get target URLs from google #
./gggooglescan 'intitle:"phpinfo()" "mysql.default_password" "Zend Scripting Language Engine"' > input.phpinfo.log
./gggooglescan 'inurl:"phpinfo.php" intitle:"phpinfo()" "mysql.default_password"' >> input.phpinfo.log
##
# Extract Details from URLs #
./whatweb -a 1 -p plugins/phpinfo.rb --log-brief=results.phpinfo.log --input-file=input.phpinfo.log
echo
echo "[*] Results saved to results.phpinfo.log"
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment