Text in ASP Scripts Hidden From Windows Search

  • Thread starter Thread starter Perrinwolf
  • Start date Start date
P

Perrinwolf

Found some interesting behavior in Windows Search (Start => Search => All
files and folders => search for "A word or phrase in the file:"). This
applies to XP and maybe other Windows flavors.

Procedure:
1. Create a simple text file named test.txt.
2. Open the text file in a text editor and add a simple test word such as
"blah" (not quotes).
3. Save the text file.
4. Using Windows search, attempt to locate this new text file by searching
for files containing the word "blah" (no quotes). Recommend limiting search
to folder that contains the new text file and deselect search subfolders
option.
5. The file should be found.
6. Change the file extension of the text file from .txt to .asp.
7. Redo the search.
8. The file should be found.
9. Reopen the text file (now named test.asp) in a text editor.
10. Change the string "blah" to "<% blah %>" (without quotes). [The brackets
delineate script in asp files.]
11. Save the changes.
12 Redo the search.
13. The file is NOT found.

Interesting. There must be some security concern related to .asp files with
embedded scripts relative to Windows Search. I wonder if there is a KB
article or something about to this. I have not been able to find anything.

Can anyone shed any light on this behavior?

Does anyone know of a good tool to find files containing a specific
string/pattern? Cygwin and some of the Unix tools works, but a GUI tool like
Windows Search would be preferrable.

Thanks.
 
1. Go to Search/change Preferences/With Indexing Service/Change Indexing
Service (Advanced).

or via:

2. Go to Start/Administrative Tools/Computer Management/Services and
Applications/Indexing Service.

If this doesn't help...

Windows® XP has a known issue for not finding a number of File Types when
you do a Search for Files "containing text" or using the "A word or phrase
in the file" option. This can be remedied for many file types, but not all.

Download the VBS file below. Double click the file you just saved. You'll
be prompted to enter a file extension. If the PersistentHandler value is
correct, no changes will be made. If the PersistentHandler value exists,
but is different, no changes will be made. If no PersistentHandler value
exists, then it will be created.

Enable XP's Search to find text in files:
http://www.dougknox.com/xp/scripts/xp_persisthandler.vbs

Manual Edit:

To resolve this problem for other file types, install a program that
registers a filter for the file type that you want to search. If no program
that provides a filter is available, you can use the plain text filter for a
file type.

Go to Start/Run/Regedit and add a PersistentHandler key under the file type
key in HKEY_CLASSES_ROOT and set its (Default) string value name to the
following value: {5e941d80-bf96-11cd-b579-08002b30bfeb}

For example, to use the text filter provider for .pas files, the following
registry setting should exist:
HKEY_CLASSES_ROOT\.zzz\PersistentHandler\(Default) =
{5e941d80-bf96-11cd-b579-08002b30bfeb}

After you add this value to the registry, you must log off and then log back
on to make the change take effect.

Using the "A Word or Phrase in the File" Search Criterion May Not Work
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q309173

--

All the Best,
Kelly (MS-MVP/DTS&XP)

Taskbar Repair Tool Plus!
http://www.kellys-korner-xp.com/taskbarplus!.htm


Perrinwolf said:
Found some interesting behavior in Windows Search (Start => Search => All
files and folders => search for "A word or phrase in the file:"). This
applies to XP and maybe other Windows flavors.

Procedure:
1. Create a simple text file named test.txt.
2. Open the text file in a text editor and add a simple test word such as
"blah" (not quotes).
3. Save the text file.
4. Using Windows search, attempt to locate this new text file by searching
for files containing the word "blah" (no quotes). Recommend limiting
search
to folder that contains the new text file and deselect search subfolders
option.
5. The file should be found.
6. Change the file extension of the text file from .txt to .asp.
7. Redo the search.
8. The file should be found.
9. Reopen the text file (now named test.asp) in a text editor.
10. Change the string "blah" to "<% blah %>" (without quotes). [The
brackets
delineate script in asp files.]
11. Save the changes.
12 Redo the search.
13. The file is NOT found.

Interesting. There must be some security concern related to .asp files
with
embedded scripts relative to Windows Search. I wonder if there is a KB
article or something about to this. I have not been able to find anything.

Can anyone shed any light on this behavior?

Does anyone know of a good tool to find files containing a specific
string/pattern? Cygwin and some of the Unix tools works, but a GUI tool
like
Windows Search would be preferrable.

Thanks.
 
Back
Top