PHP "Easter Egg"

转自:http://www.0php.com/php_easter_egg.php

If you add the code "?=PHPE9568F36-D428-11d2-A769-00AA001ACF42" (without quotes) to the end of any URL that is a PHP page, you will see a funny picture on most servers. Also on April 1st (April Fool's Day), the picture will replace the PHP logo on any phpinfo() page. If the PHP directive expose_php is set to be "off" in php.ini, then the PHP eggs will not show, but it is "on" by default, and many webhosting servers do not change it. If you see such a URL in your website logs, it may be because someone is trying to determine if your server is running PHP and attempting to discover weaknesses in your system. By setting expose_php = off in the php.ini configuration file, you will reduce the amount of information available to them. If the PHP easteregg is active (the URL shows the image), then scanning the website with Nitko web server scanner will give the warning message, "PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings."


These are the four QUERY strings you can add to the end of a PHP web page to view a (somewhat) hidden image or web page:

(1)   ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
This one is the most interesting, and displays an "easter egg" image of either a rabbit in a house (Sterling Hughes' rabbit, named Carmella), a brown dog in the grass, a black Scottish Terrier dog, a sloppy child hand-drawn, crayon-colored php logo, a guy with breadsticks (looks like pencils or french fries) sticking out of his mouth like a walrus, or a PHP elephant logo. The original dog (Nadia) was Stig Bakken's (Stig is one of the PHP developers); the newer dog isZeev Suraski's dog (the link goes to his blog entry about the dog, called Scotch or Scottie, that died August 30, 2005); and the guy is Thies Arntzen (the logo image was taken from a picture from the PHP Developers' Meeting that the PHP Group held in January 2000). The six images are shown below. The black dog, colored logo, and rabbit pictures are 10 pixels shorter than the other three images.

  
  

Below are the images for various PHP versions:

PHP CODER GUY WITH BREADSTICKS (Thies C. Arntzen):
PHP Version 4.0.0 - 4.2.3

BROWN DOG IN GRASS (Stig's dog, Nadia):
PHP Version 4.3.0 - 4.3.10

BLACK SCOTTISH TERRIER (Zeev's dog, Scotch):
PHP Versions 4.3.11 - 4.4.6; and 5.0.4 - 5.1.2

BUNNY (Sterling's rabbit, Carmella):
PHP Version 5.0.0 - 5.0.3

COLORED PHP LOGO:
PHP Version 5.1.3 - 5.2.13

ELEPHANT PHP LOGO:
PHP Version 5.3.0 - current

(2)   ?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
This is used by the phpinfo function to display the PHP logo, but works on other PHP pages.



(3)   ?=PHPE9568F35-D428-11d2-A769-00AA001ACF42
This is used by the phpinfo() function to display the Zend logo, but also works on other PHP-parsed pages.

Zend engine logo PHPE9568F35-D428-11d2-A769-00AA001ACF42

(4)   ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
This displays the PHP development credits, and is linked to from any phpinfo() page with text "PHP Credits".

The only truly hidden image is the first one above. The other three are called from the web page produced by the phpinfo() function.

The first code above, ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42, is returned by the hidden function (undocumented in the php.net online manual) php_egg_logo_guid(). PHP_EGG_LOGO_GUID is defined as a preprocessor macro in php-src/ext/standard/info.h, line 54, and referenced in 3 files:

php-src/ext/standard/info.c (lines 988 and 1032)
php-src/ext/standard/info.h (line 54)
php-src/main/php_logos.c (line 59).


Below are the four codes' definitions in the php source within php-source/ext/standard/info.h (lines 53 to 56):

#define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42"
#define PHP_EGG_LOGO_GUID "PHPE9568F36-D428-11d2-A769-00AA001ACF42"
#define ZEND_LOGO_GUID "PHPE9568F35-D428-11d2-A769-00AA001ACF42"
#define PHP_CREDITS_GUID "PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000"

你可能感兴趣的:(Archive,Php)