CuteNews

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [HACK] record search entries..., handy for hack victims :)
ashleybaker
post Aug 29 2004, 07:13 PM
Post #1


Newbie
*

Group: Members
Posts: 37
Joined: 29-August 04
Member No.: 850



Name: Record search entries.
Author:
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Hi
simple thing i think is great enough to be put into the hack section and make me famous....
In older versions people could get hacked through search.php. Since 1.4.6 this should be fixed. Though you can also use this to get some insight about popular topics on your site. So you can provide some more info about that on your site.
Instructions:

CODE
$ip = getenv('REMOTE_ADDR');      // get ip
$fp = fopen("search.txt", "a");  // open search.txt
fputs($fp, "$story - $ip\n");     // prints the search term and the ip to search.txt
fclose($fp);                      // closes the file


add this to line 255 of search.php

it stores every search term (only the simple search, easy to modify to recored the advanced search as well if you wanted to), and the ip of who did it

make sure you make search.txt and chmod it to 777 (666 would also work i think...), then open up search.txt to see it set out like:
search words - 127.0.0.0
happy people - 12.12.12.12
shoes - 56.56.56.56
etc etc

you could rename all search.txt's to some random letters so that people cannot access it unless they know the file name (something like aunqio73.txt)

smile.gif


--------------------
UK GAMES NEWS AND REVIEWS
UPDATED DAILY Web Design Kent
Go to the top of the page
 
+Quote Post
dubster
post Oct 3 2004, 09:45 PM
Post #2


Don't pet the sweaty things.
***

Group: Support
Posts: 1,004
Joined: 23-July 04
From: Near London, UK
Member No.: 369



It's been pointed out that the current search.php does not go as high as line 255 sad.gif

So I'm hoping we can get a more complete idea of how to use this hack.

Dubs'


--------------------
You don't have to work here to help, but it's mad!



Come visit - http://dubster.co.uk or even http://myspace.com/jaydubster
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 23rd May 2013 - 10:18 AM