Airport Konfigurieren

From C4 Wiki
Jump to: navigation, search


Airports finden[edit]

in Python:

import socket 
import struct 

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) 
s.sendto('\001' + ('\000' * 115), ('172.17.0.255', 192)) 

(data, addr) = s.recvfrom(999) 
ip = addr[0] 
if len(data) != 116: 
    print "%s, weird len %d (%r)\n" % (ip, len(data), data) 

ap_name = [] 
for c in data[0x30:]: 
    if c == '\0': 
        break 
    ap_name.append(c) 
ap_name = .join(ap_name) 

vendor = [] 
for c in data[0x54:]: 
    if c == '\0': 
        break 
    vendor.append(c) 
vendor = .join(vendor) 

mac = [] 
for c in data[0x24:0x2a]: 
    mac.append(hex(ord(c))[2:]) 
mac = ':'.join(mac) 

print repr(ap_name), repr(vendor), repr(mac), repr(data) 

vergleiche auch airconf unter http://c0re.jp/c0de/airconf/


Airport 2 (White)[edit]

Der Airport 2 ist ganz anders als das Vorgängermodell: VxWorks anstatt KarlNet, andere Konfiguration.

The configuration works by creation of several TCP Connections from the host to Base Port 5009. I found no known use for port 5009.