?
Solved

Can html and a javascript tracking code be inserted into PERL?

Posted on 2014-04-26
2
Medium Priority
?
423 Views
Last Modified: 2014-04-27
My online reservation system uses PERL to load content into a frameset.  I know this is archaic, but it has worked wonderfully for a decade.

I'd like to insert some tracking code into a PERL script, so I can identify the referrers which load that script, but when I tried it, the script no longer performed.  Please advise if, and how, this might be accomplished.

I've changed the .pl suffix of the attached file to .txt so it could be uploaded.m-rez60load.txt
0
Comment
Question by:ddantes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 28

Accepted Solution

by:
FishMonger earned 1000 total points
ID: 40025780
You script does not compile so I don't see how it could have "worked wonderfully for a decade"

First step would be to reformat the code so that it's readable.  Obfuscation does not equal security.

The next step would be to fix the following issues so that it at least compiles.

Bareword found where operator expected at ddantes.pl line 31, near "<script type="text"
  (Might be a runaway multi-line "" string starting on line 21)
        (Missing operator before text?)
String found where operator expected at ddantes.pl line 32, near "EXd=document;location.protocol==""
  (Might be a runaway multi-line "" string starting on line 31)
        (Missing semicolon on previous line?)
Bareword found where operator expected at ddantes.pl line 32, near "EXd=document;location.protocol=="https"
Bareword found where operator expected at ddantes.pl line 32, near ""?EXp="https"
        (Missing operator before https?)
String found where operator expected at ddantes.pl line 32, near "https":EXp=""
Bareword found where operator expected at ddantes.pl line 32, near "":EXp="http"
        (Missing operator before http?)
String found where operator expected at ddantes.pl line 32, near "http";EXs=""
Bareword found where operator expected at ddantes.pl line 32, near "";EXs="src"
        (Missing operator before src?)
String found where operator expected at ddantes.pl line 33, near "EXd.write(""
  (Might be a runaway multi-line "" string starting on line 32)
        (Missing semicolon on previous line?)
String found where operator expected at ddantes.pl line 33, near "img "+EXs+""
        (Do you need to predeclare img?)
Having no space between pattern and following word is deprecated at ddantes.pl line 33.
Bareword found where operator expected at ddantes.pl line 33, near "2.extreme"
        (Missing operator before extreme?)
String found where operator expected at ddantes.pl line 34, near """
  (Might be a runaway multi-line "" string starting on line 33)
        (Missing semicolon on previous line?)
Operator or semicolon missing before &url at ddantes.pl line 34.
Ambiguous use of & resolved as operator & at ddantes.pl line 34.
Operator or semicolon missing before &jv at ddantes.pl line 34.
Ambiguous use of & resolved as operator & at ddantes.pl line 34.
Bareword found where operator expected at ddantes.pl line 35, near ""d"
  (Might be a runaway multi-line "" string starting on line 34)
        (Missing operator before d?)
Operator or semicolon missing before &c at ddantes.pl line 35.
Ambiguous use of & resolved as operator & at ddantes.pl line 35.
String found where operator expected at ddantes.pl line 36, near """
  (Might be a runaway multi-line "" string starting on line 35)
        (Missing semicolon on previous line?)
Operator or semicolon missing before &l at ddantes.pl line 36.
Ambiguous use of & resolved as operator & at ddantes.pl line 36.
Bareword found where operator expected at ddantes.pl line 36, near ""+escape(EXd.referrer)+" width"
        (Missing operator before width?)
Bareword found where operator expected at ddantes.pl line 36, near "0 height"
        (Missing operator before height?)
Number found where operator expected at ddantes.pl line 38, near "<noscript><img height="1"
  (Might be a runaway multi-line "" string starting on line 36)
        (Missing operator before 1?)
String found where operator expected at ddantes.pl line 38, near "1" width=""
        (Missing operator before " width="?)
Number found where operator expected at ddantes.pl line 38, near "" width="1"
        (Missing operator before 1?)
String found where operator expected at ddantes.pl line 38, near "1" alt=""
        (Missing operator before " alt="?)
String found where operator expected at ddantes.pl line 38, near "" alt="" src=""
        (Missing operator before " src="?)
Bareword found where operator expected at ddantes.pl line 38, near "" src="http"
        (Missing operator before http?)
Having no space between pattern and following word is deprecated at ddantes.pl line 38.
Bareword found where operator expected at ddantes.pl line 38, near "2.extreme"
        (Missing operator before extreme?)
Operator or semicolon missing before &amp at ddantes.pl line 38.
Ambiguous use of & resolved as operator & at ddantes.pl line 38.
String found where operator expected at ddantes.pl line 41, near "<div align=\"center\"><h1>RezEasy Online Reservation System</h1>\n""
  (Might be a runaway multi-line "" string starting on line 38)
        (Missing semicolon on previous line?)
syntax error at ddantes.pl line 31, near "<script type="text"
syntax error at ddantes.pl line 41, near "<div align=\"center\"><h1>RezEasy Online Reservation System</h1>\n""
ddantes.pl had compilation errors.
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 40025877
I forgot to point out a fact that you already know but appear to have ignored and that is by modifying this code you're breaking the terms of agreement.

#########################################################################
# RezEasy is copyright of Ray Halliwell. No part of the source code     #
# shall be copied, modified, adapted, or used in any other application. #
# All rights reserved. 1999-2011 (V7 Apr 2011) http://www.hallisoft.com #
#########################################################################
########  DO NOT EDIT THIS FILE USE THE CONFIGURATION PROGRAM   #########

If you need to add new features to that script, you should contact the company that sold it to you to see if they have an updated version that does what you want or could customize this one for you.

If that's doesn't work out then maybe you should look into finding a better quality booking application.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Six Sigma Control Plans
Suggested Courses

765 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