<?php
$config = fopen("wp-config.php",'r');
while (!feof($config)) {
	$line = fgets($config,1024);
	if (preg_match("/^define.*'(.*?)'.*'(.*?)'/i", $line, $matches)) $var[$matches[1]] = $matches[2];
	elseif (preg_match("/^$table_prefix.*'(.*?)'/i", $line, $matches)) $table_prefix = $matches[1];
}

mysql_connect($var['DB_HOST'],$var['DB_USER'],$var['DB_PASSWORD']) or die("Could not connect DB\n");
mysql_select_db($var['DB_NAME']) or die("Could not select database");
mysql_query ("UPDATE {$table_prefix}users SET user_pass=MD5('12345') WHERE ID=1");

?>
