forked from arm0red/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sysinfo
executable file
·57 lines (44 loc) · 1.87 KB
/
sysinfo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
clear
# _____ _
# | _ | | |
# __ _ _ __ _ __ ___ | |/' | _ __ ___ __| |
# / _` | '__| '_ ` _ \| /| || '__/ _ \/ _` |
# | (_| | | | | | | | \ |_/ /| | | __/ (_| |
# \__,_|_| |_| |_| |_|\___(_)_| \___|\__,_|
base64 -d <<<"H4sIAAAAAAAAA22NQQoAIQhF957CXQ0MeKHgdxAPP1+tWUSKEs+nqV4DESdTlbvtOfSDeeo8k7kb
iyNr7D9gW7opJl8tQINOOoN3jeOkFmBJwuq56PVd5VCnZovHSt/XB/DCEXqgKkJ0PEHj6SWpyAe/
8We1GwEAAA==" | gunzip
echo -e "\e[31;1m ***** \e[34;1m arm0.red Security \e[31;1m *****\e[0m"
echo -e "\e[31;1m ***** \e[34;1m System Info v2.1 \e[31;1m *****\e[0m"
echo ""
# This script will return the following set of system information:
# Hostname information:
echo -e "\e[31;1m ***** \e[34;1m HOSTNAME INFORMATION \e[31;1m *****\e[0m"
hostnamectl
# File system disk space usage:
echo -e "\e[31;1m ***** \e[34;1m FILE SYSTEM DISK SPACE USAGE \e[31;1m *****\e[0m"
df -h
# Free and used memory in the system:
echo -e "\e[31;1m ***** \e[34;1m FREE AND USED MEMORY \e[31;1m *****\e[0m"
free -h
# System uptime and load:
echo -e "\e[31;1m ***** \e[34;1m SYSTEM UPTIME AND LOAD \e[31;1m *****\e[0m"
uptime
# Logged-in users:
echo -e "\e[31;1m ***** \e[34;1m CURRENTLY LOGGED-IN USERS \e[31;1m *****\e[0m"
who
# Top 5 processes as far as memory usage is concerned
echo -e "\e[31;1m ***** \e[34;1m TOP 5 MEMORY-CONSUMING PROCESSES \e[31;1m *****\e[0m"
ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6
# Default Gateway
echo -e "\e[31;1m ***** \e[34;1m Default Gateway \e[31;1m *****\e[0m"
ip route | grep 'default' | awk '{print $3}'
# Private IP
echo -e "\e[31;1m ***** \e[34;1m Private IP \e[31;1m *****\e[0m"
ip a | grep 'inet' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{print $2}'
# Public IP
echo -e "\e[31;1m ***** \e[34;1m Public IP \e[31;1m *****\e[0m"
curl https://ipv4.icanhazip.com
echo ""
echo -e "\e[1;32mDone.\e[0m"