Compare commits
2 Commits
4f00bccbe5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| fc15f8fff7 | |||
| 59f1607812 |
@@ -2,7 +2,7 @@
|
||||
<?php
|
||||
$jsonFile = '/opt/html/online.json';
|
||||
|
||||
$activeUsers = shell_exec("ps -eo user=,comm= | awk '$2 ~ /sshd/ {print $1}' | sort -u");
|
||||
$activeUsers = shell_exec("ps -eo user=,comm= | awk '$2 ~ /sshd/ {print $1}' | grep -vE 'sshd|root' | sort -u");
|
||||
|
||||
$activeUsersArray = array_filter(explode("\n", $activeUsers));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user