hide information from the view "source"

K

kwan

Hello,

It is the problem with my entire Perl code; I wrote the Perl script to
retrieve the questions and answers from the database. It is possible
that the user can view "source" and retrieve the questions and answer
from the "view source" which is the pain html. At this point, I want
to convert my program into Java Applet, it is solve the problems. But,
before I do that, I hope that anyone here can give me some hint to
solve my problem.

Thank you,
 
J

Jürgen Exner

kwan said:
It is the problem with my entire Perl code; I wrote the Perl script to
retrieve the questions and answers from the database. It is possible
that the user can view "source" and retrieve the questions and answer
from the "view source" which is the pain html.

I am assuming that you are talking about a web application (you didn't
say), using CGI (you didn't say), where your Perl code creates an HTTP
response aka web page.
And the problem is (you didn't say) that you coded all questions and
answers into that single HTTP response object and thus a user can see
them when reading the HTTP response directly ("View Source").

You do not have a Perl problem. You would have exactly the same problem
no matter which programming language you had chosen to write the CGI
scripts.
Also you do not have a CGI or programming problem in general, either.
Your problem is caused by a poor design of your system.
At this point, I want
to convert my program into Java Applet, it is solve the problems. But,
before I do that, I hope that anyone here can give me some hint to
solve my problem.

The solution is very simple: don't do that. Do not code all questions
and answers into the HTTP response. Instead do round-trips to the web
server for each answer and check the answer server-side only. Yes, that
does increase traffic quite a bit. Yes, it does introduce potentially
significant delays for each round-trip. But is the only way to not hand
out all questions and answers to the user because as soon as you send
them the user can read them one way or the other.

Or you might try to encode/encrypt the data and have some client-side
process to decode it. That may deter the casual user, but it won't stop
a dedicated cracker because after all he is supposed to see the data in
clear text eventually, therefore you cannot block access to it totally.

jue
 
B

Brian Wakem

kwan said:
Hello,

It is the problem with my entire Perl code; I wrote the Perl script to
retrieve the questions and answers from the database. It is possible
that the user can view "source" and retrieve the questions and answer
from the "view source" which is the pain html. At this point, I want
to convert my program into Java Applet, it is solve the problems. But,
before I do that, I hope that anyone here can give me some hint to
solve my problem.

Thank you,


You cannot stop somebody from viewing the source.

Not that this is perl related of course.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top