Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I spent a great deal of time using index.php and README as filename parameters, and using the contents of those files as the password attempt. This attack worked in my local environment, but not on the live ctf. It took a while to realize that `file_get_contents('nonexistent') === ''`, raising no exceptions.


I used README and just manually stripped out all the whitespace. It worked fine. But a non-existent file is way more elegant I suppose.


file_get_contents('nonexistent') actually returns false, but calling trim() on that coerced it into an empty string.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: