Skip to content

Instantly share code, notes, and snippets.

@ransomw
Last active July 3, 2017 11:54
Show Gist options
  • Save ransomw/57bc3891194db89996bf73335ab17be4 to your computer and use it in GitHub Desktop.
Save ransomw/57bc3891194db89996bf73335ab17be4 to your computer and use it in GitHub Desktop.
capture portal (01)

wicd + wicd-curses / iw + dhclient

attempts at connecting to a capture portal for login via web browser with two different client setups, or what happened when wicd didn't ''just work''

iw + dhclient

# iw dev wlan0 connect -w "$host"
wlan0 (phy #0): connected to 4a:f8:b3:ce:36:17
# dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/b8:ee:65:2a:0d:7d
Sending on   LPF/wlan0/b8:ee:65:2a:0d:7d
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST of 192.168.3.109 on wlan0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.3.109 from 192.168.3.1
DHCPACK of 192.168.3.109 from 192.168.3.1
suspect value in host_name option - discarded
bound to 192.168.3.109 -- renewal in 1694 seconds.
$ ping debian.org
PING debian.org (140.211.166.202) 56(84) bytes of data.

wicd + wicd-curses

wicd.log

36:34 :: Connecting to wireless network <host>
36:36 :: Putting interface down
36:36 :: Releasing DHCP leases...
36:36 :: Setting false IP...
36:36 :: Stopping wpa_supplicant
36:36 :: Flushing the routing table...
36:36 :: Putting interface up...
36:38 :: Running DHCP with NO hostname
36:38 :: Internet Systems Consortium DHCP Client 4.3.5
36:38 :: Copyright 2004-2016 Internet Systems Consortium.
36:38 :: All rights reserved.
36:38 :: For info, please visit https://www.isc.org/software/dhcp/
36:38 ::
36:38 :: Listening on LPF/wlan0/b8:ee:65:2a:0d:7d
36:38 :: Sending on   LPF/wlan0/b8:ee:65:2a:0d:7d
36:38 :: Sending on   Socket/fallback
36:38 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
36:43 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
36:48 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
36:55 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
37:08 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
37:25 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
37:36 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
37:39 :: No DHCPOFFERS received.
37:39 :: No working leases in persistent database - sleeping.
37:48 :: DHCP connection failed
37:48 :: exiting connection thread
37:51 :: Sending connection attempt result dhcp_failed
$ ping debian.org
ping: debian.org: Temporary failure in name resolution

BSS

<edited> iw dev wlan0 scan snippet

BSS 4a:f8:b3:ce:36:17(on wlan0)
	TSF: 0 usec (0d, 00:00:00)
	freq: 2437
	beacon interval: 100 TUs
	capability: ESS ShortPreamble ShortSlotTime RadioMeasure (0x1421)
	signal: -42.00 dBm
	last seen: 0 ms ago
	SSID: <host>
	Supported rates: 1.0* 2.0* 5.5* 11.0* 18.0 24.0 36.0 54.0 
	DS Parameter set: channel 6
	ERP: Barker_Preamble_Mode
	Extended supported rates: 6.0 9.0 12.0 48.0 
	BSS Load:
		 * station count: 0
		 * channel utilisation: 51/255
		 * available admission capacity: 0 [*32us]
	HT capabilities:
		Capabilities: 0x2d
			RX LDPC
			HT20
			SM Power Save disabled
			RX HT20 SGI
			No RX STBC
			Max AMSDU length: 3839 bytes
			No DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 4 usec (0x05)
		HT RX MCS rate indexes supported: 0-23
		HT TX MCS rate indexes are undefined
	HT operation:
		 * primary channel: 6
		 * secondary channel offset: no secondary
		 * STA channel width: 20 MHz
		 * RIFS: 1
		 * HT protection: nonmember
		 * non-GF present: 1
		 * OBSS non-GF present: 1
		 * dual beacon: 0
		 * dual CTS protection: 0
		 * STBC beacon: 0
		 * L-SIG TXOP Prot: 0
		 * PCO active: 0
		 * PCO phase: 0
	Overlapping BSS scan params:
		 * passive dwell: 20 TUs
		 * active dwell: 10 TUs
		 * channel width trigger scan interval: 300 s
		 * scan passive total per channel: 200 TUs
		 * scan active total per channel: 20 TUs
		 * BSS width channel transition delay factor: 5
		 * OBSS Scan Activity Threshold: 0.25 %
	Extended capabilities: HT Information Exchange Supported, Extended Channel Switching
	WMM:	 * Parameter version 1
		 * u-APSD
		 * BE: CW 15-1023, AIFSN 3
		 * BK: CW 15-1023, AIFSN 7
		 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
		 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment