File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 760760user@1000.service
761761wpa_supplicant.service'
762762
763- users=' drwho
763+ users=' whiteteam
764+ blackteam
765+ grayteam
766+ grayteam
767+ dd-dog
768+ datadog
769+ drwho
764770martymcFly
765771arthurdent
766772sambeckett
769775theflash
770776tonystark
771777drstrange
772- bartallen
773- whiteteam'
778+ bartallen'
774779
775780function get_key {
776781 IFS= read -r -n1 -s key
911916finished=false
912917
913918while [[ $finished == false ]]; do
914- select_option ' services' ' users' ' packages' ' integrity' ' stop services' ' lock users' ' remove packages' ' reinstall packages' ' clone' ' test' ' exit'
919+ select_option ' inventory ' ' services' ' users' ' packages' ' integrity' ' stop services' ' lock users' ' remove packages' ' reinstall packages' ' clone' ' test' ' exit'
915920 clear
916921 case " $selection " in
922+ ' inventory' )
923+ header " inventory of $hostname "
924+ subh ' users'
925+ cat /etc/passwd | cut -d " :" -f 1 | tr ' \n' ' '
926+ echo
927+ echo
928+ subh ' hostname'
929+ hostname
930+ echo
931+ subh ' ip'
932+ hostname -i
933+ echo
934+ subh ' operating system'
935+ source /etc/os-release
936+ echo " $NAME "
937+ echo
938+ subh ' version'
939+ echo " $VERSION "
940+ echo
941+
942+ subh ' open ports'
943+ ss -tuln | awk ' {print $5}'
944+ get_key
945+ ;;
917946 ' services' )
918947 display ' services' " $( systemctl list-units --type=service --state=running --no-pager --quiet | cut -d " " -f 3) " " ${! services} "
919948 ;;
920949 ' users' )
921- display ' unlocked users' " $( sudo cat /etc/shadow | grep -Ev ' :\ !|:\*' | cut -d ' :' -f 1) " " $users "
950+ display ' unlocked users' " $( sudo cat /etc/shadow | grep -Ev ' :!|:\*' | cut -d ' :' -f 1) " " $users "
922951 ;;
923952 ' packages' )
924953 if [[ " $os " == ' redhat' ]]; then
You can’t perform that action at this time.
0 commit comments