Re: file self check
| From: | Ragnar | Date: | Mon, 09 Aug 2004 08:53:21 +0000 |
| Subject: | Re: file self check | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-24365@lists.php.net to get a copy of this message | ||
If you put that in the file itself, there is not much point though?
If I do say:
if (md5($_SERVER['PHP_SELF'])<>'asda8sd6asd7'){ ...
Anyone with access to the file could just comment that out and the script
self check wouldn't work.
I have honestly no idea how that pearl file did it, but
you couldn't edit it without breaking it.
> You could store a table or a text file associating to each script its MD5
> hash string.
> check the PHP md5() function
>
> _________________________
> ----- Original Message -----
> From: "Ragnar" <Ragnar_7@gmx.de>
> To: <php-windows@lists.php.net>
> Sent: Monday, August 09, 2004 8:09 AM
> Subject: [PHP-WIN] file self check
>
>
> > Hi everyone,
> >
> > I was just wondering how one would write a php script that would check
> > itself, if it has been tempered with before running, and if it has would
> not
> > work.
> >
> > I have seen Perl scripts that work in such a why, that is you edit only
> 1
> > char in the file and it will not run anymore, but I couldn't figure out
> > how that was done.
> >
> > Anyone ever done this with PHP before? Is it even possible?
> >
> > cheers,
> >
> > Ben
> >
> > --
> > NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
> > GMX DSL = supergünstig & kabellos
> > http://www.gmx.net/de/go/dsl
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl