new patterns

This commit is contained in:
Palma Solutions LTD
2018-01-05 13:38:46 +01:00
parent 0c706512b4
commit 24104dcced
2 changed files with 12 additions and 1 deletions

10
sc.php
View File

@@ -152,6 +152,16 @@ system ("w | grep load");
system('find '.$GLOBALS["webroot"].' -type f -name "error_log" -print -exec rm -rfv {} \;'); // clear the error logs
}
function passgen(){
$caracteres = '0123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$#@!?=%-+*.[]{}_,;:<>|';
$caractereslong = strlen($caracteres);
$clave = '';
for($i = 0; $i < 24; $i++) {
$clave .= $caracteres[rand(0, $caractereslong - 1)];
}
echo $clave;
}
/* function removezero(){
system("find ./ -type f -empty -print -exec rm -f {} \;");