Jump to content

Wordpress DB


digip
 Share

Recommended Posts

I'm trying to fix a Wordpress install on a server that was compromised, and was successfull at recreating a password for the admin account by overwriting it in the DB with a generic md5 hash. After logging in I noticed some weird replies to posts that didn't show up on the pages, but were under the admin panel to be deleted where you can go to see all the comments. What I am now trying to do is query the database to show me ALL the contents of the database so I can see if there is anything funky going on or injected that I can't see, but I can't figure out how to show everything from the wordpress DB. Here is what I am trying to use, but the query returns nothing, so I have something wrong in my query statment, yet it doesn't throw an error when I run it.

$query = "SELECT * FROM xxxx";
$result = mysql_query($query);

//($row = @mysql_fetch_assoc($result)){
while ($row = @mysql_fetch_assoc($result)){
    foreach($row as $key => $value){
        echo $key.': '.$value.'<br>\n';
        }
    echo "<br>\n";
}

xxxx is just the name of my database. Problem is, I don't know what the hell the table names are that Word Press created. I tried using a query against each table from the config file, ex: wp_users, wp_posts, etc, and that just throws an error that it isnt a valid resource, but strangely enough, if I just give it the DB name to select from, it doesnt give me an error, but also doesnt rerutn anything at all.

By the way, I do not have access to MyPhpAdmin or any sort of control panel access to the site or database server so I can't go in and look at this data in detail without making a query to the tables and pulling down the results. It's on a GoDaddy account, and they guy who I work for hasn't given me anything other than FTP access and MySql login/pass info.

edit: My bad, I figured out what I had missing. I didn't link it to the DB under the login parameters, I had everything to login except mysql_select_db('xxxx',$conn) in the file, so it didn't know where to query against.

P.S. -is there a way for us to edit the topic's subject? I think we had this option under the old forums.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...