Guest User

Untitled

a guest
Feb 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. #A Script to kill users on a system repeatedly, essentially locking them out.
  4. #Meant to be run via SSH. Needs root privileges.
  5.  
  6. #Take in the account to NOT kill (aka the user running this script)
  7. my $account_to_save = @ARVG[0];
  8.  
  9. #Open a pipe from the who command
  10. open(WHOPROC, "| who");
  11.  
  12. #Loop through output of who command
  13. while(<WHOPROC>)
  14. {
  15. print $_;
  16. }
Add Comment
Please, Sign In to add comment