[wp-hackers] Slow loading WordPress (Hack solution)

Peter van der Does peter at avirtualhome.com
Fri Dec 5 19:06:37 GMT 2008


On Fri, 5 Dec 2008 19:33:35 +0100
Malaiac <malaiac at gmail.com> wrote:

> > Peter van der Does <peter at avirtualhome.com> wrote:
> 
> Am i wrong or this hack is only for dedicated servers ? I don't see
> how a wp-cron hosted on a shared hosting could access a wp file
> calling it by its ip adress
> 
> Malaiac
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

No Malaiac, this works for all.
The only change I made is calling the server by IP instead of name.
After opening the connection to the server data is send by this line:
fputs( $argyle,
	  "GET {$parts['path']}?check=" . wp_hash('187425') . " HTTP/1.0\r\n"
	. "Host: {$_SERVER['HTTP_HOST']}\r\n\r\n"
);

The line with Host tells the receiving webserver which website the
data is for. The webserver will do the rest.

For example my site has IP address: 74.50.21.205
If you do reverse lookup it will respond with direa.lunarpages.com but
if do a telnet over HTTP:

$ telnet 74.50.21.205 80
Trying 74.50.21.205...
Connected to 74.50.21.205.
Escape character is '^]'.
GET / HTTP/1.0
Host: blog.avirtualhome.com

HTTP/1.1 200 OK
Date: Fri, 05 Dec 2008 19:02:29 GMT
Server: Apache/1.3.41 (Unix) mod_fastcgi/2.4.6 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
X-Pingback: http://blog.avirtualhome.com/xmlrpc.php
X-Powered-By: PHP/5.2.6
Connection: close
Content-Type: text/html; charset=UTF-8

<!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 profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Home of the AVH WordPress plugin, AVH Amazon and AVH Extended
Categories.

As you see it returns my web site while if you omit the Host part:
$ telnet 74.50.21.205 80
Trying 74.50.21.205...
Connected to 74.50.21.205.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Fri, 05 Dec 2008 19:04:30 GMT
Server: Apache/1.3.41 (Unix) mod_fastcgi/2.4.6 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
Last-Modified: Tue, 02 Sep 2008 03:04:50 GMT
ETag: "67490-7c-48bcad52"
Accept-Ranges: bytes
Content-Length: 124
Connection: close
Content-Type: text/html

<html>
<head>

<META   HTTP-EQUIV="Refresh"
        Content = "1;
        URL=http://www.lunarpages.com">

</head>

</html>

You get my provider.

-- 
Peter van der Does

GPG key: E77E8E98

WordPress Plugin Developer
http://blog.avirtualhome.com

GetDeb Package Builder/GetDeb Site Coder
http://www.getdeb.net - Software you want for Ubuntu


More information about the wp-hackers mailing list