Solved

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

Posted on 2014-04-26
2
372 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
  • 2
2 Comments
 
LVL 28

Accepted Solution

by:
FishMonger earned 250 total points
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now