Align default hostname with MAC device profiles for OPSEC consistency
This commit is contained in:
+63
-2
@@ -227,9 +227,70 @@ DEFAULT_DEVICE_ID="bb-$(cat /proc/sys/kernel/random/uuid | cut -c1-8)"
|
||||
prompt_default device_id "Device label (e.g. bb-a3f2c1)" "$DEFAULT_DEVICE_ID"
|
||||
DEVICE_ID="$device_id"
|
||||
|
||||
# Hostname
|
||||
# Hostname — pick from MAC device profiles (matches MAC identity)
|
||||
step "Hostname"
|
||||
DEFAULT_HOSTNAME="node-$(cat /proc/sys/kernel/random/uuid | cut -c1-6)"
|
||||
PROFILE_NAMES=(
|
||||
"Fire TV Stick 4K|amazon-firetv"
|
||||
"Fire TV Stick Lite|amazon-lite"
|
||||
"Fire TV Cube|amazon-cube"
|
||||
"Roku Ultra|roku-ultra"
|
||||
"Roku Express|roku-express"
|
||||
"Chromecast|chromecast"
|
||||
"Chromecast with Google TV|chromecast-gtv"
|
||||
"Apple TV 4K|apple-tv-4k"
|
||||
"Apple TV HD|apple-tv-hd"
|
||||
"Samsung Smart TV|samsung-tv"
|
||||
"Samsung QLED TV|samsung-qled"
|
||||
"LG webOS TV|lg-tv-webos"
|
||||
"LG OLED TV|lg-tv-oled"
|
||||
"Vizio SmartCast TV|vizio-tv"
|
||||
"TCL Roku TV|tcl-tv"
|
||||
"Sony Bravia Android TV|sony-tv"
|
||||
"Sonos One|sonos-one"
|
||||
"Sonos Beam|sonos-beam"
|
||||
"Google Home Mini|google-home"
|
||||
"Google Nest Hub|google-nest"
|
||||
"Echo Dot|echo-dot"
|
||||
"Echo Show|echo-show"
|
||||
"Ring Doorbell|ring-doorbell"
|
||||
"Nest Thermostat|nest-thermo"
|
||||
"Nest Protect|nest-protect"
|
||||
"Philips Hue Bridge|philips-hue"
|
||||
"TP-Link Kasa Smart Plug|tplink-kasa"
|
||||
"Wyze Cam v3|wyze-cam"
|
||||
"Ecobee Thermostat|ecobee-thermo"
|
||||
"Roomba i7|roomba-i7"
|
||||
"Roomba j7|roomba-j7"
|
||||
"Raspberry Pi IoT Sensor|raspberrypi-sensor"
|
||||
"Raspberry Pi IoT Gateway|raspberrypi-gateway"
|
||||
"Raspberry Pi IoT Controller|raspberrypi-ctrl"
|
||||
"HP LaserJet Pro|hp-laserjet"
|
||||
"HP OfficeJet Pro|hp-officejet"
|
||||
"Brother HL-L2350DW|brother-hl"
|
||||
"Brother MFC-L2750DW|brother-mfc"
|
||||
"Brother DCP-L2550DW|brother-dcp"
|
||||
"Epson EcoTank ET-4760|epson-ecotank"
|
||||
"Canon PIXMA G6020|canon-pixma"
|
||||
"Xbox Series X|xbox-series-x"
|
||||
"PlayStation 5|ps5"
|
||||
"PlayStation 4|ps4"
|
||||
"Nintendo Switch|nintendo-switch"
|
||||
"iPhone 15 Pro|iphone-15"
|
||||
"iPad Air|ipad-air"
|
||||
"Galaxy Tab S9|galaxy-tab"
|
||||
"Galaxy S24|galaxy-s24"
|
||||
"UniFi AP|unifi-ap"
|
||||
"USG Gateway|usg-gateway"
|
||||
"TP-Link Archer AX50|archer-ax50"
|
||||
"TP-Link Deco M5|deco-m5"
|
||||
"Netgear Orbi|orbi"
|
||||
"Netgear Nighthawk|nighthawk"
|
||||
)
|
||||
PROFILE_IDX=$(( RANDOM % ${#PROFILE_NAMES[@]} ))
|
||||
SELECTED_PROFILE="${PROFILE_NAMES[$PROFILE_IDX]}"
|
||||
PROFILE_DISPLAY="${SELECTED_PROFILE%%|*}"
|
||||
DEFAULT_HOSTNAME="${SELECTED_PROFILE##*|}"
|
||||
echo -e " Profile: ${BOLD}${PROFILE_DISPLAY}${NC}"
|
||||
prompt_default bb_hostname "Hostname" "$DEFAULT_HOSTNAME"
|
||||
BB_HOSTNAME="$bb_hostname"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user