This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JJ Asghar
committed
Jul 30, 2012
1 parent
802b9f1
commit 7a1b5c6
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/local/bin/bash | ||
PROCCOUNT=`ps -Afl | wc -l` | ||
PROCCOUNT=`expr $PROCCOUNT - 5` | ||
NIC=em0 | ||
IPADDY=`ifconfig $NIC | grep inet | awk -F " " '{print $2}' | grep -v ::` | ||
DATE=`date +%F` | ||
EPOCH=`date +%s` | ||
|
||
echo -e " | ||
################################################################################# | ||
WARNING:- YOU MUST HAVE PRIOR AUTHORIZATION TO ACCESS THIS SYSTEM. ALL | ||
CONNECTIONS ARE LOGGED AND MONITORED. BY CONNECTING TO THIS SYSTEM YOU FULLY | ||
CONSENT TO ALL MONITORING. UN-AUTHORIZED ACCESS OR USE WILL BE PROSECUTED TO | ||
THE FULL EXTENT OF LAW. YOU HAVE BEEN WARNED | ||
################################################################################# | ||
" | ||
|
||
echo -e " | ||
+++++++++++++++++++++++++++++++++: System Data :++++++++++++++++++++++++++++++++++ | ||
+ hostname = `hostname` | ||
+ address = $IPADDY | ||
+ os type = `uname -s` | ||
+ kernel = `uname -r` | ||
+ uptime = `uptime | sed 's/.*up ([^,]*), .*/1/'` | ||
++++++++++++++++++++++++++++++++: User Data :+++++++++++++++++++++++++++++++++++++ | ||
+ username = `whoami` | ||
+ processes = $PROCCOUNT of `ulimit -u` | ||
+++++++++++++++++++++++++++: Helpful Information :++++++++++++++++++++++++++++++++ | ||
+ admin = [email protected] | ||
+ date = $DATE | ||
+ epoch = $EPOCH | ||
+++++++++++++++++++++++++: Maintenance Information :++++++++++++++++++++++++++++++ | ||
+ `cat /etc/motd-maint` | ||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
" |