Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Easily find database connection info from common web applications.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
database_sleuth.gemspec

README.rdoc

database_sleuth

This library is designed to parse popular web application configuration files to extract database connection information for use in other applications or scripts.

To get started, simply require the library:

require 'database_sleuth'

Then, simply create a new instance of the class specifying which application you're collecting information from (note that the library expects the config file to be located in the directory the executing file is running from):

sleuth = DatabaseSleuth.new(:joomla)
sleuth.find_db_info
sleuth.dbhost #=> mysql.example.com
sleuth.dbname #=> somedbname
sleuth.dbuser #=> someusername
sleuth.dbpass #=> somepassword

sleuth.manual_connection_string #=> mysql -u someusername -psomepassword -h mysql.example.com somedbname

Supported Applications

Currently, the following applications are supported:

  • Drupal

  • Gallery

  • Joomla

  • MediaWiki

  • phpBB

  • WordPress

  • ZenCart

Copyright

Copyright © 2010 Joel Watson. See LICENSE for details.

Something went wrong with that request. Please try again.