Jump to content

bahgheera

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bahgheera's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes, I have a backup but it's about a week old. I know, I know! One thing I want to find out is how do I figure out how they got in? It's the second time this website has suffered the same attack. I did a lot of research on google the first time this happened, and found tons of info about what the attack is, what it does, etc. But I couldn't find anything that explains how you would go about finding where it came from. I know there's an input box somewhere on the site that is unprotected, but who the heck knows where that would be??? We have SMF running, and the site owner has a couple more websites on the same server as well. Any ideas how to track down that input would be GREATLY appreciated.
  2. Hi folks, a question. My website got hacked with a base64 eval added as the first line of every php file on the server. So I'm working on a script that will fix it. I want to know if I'm going at this logically. The flow of the script is like this - find all the php files, check to see if the first line contains the attack string. If it does, we load up the file, reverse it, pop off the last line, reverse it again, and write it back to disk. This was the only way I could figure out to remove the first line, without doing some array magic and reading in the entire file. Also, my main problem is that I think I'm creating an endless loop with the directory recursion routine. When I run the thing my website goes down for up to half an hour. Also, when it doesn't crash the server, it doesn't identify the files with the attack string. Would someone mind looking at it and try to figure out 1) where the endless loop is, and 2) why the check_file function isn't working? I'd greatly appreciate it. BTW, I didn't write the directory recursion part, but I can't remember where I got it. This script worked before on a different server. [attachment deleted by admin]
  3. As for the 'why is css better than tables' argument, I just have one word: http://www.csszengarden.com :)
  4. Hey thanks for all the informaton toplay and others. It's a shame no one mentioned to me that if you set up your backend script first, and worry about the authentication system later, then googlebot will come through your site and hit *EVERY SINGLE DELETE LINK* as it's indexing.  :'( Ah well, a lesson learned. Chalk one up to experience; at least it was just a test database... Laters...
  5. So am I to understand that if I place the text '?id=5' at the end of my url, then in the script being called, there will be a variable called $id with a value of 5? is the 'action=show' just another variable? Can I customize that, can I use my own arbitrary 'actions'? Questions, questions, questions. Thanks!
  6. Yes, I am planning to add an authentication system somehow, I just haven't gotten to that point yet.
  7. Thank you toplay. I would never have guessed to pass the id in the link itself, I knew that was possible but I didn't think it was ok from a security standpoint. I can see I have a lot more reading to do this weekend. Thanks again. Laters...
  8. I want an Edit / Delete link beside each item. I have a while loop for displaying the items, and the edit / delete links are written to the browser inside this while loop. So I need to pass the id of the item to the edit_item.php script, depending on which link I've clicked. Sorry if this is confusing, I guarantee I'm more confused than you though. Laters...
  9. Hello folks. I've been converting my website to php, I started last Saturday. So I'm a total php/mysql newbie. I've got my index.php set up pretty much like I want it - http://bahgheera.com/phptest/index.php. Now, I also have this script - http://bahgheera.com/phptest/backend2.php, which displays all the items from the index page, plus a form for adding new items (which actually works at this point), plus a link by each item to edit or delete the item. Now, what I'm having trouble with is the edit and delete links. I need to have some way of sending the id of the item to be edited to the next script -  http://bahgheera.com/phptest/edit_item.php, but I just can't get my head around the logic required for this. Here's the code in question: [code]       $month = date ( m );       $result = mysql_query ( "SELECT * FROM news2 WHERE date >= 060000 and date <= 063006 ORDER BY date DESC");       $num_rows = mysql_num_rows ( $result );       while ( $a_row = mysql_fetch_object( $result ) ) {         $date_ex = "_".substr($a_row->date, 0, 2).".".substr($a_row->date, 3, 2).".".substr( $a_row->date, 6, 2)." //";         print $date_ex." ID = ".$a_row->id ;         print '<DIV CLASS="container">';         print '<DIV CLASS="spacer">&nbsp;</DIV>';         print ' <DIV CLASS="image">';         print ' <A HREF="'.stripslashes ( $a_row->resource_url ).'" TARGET="_blank">';         print ' <img src="http://bahgheera.com/img/'.stripslashes($a_row->img_url).'" width="150" height="150" border="0" alt="">';         print ' </A>';         print ' </DIV>';         print ' <DIV CLASS="text">';         print stripslashes ( $a_row->article_title ).'<br /><br />';         print stripslashes ( $a_row->article_text ).'<br /><br />';         print ' </DIV>';         print '<DIV CLASS="spacer">&nbsp;</DIV>';         print '</DIV>';         print '<a href="edit_item.php">Edit</a> // <a href="">Delete</a>';         print '<DIV CLASS="rule"> </DIV><BR>';       } [/code] If this is even possible ( it has to be...) let me know. Any help will be greatly appreciated. In other words, freakin' awesome. Laters...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.