hide information from the view "source"

Discussion in 'Perl Misc' started by kwan, Oct 14, 2009.

  1. kwan

    kwan Guest

    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,
     
    kwan, Oct 14, 2009
    #1
    1. Advertising

  2. kwan <> wrote:
    >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
     
    Jürgen Exner, Oct 14, 2009
    #2
    1. Advertising

  3. kwan

    Brian Wakem Guest

    kwan wrote:

    > 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.


    --
    Brian Wakem
     
    Brian Wakem, Oct 14, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Parthiv Joshi
    Replies:
    1
    Views:
    775
    Samuel L Matzen
    Jul 6, 2004
  2. andspal

    Updates in Design view not moved to Source view

    andspal, Nov 2, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    206
    andspal
    Nov 2, 2006
  3. WRH

    Newbie...how to hide data from view source

    WRH, Dec 26, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    125
  4. Jenny
    Replies:
    3
    Views:
    288
    Dag Sunde
    Dec 17, 2004
  5. kwan
    Replies:
    2
    Views:
    135
    ccc31807
    Oct 15, 2009
Loading...

Share This Page