xhark

Patch pfSense <2.3 - Affichage hostname sur form de login

Oct 6th, 2017
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $authfile = '/etc/inc/authgui.inc' ;
  2. $page = file_get_contents($authfile);
  3.  
  4. $search = 'value="<?=gettext("Login"); ?>" tabindex="3" />';
  5. $replace = $search . " sur <strong><?=\$config['system']['hostname']; ?></strong>";
  6.  
  7. $result = str_replace($search,$replace,$page);
  8.    
  9. if (file_put_contents($authfile,$result)) echo '  ✔ patch affichage hostname ok!';
RAW Paste Data