⚝
One Hat Cyber Team
⚝
Your IP:
3.139.239.109
Server IP:
15.204.235.159
Server:
Linux srv.techlup.co.ke 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
thread-self
/
root
/
usr
/
share
/
cockpit
/
motd
/
Edit File: update-motd
#!/bin/sh -e # syntax: update-motd [port [hostname [ipaddr [protocol]]]] # each argument can be given as the empty string to use the default # port number from cmdline, then systemctl file, then 9090 # take the last Listen line; this will be the user-specified one port=${1:-$(systemctl show --property Listen cockpit.socket | sed -E '$!d;$s/.*[^0-9]([0-9]+).*/\1/;')} port=${port:-9090} # hostname from cmdline, then `hostname -f` hostname=${2:-$(hostname -f || hostname)} # ip addr from cmdline, then default route source addr ip=${3:-$(ip -o route get 255.0 2>/dev/null | sed -e 's/.*src \([^ ]*\) .*/\1/')} # protocol from cmdline, then https protocol=${4:-https} hostname_url="${protocol}://${hostname}:${port}/" ip_url="${ip:+ or ${protocol}://${ip}:${port}/}" printf 'Web console: %s%s\n\n' "${hostname_url}" "${ip_url}" > /run/cockpit/active.motd
Simpan