fix scanning script

This commit is contained in:
Torsten 2023-08-10 19:04:40 +03:00
parent 00363ab593
commit 4930cf2014
2 changed files with 82 additions and 64 deletions

View File

@ -2,78 +2,57 @@
10.20.20.33: 10.20.20.33:
:machine: Asus RT-AC51U :machine: Asus RT-AC51U
:host_name: 5_a_korfu_ap :host_name: 5_a_korfu_ap
10.20.20.34: 10.20.20.36:
:machine: Asus RT-AC51U :machine: TP-Link Archer C50 v6
:host_name: 2_d_5_ap :host_name: 5_b_sky1_ap
10.20.20.37: 10.20.20.37:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_hall_ap :host_name: 1_hall_ap
10.20.20.40: 10.20.20.40:
:machine: Asus RT-AC51U :machine: Asus RT-AC51U
:host_name: 1_sulka_rack_ap :host_name: 1_sulka_rack_ap
10.20.20.41:
:machine: Asus RT-AC51U
:host_name: 2_d_2_ap
10.20.20.42: 10.20.20.42:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 4_a_2_ap :host_name: 4_a_2_ap
10.20.20.43: 10.20.20.43:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link TL-WR841N v14
:host_name: 2_d_15 :host_name: 2_d_3_ap_vanha
10.20.20.44: 10.20.20.44:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_a_4_ap :host_name: 2_a_4_ap_vanha
10.20.20.45: 10.20.20.45:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_a_5_ap :host_name: 2_a_5_ap_vanha
10.20.20.46: 10.20.20.46:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_a_2_ap :host_name: 2_a_2_ap_vanha
10.20.20.47: 10.20.20.47:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_a_1_ap :host_name: 2_a_1_ap_vanha
10.20.20.48: 10.20.20.48:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_a_3_ap :host_name: 2_a_3_ap_vanha
10.20.20.49: 10.20.20.49:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_c_cowork_xi_ap :host_name: 3_c_1_ap
10.20.20.50: 10.20.20.50:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_a_1_ap_vanha :host_name: 3_c_2_ap
10.20.20.51: 10.20.20.51:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_a_2_ap_vanha :host_name: 3_c_3_ap
10.20.20.53: 10.20.20.53:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_k_shop_ap :host_name: 1_k_shop_ap
10.20.20.56: 10.20.20.54:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link Archer C50 v4
:host_name: 0_cellar_switch_cumulus :host_name: 5_a_mandala_ap
10.20.20.57: 10.20.20.57:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link TL-WR841N v14
:host_name: 3_c_cowork_wr_ap :host_name: 3_c_coworking_switch
10.20.20.59: 10.20.20.59:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link TL-WR841N v14
:host_name: 3_c_309_ap :host_name: 3_c_309_switch
10.20.20.60:
:machine: TP-Link TL-WR841N v14
:host_name: 1_nest_12_ap
10.20.20.61:
:machine: TP-Link TL-WR841N v14
:host_name: 1_nest_15_ap
10.20.20.62:
:machine: TP-Link TL-WR841N v14
:host_name: 1_nest_9_ap
10.20.20.63:
:machine: TP-Link TL-WR841N v14
:host_name: 1_nest_7_ap
10.20.20.64:
:machine: TP-Link TL-WR841N v14
:host_name: 1_nest_4_ap
10.20.20.65:
:machine: TP-Link TL-WR841N v14
:host_name: 1_nest_1_ap
10.20.20.66: 10.20.20.66:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link TL-WR841N v14
:host_name: 1_makers_146_ap :host_name: 1_makers_146_ap
@ -89,21 +68,15 @@
10.20.20.72: 10.20.20.72:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link TL-WR841N v14
:host_name: 1_b_110_ap :host_name: 1_b_110_ap
10.20.20.73:
:machine: TP-Link TL-WR841N v14
:host_name: 0_nest_rack_ap
10.20.20.74: 10.20.20.74:
:machine: TP-Link TL-WR841N v14 :machine: TP-Link TL-WR841N v14
:host_name: 5_b_hissi_ap :host_name: 5_b_hissi_ap
10.20.20.76:
:machine: TP-Link TL-WR841N v14
:host_name: 3_c_back_right_ap
10.20.20.80: 10.20.20.80:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_sulka_storage :host_name: 1_sulka_storage
10.20.20.84: 10.20.20.84:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_d_7_ap :host_name: 4_b_5_ap
10.20.20.85: 10.20.20.85:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 5_a_rt_ap :host_name: 5_a_rt_ap
@ -115,19 +88,19 @@
:host_name: 4_a_3_ap :host_name: 4_a_3_ap
10.20.20.92: 10.20.20.92:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_b_1_ap :host_name: 2_b_1_ap_vanha
10.20.20.93: 10.20.20.93:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_b_2_ap :host_name: 2_b_2_ap_vanha
10.20.20.94: 10.20.20.94:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_b_3_ap :host_name: 2_b_3_ap_vanha
10.20.20.95: 10.20.20.95:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_b_4_ap :host_name: 2_b_4_ap_vanha
10.20.20.96: 10.20.20.96:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2b_5_ap :host_name: 2_b_5_ap_vanha
10.20.20.98: 10.20.20.98:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_b_1_ap :host_name: 3_b_1_ap
@ -136,13 +109,13 @@
:host_name: 3_b_3_ap :host_name: 3_b_3_ap
10.20.20.100: 10.20.20.100:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_b_4_ap :host_name: 3_b_5_ap
10.20.20.101: 10.20.20.101:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_b_5_ap :host_name: 3_b_6_ap
10.20.20.102: 10.20.20.102:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_a_5_ap_vanha :host_name: 2_a_6_ap_vanha
10.20.20.103: 10.20.20.103:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_b_2_ap :host_name: 3_b_2_ap
@ -151,10 +124,10 @@
:host_name: 3_a_1_ap :host_name: 3_a_1_ap
10.20.20.105: 10.20.20.105:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_a_4_ap_vanha :host_name: 3_b_4_ap
10.20.20.106: 10.20.20.106:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 1_a_3_ap_vanha :host_name: 4_b_6_ap
10.20.20.107: 10.20.20.107:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_a_5_ap :host_name: 3_a_5_ap
@ -167,21 +140,66 @@
10.20.20.110: 10.20.20.110:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 3_a_2_ap :host_name: 3_a_2_ap
10.20.20.111:
:machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 4_b_4_ap
10.20.20.112: 10.20.20.112:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_c_1_ap :host_name: 4_b_3_ap
10.20.20.113:
:machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 4_a_5_ap
10.20.20.114: 10.20.20.114:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 4_a_4_ap :host_name: 4_a_4_ap
10.20.20.115: 10.20.20.115:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_c_5_ap :host_name: 3_c_4_ap
10.20.20.116: 10.20.20.116:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 2_c_4_ap :host_name: 4_b_2_ap
10.20.20.117: 10.20.20.117:
:machine: Xiaomi Mi Router 4A Gigabit Edition :machine: Xiaomi Mi Router 4A Gigabit Edition
:host_name: 4_b_1_ap
10.20.20.119:
:machine: Xiaomi Mi Router 4A (100M International Edition)
:host_name: 1_a_6_ap
10.20.20.121:
:machine: Xiaomi Mi Router 4A (100M International Edition)
:host_name: 1_a_2_ap
10.20.20.122:
:machine: Xiaomi Mi Router 4A (100M International Edition)
:host_name: 1_a_1_ap
10.20.20.123:
:machine: Xiaomi Mi Router 4A (100M International Edition)
:host_name: 1_a_3_ap
10.20.20.124:
:machine: Xiaomi Mi Router 4A (100M International Edition)
:host_name: 1_a_4_ap
10.20.20.125:
:machine: Xiaomi Mi Router 4A (100M International Edition)
:host_name: 1_a_5_ap
10.20.20.128:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_d_3_ap
10.20.20.129:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_c_3_ap :host_name: 2_c_3_ap
10.20.20.130:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_c_2_ap
10.20.20.131:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_c_1_ap
10.20.20.132:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_b_6_ap
10.20.20.134:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_d_2_ap
10.20.20.135:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_c_4_ap
10.20.20.136:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_d_1_ap
10.20.20.137:
:machine: Xiaomi Mi Router 4A (100M International Edition V2)
:host_name: 2_d_4_ap

View File

@ -5,7 +5,7 @@ class Routers
@@start_address = "10.20.20." @@start_address = "10.20.20."
@@start_at = 32 @@start_at = 32
@@stop_at = 130 @@stop_at = 140
def initialize def initialize
@at = @@start_at @at = @@start_at
@ -50,8 +50,8 @@ class Routers
if connection.is_a?(String) if connection.is_a?(String)
message = connection message = connection
else else
info[ip] = get_info(connection) message = machine(connection)
message = info[ip][:machine] info[ip] = {machine: message , host_name: admin_name(connection)}
end end
puts "#{ip} = #{message}" puts "#{ip} = #{message}"
end end