Sto effettuando delle indagini sullo sviluppo di captive portal wifi.
Vorrei acquisire i tag XML WiSPr da un captive portal di autenticazione FON (i miei vicini lo hanno attivo, ho anche un account di roaming per quello).
Cercare di autenticarsi su un iPhone o anche su un Mac non lo interrompe, poiché l'apparecchiatura rileva i tag captive portal/WIPr e apre una finestra/mini-browser dedicata senza alcun controllo; il tentativo di aprire la pagina su un Linux/*BSD potrebbe non funzionare poiché l'agente utente del browser / o il comportamento non verrà riconosciuto come iPhone/Apple.
Anche lo sniffare la transazione dell'iPhone non la interrompe, poiché la pagina di accesso Web del captive portal è gestita in https/TLS (ad esempio è crittografata sul filo).
Ho anche provato sysdig
in un Linux, e ovviamente ha colpito ancora la testa sulle trasmissioni crittografate.
wget
inoltre non sta ottenendo risultati soddisfacenti.
Cosa fare?
Risposta accettata:
Ho finito per usare lynx
in un sistema FreeBSD; inizialmente usava il -dump
opzione, che permetteva di vedere i reindirizzamenti, ma solo l'output e non i contenuti; quindi scoperto il -source
opzione, che mostra il sorgente/HTML e non tenta di renderizzarlo.
Ho anche usato l'opzione -useragent
di fingere di essere un iPhone che fa la scoperta WISPr, e ho anche provato a ottenere una delle pagine che l'iPhone cerca di scoprire se ha a che fare con un captive portal (http://www.apple.com/library/test/sucess.html).
Ho anche dovuto affrontare il fatto che il captive portal FON è autofirmato (?), o il mio FreeBSD non conosce il certificato radice SSL sottostante. (Non ho perso molto tempo a rintracciarlo); Ho dovuto solo configurare lynx per accettare i certificati autofirmati (scriverò la domanda in seguito e avrà un collegamento qui).
Quindi i comandi effettivi che ho usato dove:
lynx -useragent=CaptiveNetworkSupport -dump http://www.apple.com/library/test/sucess.html
e tuttavia, mentre il primo ha la sua utilità, quello che mi interessava di più era:
lynx -useragent=CaptiveNetworkSupport -source http://www.apple.com/library/test/sucess.html
Usando quest'ultima riga di comando, mi ha restituito il sorgente HTML nella sua piena gloria con i tag WISPr incorporati.
Da man lynx
-dump dumps the formatted output of the default document or those specified on the command line to standard output. Unlike interactive mode, all documents are processed. This can be used in the following way: lynx -dump http://www.subir.com/lynx.html Files specified on the command line are formatted as HTML if their names end with one of the standard web suffixes such as ".htm" or ".html". Use the -force_html option to format files whose names do not follow this convention. -source works the same as dump but outputs HTML source instead of formatted text. For example lynx -source . >foo.html generates HTML source listing the files in the current directory. Each file is marked by an HREF relative to the parent directory. Add a trailing slash to make the HREF's relative to the current directory: lynx -source ./ >foo.html
preso dalla pagina di accesso acquisita:
<!-- WISPr message -->^M
<span class="displayNone"><!--<?xml version="1.0" encoding="UTF-8"?>^M
<WISPAccessGatewayParam xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.acmewisp.com/WISPAccessGatewayParam.xsd">^M
<Redirect>^M
<AccessProcedure>1.0</AccessProcedure>^M
<LoginURL>https://xxxx/captive/noswifi?hmac=xxxx&res=notyet&uamip=xxxx&uamport=80&userurl=&challenge=xxxxxxe&nasid=BC-14-01-XX-XX-XX&mac=00-15-AF-XX-XX-XX</LoginURL>^M
<AbortLoginURL>http://xxxx:80/captive/logoff</AbortLoginURL>^M
<MessageType>100</MessageType>^M
<ResponseCode>0</ResponseCode>^M
<AccessLocation>FonZON:PT</AccessLocation>^M
</Redirect>^M
</WISPAccessGatewayParam>-->^M
</span>