Jump to content

Recommended Posts

Hello,

 

Below is the code to my main page, called index.php.  It is what shows when I type my domain into the browser.  On a few occasions, when I open it in Internet Explorer, some malicious javascript code gets added to the bottom of the code below.  The malicious javascript code looks like: "<script type="text/javascript">eval(String.fromCharCode(118,97,114,32,120,101,119,61,57,56,55,49,51,49,..."

 

It seems like this code then installs a fake anti-virus program on the computer of anyone who visits my site.  How can I prevent this malicious javascript from getting written into my source code.

 

Thanks,

 

John

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<?php
session_start();
unset($_SESSION['find']);	
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>

<link rel="stylesheet" type="text/css" href="tablestyles.css"> 

</head>

<body>

<div class="mainlinks"><a href="about.php" class="links">About</a><a href="testpage.php" class="links">New Testpage</a><a href="tablecreate.php" class="links">Table Create</a></div>

<div class="line"></div>


<div class="smalllogo"><a href="index.php"><img src="images/logo.png" alt="Tywod" width="170" height="45" border="0"/></a></div>
  
  
  <div class="searchbox">
  <form action="tsearch14.php" method="post">
  <label>Enter Topic:
  <input type="text" name="find" size="55"/>
  <input type="hidden" name="searching" value="yes" />
  <input type="submit" name="search" value="Search" />
  </label>
  </form>
  </div>

<div class="line2"></div>

<div class="copyright">©2009 Title</div>

</body>
</html>

This seems to be more than just virus since it is actually adding code to my own site. 

 

And if my computer just had a virus, does this mean that any computer with a virus could add code to my source code?

 

I guess I'm asking how to make my own site trojan-proof.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.