miércoles, 10 de mayo de 2017

simple log remote host dynip's

puship.php


//  simple log remote host dynip's
//  http://7.7.7.7/puship/puship.php?xx33ss

$validhosts=array("xx33ss","a343kka","XXdc");

$host=$_SERVER["QUERY_STRING"];

if (in_array($host,$validhosts)) {
    file_put_contents("$host.txt",$_SERVER['REMOTE_ADDR'].date("  Y-m-d H:i:s"));
}




in server with dinamic ip

/etc/cron.hourly
push_ip.sh

lynx  -dump http://7.7.7.7/puship/puship.php?xx33ss


it make
http://7.7.7.7/puship/xx33ss.txt



No hay comentarios: