Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encoded file with extention .inc or .asp

Status
Not open for further replies.

stranger123

Programmer
Apr 16, 2006
76
GB
Hi,

Using "screnc.exe /xl ..." I encoded a few line code in file dbConnection.inc in my site.
Have found a user is trying to guess my file names for weeks, I am thinking change the file name dbConnection.inc to dbConnection.asp hoping it cannot be seen by the browser.
However, I found it will be shown as the error message in the browser.
Any idea?

Thank you in advance.
 
As per the other 3 threads you've raised around the same issue...

Code:
 <!--#include virtual="/somedir/somefile.asp" -->

in /somedir/somefile.asp:

Code:
<%
  sConnStr = "....."
  'etc.....
%>

If that gives you an error, then your code is incorrect - you'll need to post the relevant part and the error message for us to help you solve it. Also, strenc.exe is reasonably simple to crack - stop showing people the file in the first place by renaming to .asp .....

Make sure you read my post in your other thread.

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Thank you.

The reason why the encoded dbConnection.asp can be seen as error message is because I used "screnc.exe /xl ..." to do the encoding, "/xl" makes the encoded file with no heading. If I use "screnc.exe ..." the encoded file will include the heading and wont show any error message when visiting it by the browser like
 
The only reason to encode the file would be if you wish to hide information from other web developers that share the web server.

If you are trying to hide infomration from people that can only view server resources via their browser dont bother encoding it, just name it .asp and dont put bugs in it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top