SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Enthusiast TheTiger's Avatar
    Join Date
    Jan 2004
    Location
    Fevik, Norway
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question I get somting when I view the source that i did not put in the code!! HELP!!

    I get somting when I view the source that i did not put in the code!! HELP!!

    Code:
     
    <script language="JavaScript">
    <!--
    function SymError()
    {
      return true;
    }
    window.onerror = SymError;
    var SymRealWinOpen = window.open;
    function SymWinOpen(url, name, attributes)
    {
      return (new Object());
    }
    window.open = SymWinOpen;
    //-->
    </script>
    What do thise mean??? I do not have a clue!!!

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Do you use a free webhost? They put javascript in the pages served from their servers to make pop ups and place other ads so they can make money.

  3. #3
    SitePoint Enthusiast TheTiger's Avatar
    Join Date
    Jan 2004
    Location
    Fevik, Norway
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, I use my one server. Apache.....

  4. #4
    SitePoint Enthusiast TheTiger's Avatar
    Join Date
    Jan 2004
    Location
    Fevik, Norway
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Her is my code before I get that code:
    PHP Code:
    <?php
    /**
    * ====================
    * ks81 v1.0
    * ====================
    *
    * File     : ./header.php
    * Copyright : 2004 (c) Kenneth Sørensen
    * Info     : Header Settings.
    *
    ***************************************/
     
    // Include the commenks81 file
    require_once 'commenks81.php';
    if(isset(
    $_COOKIE["lang"]))
    {
    if(
    $_GET['refresh'] == 'no')
    {
    echo 
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "[url="http://www.w3.org/TR/html4/loose.dtd"]http://www.w3.org/TR/html4/loose.dtd[/url]">
    <html>
    <head>
    <title>' 
    $config['BG_tittel'] . '</title>
    <link rel="stylesheet" type="text/css" href="' 
    $config['Site_URL'] . 'ks81.css" />
    </head>
    <body>'
    ;
    }
    else
    {
    echo 
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "[url="http://www.w3.org/TR/html4/loose.dtd"]http://www.w3.org/TR/html4/loose.dtd[/url]">
    <html>
    <head>
    <title>' 
    $config['BG_tittel'] . '</title>
    <link rel="stylesheet" type="text/css" href="' 
    $config['Site_URL'] . 'ks81.css" />
    <meta http-equiv="refresh" content="0;url='
    .$_SERVER['PHP_SELF'].'?language='.$_COOKIE["lang"].'&refresh=no">
    </head>
    <body>'
    ;
    }
    }
    else
    {
    echo 
    '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "[url="http://www.w3.org/TR/html4/loose.dtd"]http://www.w3.org/TR/html4/loose.dtd[/url]">
    <html>
    <head>
    <title>' 
    $config['BG_tittel'] . '</title>
    <link rel="stylesheet" type="text/css" href="' 
    $config['Site_URL'] . 'ks81.css" />
    <meta http-equiv="refresh" content="0">
    </head>
    <body>'
    ;
    }
    ?>
    <SCRIPT language="JavaScript">
    <!--
    function runClock() {
    theTime = window.setTimeout("runClock()", 1000);
    var today = new Date();
    var display = today.toLocaleString();
    window.status = display;
    }
    runClock();
    -->
    </SCRIPT>
    <SCRIPT language="JavaScript">
    <!-- Begin
    var preload=new Image();
    preload.src="images/mp3_on.gif";
    function move_in(img_name,img_src) {
    document[img_name].src=img_src;
    }
    function move_out(img_name,img_src) {
    document[img_name].src=img_src;
    }
    // End -->
    </SCRIPT>
    <?php
    switch($_GET['language'])
    {
    case 
    "no":
     
    //can set cookie here as well.
    setcookie("lang""no"time()+60*60*24*30"/");
    $sql mysql_query('SELECT file_location FROM language WHERE id= "2"') or die(mysql_error());
    $array mysql_fetch_array($sql);
    require_once(
    $config['Site_path'].$array['file_location']);
    $lang 'no';
    break;
    case 
    "en":
     
    //can set cookie here as well.
    setcookie("lang""en"time()+60*60*24*30"/");
    $sql mysql_query('SELECT file_location FROM language WHERE id= "1"') or die(mysql_error());
    $array mysql_fetch_array($sql);
    require_once(
    $config['Site_path'].$array['file_location']);
    $lang 'en';
    break;
    default:
    //can set cookie here as well.
    setcookie("lang""no"time()+60*60*24*30"/");
    $sql mysql_query('SELECT file_location FROM language WHERE id= "2"') or die(mysql_error());
    $array mysql_fetch_array($sql);
    require_once(
    $config['Site_path'].$array['file_location']);
    $lang 'no';
    }
    echo
    '
    </head>
    <body>
    <table class="main">
    <tr><td class="top-logo"><div align="center"><a href="' 
    $config['Site_URL'] . 'index.php?language='.$lang.'&refresh=no" class="top-logo" ><img src="images/logo.jpg" width="500" height="100" alt="' $config['BG_logo'] . '" border="0"/></a></div>
    </td></tr>'
    ;
    /**
    *
    * Last updated : 11.04-2004
    * Info     : Working "Ok"
    *
    ***************************************/
    ?>
    and from the browser:

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "[url="http://www.w3.org/TR/html4/loose.dtd"]http://www.w3.org/TR/html4/loose.dtd[/url]">
    <html>
    <head>
    <title>Kenneth's Heimeside - TheTiger's Cave!</title>
    <link rel="stylesheet" type="text/css" href="[url="http://ks81.no-ip.info/ks81/ks81.css"]http://ks81.no-ip.info/ks81/ks81.css[/url]" />
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function SymError()
    {
    return true;
    }
    window.onerror = SymError;
    var SymRealWinOpen = window.open;
    function SymWinOpen(url, name, attributes)
    {
    return (new Object());
    }
    window.open = SymWinOpen;
    //-->
    </script>
    <SCRIPT language="JavaScript">
    <!--
    function runClock() {
    theTime = window.setTimeout("runClock()", 1000);
    var today = new Date();
    var display = today.toLocaleString();
    window.status = display;
    }
    runClock();
    -->
    </SCRIPT>
    <SCRIPT language="JavaScript">
    <!-- Begin
    var preload=new Image();
    preload.src="images/mp3_on.gif";
    function move_in(img_name,img_src) {
    document[img_name].src=img_src;
    }
    function move_out(img_name,img_src) {
    document[img_name].src=img_src;
    }
    // End -->
    </SCRIPT>
     
    </head>
    <body>
    <table class="main">
    <tr><td class="top-logo"><div align="center"><a href="[url="http://ks81.no-ip.info/ks81/index.php?language=no&refresh=no"]http://ks81.no-ip.info/ks81/index.php?language=no&refresh=no[/url]" class="top-logo" ><img src="images/logo.jpg" width="500" height="100" alt="Kenneth's Heimeside - TheTiger's Cave!" border="0"/></a></div>
    </td></tr> 
     

  5. #5
    SitePoint Wizard bronze trophy JRMillion's Avatar
    Join Date
    Apr 2004
    Location
    Arlington VA
    Posts
    2,094
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you running a software firewall or some internet security software?

    some of those programs insert javascript on pages you load to surpress errors and stuff.

  6. #6
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya, I think that function is from NIS (Norton Internet Security)
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  7. #7
    SitePoint Enthusiast TheTiger's Avatar
    Join Date
    Jan 2004
    Location
    Fevik, Norway
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    x
    Last edited by TheTiger; Apr 28, 2004 at 17:24.

  8. #8
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Every websearch I've done leads me to the same conclusion. This code is added by one of the various Norton firewall products (the Sym in SymError likely stands for Symantec)

    Don't know what else to tell you. The facts point to a Norton product (client or server) doing this.

    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  9. #9
    SitePoint Wizard bronze trophy JRMillion's Avatar
    Join Date
    Apr 2004
    Location
    Arlington VA
    Posts
    2,094
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with beetle

  10. #10
    SitePoint Enthusiast TheTiger's Avatar
    Join Date
    Jan 2004
    Location
    Fevik, Norway
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are right about that! it is my Norton Spam filter that put that into the code! Thank you very much for the help!

  11. #11
    SitePoint Member
    Join Date
    Apr 2004
    Location
    CT
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I get the same thing too, and i have the Norton Internet Security too. it doesnt affect your page in any negative way though, right?

  12. #12
    SitePoint Enthusiast TheTiger's Avatar
    Join Date
    Jan 2004
    Location
    Fevik, Norway
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No it du not affect your page in any negativ way, It just block ad from websites you are viewing!

  13. #13
    SitePoint Wizard
    Join Date
    Jan 2004
    Location
    3rd rock from the sun
    Posts
    1,005
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont think this is anything to do with your rogue js, but in php you are trying to set a cookie after you have sent some text to the browser. As I understand it, you must do the cookie/header stuff first, then write to the page.

    IMO this then causes a php error, maybe that is snagging something on your firewall - or at least making a debug nightmare for you.

  14. #14
    SitePoint Member
    Join Date
    Apr 2004
    Location
    CT
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheTiger
    No it du not affect your page in any negativ way, It just block ad from websites you are viewing!
    oh ok now that explains it.

  15. #15
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This doesn't block ads at all. It just supresses JavaScript errors that may occur as a result of blocking ads.

    The downside is that it supresses ALL JavaScript errors, so discovering errors in your own code becomes a PITA.

    Edit:


    Looks like SymWinOpen will negate popup ads, at the cost of overwriting ALL window.open commands, include popups you may request.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  16. #16
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Odd, I've never noticed my version of NIS inserting any javascript into my code.

    Maybe it's cause i'm running a rather old version? ('99, 2000)
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •