Needful Things‎ > ‎

The hunt for phpinfo.php

Got a metric shit ton of servers and need to check for phpinfo.php files existence ? 
How about a oneliner to get'er done ?

Make a target file in the format of:

https://IP:PORT
http://IP:PORT



for x in $(cat ./target); do wget --no-check-certificate -T 2 -t 1 -O `echo $x | sed -r "s/http(s|)\:\/\/(.*)\:(.*)/\2/g"`.phpinfo.php $x/phpinfo.php ; done



Then you need to look at any files which downed from this script ? Well thats the easy part -



grep phpinfo ./*.php 



Winning!
Comments