Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
07-07-2011, 10:26 PM #1
- Join Date
- Jul 2011
- Thanked 0 Times in 0 Posts
Unknown Coding - Cannot find the code in the files. May be Server-side or auto-placed
If this goes somewhere else, I'm sorry. I didn't see a specific Problems area (I've noticed they have an issues area at the end of each category), and I think it might be server-side (if I'm fully understanding what server-side means. I know I have the general idea, but not exact.)
I was looking at my website's source code today, nad I found out I had some hidden links on it. Not every page, and from what I've checked, it's folder-based (I've only found it three nested folders, and while the links aren't random, it changes by folder).
Google didn't find my website malicious, so I'm trying not to freak out about it, and I'm going to go through some security measures (changing password, checking my files, etc.)
But, I'm worried about how it got there, code-wise.
It's at the bottom of my page right before the body closing tag, and when I download the files to take it out, absolutely nothing shows up (as far as the bad code). It's all normal.
Looking at the coding, it's where the footer is included, but my footer looks like this:
</div> <div id="clear"></div> </div> </body> </html>
The code doesn't show up on every page with the footer though, but I checked the code for the actual page with the includes, and it has nothing on it.
So, from what I can tell, somewhere between reading the file and putting it on the website, the code gets added.
I've talked to my hosting company and they don't know what it could be. I'm asking about the coding, because (1) I need to get the code off, but honestly in my mind more is (2) how it's possible.
At least as far as I learned in coding (which is for the most part, self-taught, so there could be a lot I didn't know), is how someone could add a code without putting any code in the spot it should be placed.
I checked through what I knew, so if there's anything I didn't look at and any information I need, I'd be happy to let anyone know.
And, thanks for any help given.
Nevermind. I guess there is a way to add something at the bottom with PHP. I guess it was added at the top of my header (I forgot I had some pages using my old header. I guess that's where they put the code.)
Last edited by dite; 07-09-2011 at 02:58 PM.
07-21-2011, 05:12 PM #2
I've only seen this kind of thing in free, ads-supported hosts.
Does your host give you a way to edit files remotely? Like, in cPanel, there's a file browser and a file editor? I'm asking because, to verify the theory that the code gets inserted "somewhere between reading the file and putting it on the website", then the copy within the server should contain such code.
If the server copy does not contain the code, then we can assume that it's being inserted during the response (when the server sends the HTML to a client browser). If that's the case, then your provider ought to know about it and be able to deal with it.
Nevermind. Moron in a hurry didn't see that the thread had already been resolved.
Last edited by Samhain13; 07-21-2011 at 05:14 PM.
I am a Man of Truth. I am a Free Human Person. I am a Peacemaker.
** Independent Multimedia Artist in Pasig **