Re: How does the PHP Ghost one-liner work?
| From: | Robert Williams | Date: | Fri, 30 Jan 2015 19:25:48 +0000 |
| Subject: | Re: How does the PHP Ghost one-liner work? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81453@lists.php.net to get a copy of this message | ||
On Jan 30, 2015, at 12:05, Patrick Schaaf <php@bof.de<mailto:php@bof.de>> wrote:
> % php -r '$e="0";for($i=0;$i<2500;$i++){$e="0$e";}
> gethostbyname($e);’
What a funny way to say gethostbyname(str_repeat("0", 2501));
Wow, I somehow missed the interpolation of $e into the value… <self-slap>. Guess I was too
focused on looking to the loop as the important part when really, it’s just stupid code, as you
point out, probably written by someone who knows little about PHP.
With that in mind, there is obviously no unintended side-effect at work here. Sorry for wasting
everyone’s time… as you were.
--
Bob Williams
Business Unit Information Officer and
Senior Vice President of Software Development
Newtek Business Services Corp.
(602) 263-0300 x12458 | http://www.thesba.com/
________________________________
Notice: This communication, including attachments, may contain information that is confidential. It
constitutes non-public information intended to be conveyed only to the designated recipient(s). If
the reader or recipient of this communication is not the intended recipient, an employee or agent of
the intended recipient who is responsible for delivering it to the intended recipient, or if you
believe that you have received this communication in error, please notify the sender immediately by
return e-mail and promptly delete this e-mail, including attachments without reading or saving them
in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail,
including attachments, is prohibited and may be unlawful. If you have received this email in error,
please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if
any).