Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I hide a script name in a variable?

Posted on 2002-04-16
3
Medium Priority
?
131 Views
Last Modified: 2013-12-25
I have a form that hackers are infiltrating. I want a way to "hide" the action= attribute of the form so that when they save my form to their computer to run scripts off of, it won't be able to find it.

OK, so now that I know that won't work - what can I do to the perl file so that it rejects anyone NOT coming from the correct server?
0
Comment
Question by:trulygreat
3 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6953668
You can try this:
http://www.dynamicdrive.com/dynamicindex9/encrypter.htm

but they will have to be pretty lame to not be able to figure it out. You cannot do security from the client side.  You have to stop them on the server, bu modifying the script to detect unauthorized requests, or require a logonid and password managed from the database.

Cd&
0
 
LVL 2

Expert Comment

by:jpoesen
ID: 6956694
You can have your script parse your environment variables and act upon those.

a few interesting ones :
AUTH_TYPE
REMOTE_ADDR
REMOTE_HOST
REMOTE_IDENT
REMOTE_USER

HTTP_REFERER is also interesting.

usage :
$ENV(var)

example:
visitorIP = $ENV('REMOTE_ADDR')

Hope this is enough for your problem.
jpoesen
0
 
LVL 18

Accepted Solution

by:
mgfranz earned 240 total points
ID: 6959901
Or set a session variable when a page prior to the from is loaded, (if you are on IIS), then check that variable in the form processing page.  If there, continue, else reject.

If ENV variable do not work for you, try a cookie that has the date/time of visit set in the page just prior to the form being loaded, then check this cookie in the form processing page for date/time up to -20 minutes, if false, reject.

Another way would be to write a cookie with the name of the form processing page in the cookie, since it is tied to your server, this make for a viable alternative.

Or, just process the form in the parent page;

<%
formVal = Request("action")

If formVal = "Do It" Then
    do this...
    Load the processing portin of the page
ElseIf formVal = "" Then
    do that
    Load the Form portion of the page
Else
End If

<form method=post>
...
<submit button name="action" value="Do It">

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question