Discussion Hotspot Login Manager

Tags: #<Tag:0x00007f63f424f130> #<Tag:0x00007f63f424ee38>

Je suis avec intérêt, et si possible je participerai avec mes faibles connaissances en python (bon choix au passage! :slightly_smiling: ). Désolé, mais pour l’instant, le temps me fait défaut.

(et purée, c’est intimidant de voir le code que tu as déja effectué! :wink: )

[quote=“thuban”](et purée, c’est intimidant de voir le code que tu as déja effectué! :wink: )[/quote][code]# Most code in this module has been borrowed from python-wifi 0.5.0 by Roman Joost / Sean Robinson (which is licensed under GPL too).

We definitely don’t need the full IW API, so depending on a third party library makes no sense.[/code]

:wink:
J’ai juste extrait le code pour le SSID à partir d’une lib beaucoup plus touffue (trop, pour les besoins du projet). Bon, mes connaissances en Python étant ce qu’elles sont ça m’a quand même pris 2 bonnes heures à faire le tri là-dedans et à le refaire marcher isolé du reste, mais chut faut pas le dire… :005

Je crée ce fil de discussion à propos de l’équivalent pour Linux de “FreeWifi Manager” sur lequel je bosse en ce moment, pour séparer “proprement” les annonces disponibles ici des discussions proprement dites.

J’ai le temps pour ça ^^
Alors, pour un SFR WiFi Public (qui est le même que neuf normalement… à vérifier) :

[code]<?xml version="1.0" encoding="UTF-8"?>

Portail Captif Communautaire SFR WiFi
<!--SFRLoginURL_JIL=https://hotspot.neuf.fr/indexEncryptingChilli.php?res=notyet&uamip=192.168.2.1&uamport=3990&challenge=1c367ac0c82aedfd5a70d89ee5f23292&userurl=http%3a%2f%2fwww.net2ftp.com%2f&nasid=00-25-15-ed-92-2b&mac=70-1A-04-E7-79-DD&mode=3&channel=0-->
    <style type="text/css">
        html,body{font-family:Arial;font-size:14px;margin:0;padding:0;}img{border:none;}.headerSFR{height:69px;margin-top:20px;margin-right:20px;margin-left:20px;}.ligne-rouge{width:946px;height:6px;background-color:#e2001a;margin-left:auto;margin-right:auto;}.headerSFR .gauche{height:66px;width:148px;top:35px;position:absolute;}.headerSFR .droite{height:66px;width:650px;top:50px;position:absolute;font-size:30px;padding-left:180px;}.headerSFR .fleche{height:47px;width:77px;top:195px;position:absolute;font-size:18px;padding-left:525px;}.rouge{color:#e2001a;}.authentBloc{width:340px;height:385px;border:2px #d1d1d1 solid;border-top:#e2001a 6px solid;margin:25px;}.authentBloc .titre{font-size:18px;text-align:center;padding-top:10px;}.authentBloc .identifiant{font-size:12px;margin-top:10px;background-color:#f2f2f2;padding:10px 10px 10px 20px;}.authentBloc .connexion{padding-right:10px;text-align:right;font-size:12px;}.authentBloc .infos{height:90px;width:340px;margin:13px;}.authentBloc .infos .image{position:relative;width:23px;height:33px;top:15px;left:10px;}.authentBloc .infos .texte{position:relative;width:270px;height:70px;top:-20px;left:40px;font-size:12px;}.authentBloc .infos .texte strong{font-size:14px;}.authentBloc .infos .plusInfos{position:relative;width:270px;height:10px;top:-45px;left:40px;font-size:12px;text-align:right!important;}.infosBloc{width:540px;height:390px;border:1px #d1d1d1 solid;margin:25px 25px 0;}.infosBloc .titre{color:#e2001a;font-weight:700;font-size:24px;text-align:right;margin-right:30px;margin-top:20px;margin-bottom:10px;}.infosBloc .liste{margin-right:30px;font-size:14px;margin-top:20px;margin-left:30px;color:#e2001a;list-style-type:square;}.infosBloc .liste li{margin-bottom:20px;padding:0;}.infosBloc .promo{font-size:13px;padding-left:8px;padding-top:10px;}.infosBloc .promo .bloc{float:left;border:2px #d1d1d1 solid;border-top:#e2001a 6px solid;width:150px;height:165px;margin:0 10px;}.infosBloc .promo .bloc h1{font-weight:700;font-size:13px;margin:0;padding:5px;}.infosBloc .promo .bloc .texte{float:left;width:92px;padding-left:5px;}.infosBloc .promo .bloc .image{float:left;width:48px;text-align:center;margin-right:5px;}.infosBloc .promo .bloc .lien{background-color:#f2f2f2;height:30px;text-align:right;width:100%;margin:0;padding:0;}.infosBloc .promo .bloc .lien .texteL{float:left;width:102px;padding-top:7px;}.infosBloc .promo .bloc .lien .imageL{float:left;padding-top:8px;text-align:left;padding-left:5px;}.infosBloc .promo .bloc .lien a{color:#000;text-decoration:none;font-weight:700;}.footerBloc{text-align:right;padding-right:30px;color:#a1a1a1;padding-bottom:5px;}.footerBloc a{text-decoration:none;color:#a1a1a1;}.boutonC{width:95px;height:23px;color:#FFF;font-weight:700;font-size:15px;border:none;vertical-align:middle;}.voile{z-index:10000;top:0;position:absolute;width:100%;height:100%;background-color:#000;filter:alpha(opacity=50);opacity:0.5;-moz-opacity:0.5;display:none;}.box{width:500px;height:200px;background-color:#FFF;border:5px #d1d1d1 solid;z-index:10001;position:absolute;display:none;margin:0 auto;}.box .fermer{text-align:right;margin:0;padding:0 0 10px;}.box .fermer a{font-size:14px;cursor:pointer;}#aideDiv{display:none;}#aideContenu{width:600px;height:340px;background-color:#d1d1d1;font-size:14px;line-height:30px;text-align:left!important;overflow:auto;margin-top:20px;}#aideContenu p{margin:0;padding:0 0 0 30px !important;}.sprite-ampoule{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 0;width:23px;height:33px;}.sprite-cle3g{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -43px;width:31px;height:69px;margin-left:10px;}.sprite-connexion{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -122px;width:95px;height:23px;}.sprite-en{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -155px;width:16px;height:11px;}.sprite-fermer{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -176px;width:112px;height:38px;}.sprite-fleche-rouge{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -224px;width:10px;height:16px;}.sprite-flecheG{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -250px;width:47px;height:77px;}.sprite-fr{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -337px;width:16px;height:11px;}.sprite-ligne-grise{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -358px;width:314px;height:1px;}.sprite-mobiles{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -369px;width:48px;height:65px;}.sprite-puce{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -444px;width:3px;height:5px;float:left;margin-top:5px}.sprite-sfr-wifi{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -459px;width:148px;height:66px;}.sprite-tablette{background:url(../../i/sprites-3-pc.png) no-repeat top left;background-position:0 -535px;width:40px;height:52px;}.authentBloc a,#p1 ul li span,#p2 ul li span,#p3 ul li span{color:#000;}.authentBloc .motdepasse,.authentBloc .cond{font-size:12px;padding:10px 10px 10px 20px;}.authentBloc .connexion a,.authentBloc .infos .plusInfos a{color:#000;text-decoration:none;}#p1,#p2,#p3{line-height:normal;}#p1 p,#p2 p,#p3 p{margin:0;padding:0 0 0 45px !important;}#p1 ul,#p2 ul,#p3 ul{margin-top:0;margin-bottom:0;list-style-type:square;color:#e2001a;}#p1 ul li,#p2 ul li,#p3 ul li{margin:0 0 0 45px !important;padding:0;}
    </style>
</head>

<body>
	<!--version>5.1b - PCNB4 - {26/08/2011}</version-->
    <table border="0" cellpadding="0" cellspacing="0" width="900" align="center" style="border: 1px #d1d1d1 solid;margin-top:20px">
        <tr>
            <td colspan="2">

                <div class="headerSFR">
                    <div class="gauche"><div class="sprite-sfr-wifi"></div></div>
                    <div class="droite">vous accompagne, l&agrave; o&ugrave; vous en avez besoin.</div>
                    <div class="fleche"><div class="sprite-flecheG"></div></div>
                </div>
                <div style="width:100%; text-align: center">

                    <div class="ligne-rouge"></div>
                </div>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <div class="infosBloc">
                    <div class="titre"> Avec SFR WiFi, surfez en illimit&eacute; </div>

                    <ul class="liste">
                        <li><span style="color:black">Plus de 3 millions de Hotspots partout en France</span></li>
                        <li><span style="color:black">Les principales gares SNCF</span></li>
                        <li><span style="color:black">H&ocirc;tels, caf&eacute;s et restaurants</span></li>
                    </ul>
                    <div class="promo">

                        <div class="bloc">
                            <h1>Client iPhone<br />& Webphone</h1>
                            <div style="margin-top:10px;margin-bottom: 18px;">
                                <div class="texte">Utilisez l'application<br />SFR WiFi.</div>
                                <div class="image"><div class="sprite-mobiles"></div></div>
                                <div style="clear:both"></div>
                            </div>

                            <div class="lien">
                                <div class="texteL"><a href="http://www.sfr.fr/telephonie-mobile/services-options/services-smartphones/applications-sfr/sfr-wifi">Plus d'infos</a></div>
                                <div class="imageL"><div class="sprite-fleche-rouge"></div></div>
                                <div style="clear:both"></div>
                            </div>
                        </div>
                        <div class="bloc">
                            <h1>Client Tablette & iPad</h1>

                            <div style="margin-top:26px;margin-bottom: 31px;">
                                <div class="texte">Utilisez l'application<br />SFR WiFi.</div>
                                <div class="image"><div class="sprite-tablette"></div></div>
                                <div style="clear:both"></div>
                            </div>
                            <div class="lien">
                                <div class="texteL"><a href="http://www.sfr.fr/telephonie-mobile/services-options/services-smartphones/applications-sfr/sfr-wifi">Plus d'infos</a></div>

                                <div class="imageL"><div class="sprite-fleche-rouge"></div></div>
                                <div style="clear:both"></div>
                            </div>
                        </div>
                        <div class="bloc">
                            <h1>Client Internet 3G+</h1>
                            <div style="margin-top:20px;margin-bottom: 20px;">
                                <div class="texte" style="padding-top:4px">Utilisez le gestionnaire de connexion.</div>

                                <div class="image"><div class="sprite-cle3g"></div></div>
                                <div style="clear:both"></div>
                            </div>
                            <div class="lien">
                                <div class="texteL"><a href="http://www.sfr.fr/vos-services/internet-partout/PC-en-mobilite/cle-internet-3g/fonctionnalites/sfr-wifi/index.jsp">Plus d'infos</a></div>
                                <div class="imageL"><div class="sprite-fleche-rouge"></div></div>
                                <div style="clear:both"></div>
                            </div>

                        </div>
                        <div style="clear:both"></div>
                    </div>
                </div>
            </td>
            <td width="390px">
                <div class="authentBloc">
                    <form action="nb4_crypt.php" method="POST" name="connect" onsubmit="javascript:return validForm();">
                        <div class="titre">Vous &ecirc;tes client <span class="rouge">SFR</span> ADSL ou Fibre,<br />identifiez-vous !</div>

                        <div class="identifiant">
                            <strong><span class="rouge">E-mail</span> ou <span class="rouge">NeufID</span></strong><br />
                            <input type="text" name="username" id="login" size="30" />
                        </div>
                        <div class="motdepasse">
                            <strong>Mot de passe</strong><br />

                            <input type="password" name="password" id="password" size="30" />
                        </div>
                        <div class="cond">
                            <input type="checkbox" name="conditions" id="conditions" /> J'accepte les <strong><a href="mentions.html">termes et conditions</a></strong> du service<br />
                            <input type="checkbox" name="save" id="save" /> Se souvenir de mon identifiant
                        </div>

                        <div class="connexion">
                            <input type="text" name="challenge" value="" style="display:none;" />
                            <input type="text" name="accessType" value="" style="display:none;" />
                            <input type="text" name="lang" value="" style="display:none;" />
                            <input type="text" name="mode" value="" style="display:none;" />
                            <input type="text" name="userurl" value="" style="display:none;" />
                            <input type="text" name="uamip" value="" style="display:none;" />
                            <input type="text" name="uamport" value="" style="display:none;" />
                            <input type="text" name="channel" value="" style="display:none;" />

                            <input type="submit" name="connexion" value="Connexion" class="boutonC sprite-connexion" /><br /><br />
                            <div class="plusInfos">
                                <div class="sprite-puce" style="margin-left:238px"></div>
                                <div style="float: right;"><a href="#" onclick="openPopup(700, 440, 'aideDiv', true)">Besoin d'aide ?</a></div>
                            </div>
                            <br />
                        </div>
                        <div class="infos">

                            <div class="sprite-ligne-grise"></div>
                            <div class="image">
                                <div class="sprite-ampoule"></div>
                            </div>
                            <div class="texte">
                                <strong>Vous &ecirc;tes client SFR, ADSL ou Fibre?</strong><br />
                                Chez vous, utilisez votre r&eacute;seau WiFi priv&eacute; pour surfer sur internet !
                            </div>

                            <div class="plusInfos">
                                <div class="sprite-puce" style="margin-left:200px"></div>
                                <div style="float: right;"><a href="http://www.sfr.fr/vos-services/services-fixes-adsl/internet/wifi/" target="_blank">Plus d'infos</a></div>
                            </div>
                        </div>
                    </form>
                </div>
            </td>

        </tr>
        <tr>
            <td colspan="2" class="footerBloc">
                 <a href="mentions.html" target="_blank">Mentions l&eacute;gale</a> | <a href="http://assistance.sfr.fr/index.do" target="_blank">Assistance</a>
            </td>
        </tr>

    </table>
    <div class="voile" id="voile"> </div>
    <div class="box" id="box">
        <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
            <tr align="right" height=38" valign="middle">
                <td><div id="fermerBox" class="fermer">
                        <div class="sprite-fermer" style="position:absolute;right:0;top:0"></div>
                        <div style="position:absolute;right:0;top:7px"><a onclick="javascript:closePopup()">FERMER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></div>

                        <div style="clear: both"></div>
                </div></td>
            </tr>
            <tr align="center" valign="top"><td id="contenuBox"></td></tr>
        </table>
    </div>
    <div id="erreurDiv" style="display: none">
        <div style="width:500px;height:200px;background-color:#d1d1d1;font-size:16px;line-height:30px;">
            <br /><span class="rouge" style="font-weight:bold;font-size:24px">ERREUR D'AUTHENTIFICATION !</span><br />

            <hr style="height:2px;width:400px;background-color:black;border:1px black solid" /><br />
            Assurez-vous d'avoir saisi vos <strong>identifiants</strong> neufbox de SFR.<br />
            Si vous &ecirc;tes chez vous, utilisez plut&ocirc;t votre acc&egrave;s WiFi priv&eacute;.
        </div>
    </div>

    <div id="successDiv" style="display: none">
        <div style="width:400px;height:200px;background-color:#d1d1d1;font-size:16px;line-height:30px;text-align:left!important;">
            <br /><p style="padding-left:50px"><span style="font-weight:bold;font-size:24px">F&Eacute;LICITATIONS !</span></p>
            <hr style="height:2px;width:310px;background-color:black;border:1px black solid" />
            <p style="padding-left:50px">Vous allez &ecirc;tre redirig&eacute; vers le site demand&eacute;<br />
            dans <span class="rouge" id="theTimer">7 secondes</span>.</p>

        </div>
    </div>
    <div id="aideDiv">
        <div id="aideContenu">
                <p style="padding-top:40px!important">
                    <strong>Quel identifiant et mot de passe utiliser pour s'identifier ?</strong><br /><br />
                    Votre identifiant SFR WiFi est votre identifiant SFR.fr .<br />
                    Vous devez &ecirc;tre client Internet ADSL ou Fibre.<br />

                    La nature des identifiants et mots de passe peut varier suivant votre  abonnement.<br />
                    Pour conna&icirc;tre le bon couple identifiant/mot de passe, pr&eacute;cisez si:
                </p>
                <p><a href="#" onclick="showInfos('p1')">Vous &ecirc;tes abonn&eacute;(e) Neufbox de SFR</a></p>
                <div id="p1" style="display:none">
                    <p >

                        <span class="rouge"><strong>Vous &ecirc;tes titulaire d'un compte neufbox de SFR</strong></span><br />
                        <strong>Comment se connecter sur SFR.fr ?</strong><br /><br />
                        <span style="text-decoration:underline">votre identifiant SFR.fr</span><br />
                    </p>
                        <ul><li><span>l'adresse email re&ccedil;ue par courrier lors de votre inscription (exemple : jean.dupont@sfr.fr)</span></li></ul>
                    <p>ou</p>

                        <ul><li><span>votre adresse email personnalis&eacute;e si vous l'avez modifi&eacute;e (exemple : j.dupont@sfr.fr)</span></li></ul>
                    <p>ou</p>
                        <ul><li><span>votre identifiant Mon Compte (9ID)</span></li></ul>

                    <p><span style="text-decoration:underline">votre mot de passe</span></p>
                    <ul><li><span>le mot de passe re&ccedil;u par courrier lors de votre inscription</span></li></ul>

                    <p>ou</p>
                        <ul><li><span>votre mot de passe personnalis&eacute;</span></li></ul><br />
                    <p>
                        <strong>Vous n'arrivez pas &agrave; acc&eacute;der &agrave; votre compte ?</strong><br />
                        Vous pouvez aussi contacter votre Service Client au 1077 (tarif local depuis une ligne fixe en France m&eacute;tropolitaine, temps d'attente gratuit depuis une ligne neufbox).
                    </p>

                </div>

                <p style="padding:0;margin:0;padding-left:30px!important"><a href="#" onclick="showInfos('p2')">Vous &eacute;tiez abonn&eacute;(e) Neuf, Club Internet ou AOL</a></p>
                <div id="p2" style="display:none">
                    <p >
                        <span class="rouge"><strong>Vous &ecirc;tiez abonn&eacute;(e) Neuf, Club Internet, ou AOL, vous &ecirc;tes d&eacute;sormais titulaire d'un compte SFR</strong></span><br />

                        <strong>Comment se connecter sur SFR.fr ?</strong><br /><br />
                        <span style="text-decoration:underline">votre identifiant SFR.fr</span><br />
                    </p>
                        <ul><li><span>votre nom d'utilisateur</span></li></ul>
                    <p>ou</p>
                        <ul><li><span>votre identifiant Mon Compte (9ID)</span></li></ul>

                    <p>ou</p>
                        <ul><li><span>l'adresse email (exemples : jean.dupont@neuf.fr, jean.dupont@club.fr, jean.dupont@sfr.fr) que vous avez choisie comme identifiant dans la rubrique Mon Compte</span></li></ul>
                    <p>ou</p>
                        <ul><li><span>l'adresse email (@sfr.fr) obtenue par courrier lors de la migration de votre compte chez SFR</span></li></ul>
                    <p>ou</p>
                        <ul><li><span>l'adresse email re&ccedil;ue par courrier lors de votre inscription (exemple : jean.dupont@sfr.fr)</span></li></ul>

                    <p>ou</p>
                        <ul><li><span>votre adresse email personnalis&eacute;e si vous l'avez modifi&eacute;e (exemple : j.dupont@sfr.fr)</span></li></ul>
                    <p><span style="text-decoration:underline">votre mot de passe</span></p>
                        <ul><li><span>le mot de passe que vous avez cr&eacute;&eacute; dans la rubrique Mon Compte</span></li></ul>
                    <p>ou</p>

                        <ul><li><span>le mot de passe obtenu par courriel lors de la migration de votre compte chez SFR</span></li></ul>
                    <br />
                    <p>
                        <strong>Vous n'arrivez pas &agrave; acc&eacute;der &agrave; votre compte ?</strong><br />
                        Vous pouvez aussi contacter votre Service Client au 1077 (tarif local depuis une ligne fixe en France m&eacute;tropolitaine, temps d'attente gratuit depuis une ligne neufbox).
                    </p>

                </div>
                <p style="padding:0;margin:0;padding-left:30px!important"><a href="#" onclick="showInfos('p3')">Vous poss&eacute;dez uniquement une adresse email secondaire</a></p>
                <div id="p3" style="display:none;">
                    <p>
                        <span class="rouge"><strong>Vous poss&eacute;dez uniquement une adresse email secondaire</strong></span><br />
                        <strong>Comment se connecter sur SFR.fr ?</strong><br /><br />

                        <span style="text-decoration:underline">votre identifiant SFR.fr</span>
                    </p>
                    <ul><li><span>votre adresse email compl&egrave;te, cr&eacute;&eacute;e par le titulaire du compte SFR (jean.dupont@sfr.fr)</span></li></ul>
                    <p><span style="text-decoration:underline">votre mot de passe</span></p>
                        <ul><li><span>le mot de passe choisi par le titulaire du compte SFR lors de la cr&eacute;ation de votre adresse email</span></li></ul>

                    <p>ou</p>
                        <ul><li><span>votre mot de passe personnalis&eacute;, si vous l'avez chang&eacute; depuis la cr&eacute;ation de ce compte</span></li></ul><br />
                    <p>
                        <strong>Vous n'arrivez pas &agrave; acc&eacute;der &agrave; votre compte ?</strong><br />

                        Vous pouvez aussi contacter votre Service Client au 1077 (tarif local depuis une ligne fixe en France m&eacute;tropolitaine, temps d'attente gratuit depuis une ligne neufbox).
                    </p>
                </div>
        </div>
    </div>
            <script type="text/javascript">init();</script>
	<div id="tracking"></div>
	<script type="text/javascript">
                eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('A B(){4 a=0;2(3.e.8("O")!=-1){t=3.e.1c("O");a=1d(t[1])}2(f.g.P){2(a==7){9"1e"}b 2(a==6){9"1f"}b{9"1g"}}b 2(f.g.C){9"1h"}b 2(f.g.Q){9"1i"}b 2(f.g.R){9"1j"}b 2(f.g.S){9"D"}b 2(f.g.E){9"1k"}}A c(a){T=1l;2(T)9"1";9"0"}A h(a){2(F.8(a)!=-1&&3.G[a].1m!=1n)9"1";9"0"}4 H="0";2(3.1o())H="1";4 l=3.j.U();4 1p=3.1q.8("1r")!=-1;4 V=l.8("1s")!=-1;4 W=l.8("1t")!=-1||l.8("1u")!=-1;4 n=3.X?"1":"0";2(1v 3.X=="1w"&&n=="0"){I.Y="Z";n=I.Y.8("Z")!=-1?"1":"0"}4 o="0",p="0",q="0",r="0",s="0",u="0";2(W&&V){o=c("10.10.1");p=c("11.11.1");2(c("v.J.1")=="1"||c("v.J.5")=="1"||c("v.J.6")=="1")q="1";r=c("12.12");s=c("1x.1y 1z 1A.1");u=c("1B.1C")}b{4 F="";1D(4 i=0;i<3.G.1E;i++)F+=3.G[i].1F.U();o=h("w/x-1G");p=h("w/x-1H-1I");q=h("w/1J");r=h("1K/1L");s=h("1M/x-1N-1O-1P");u=h("w/x-1Q")}4 f={g:{P:!!(K.1R&&!K.D),S:!!K.D,C:3.j.8("C")>-1&&3.j.8("13/")>-1,E:3.j.8("E")>-1&&3.j.8("1S")==-1,Q:!!3.j.1T(/1U.*1V.*1W/),R:3.j.8("13/")>-1}};4 y="";2(d["14"])y=d["14"];4 L="";2(d["15"])L=d["15"];4 k="1X 1Y";2(3.e.8("1Z")!=-1)k="20";2(3.e.8("21")!=-1)k="22";2(3.e.8("23")!=-1)k="24";2(3.e.8("16")!=-1)k="16";4 17=0;4 M;4 18=25 26;4 19=18.27();M="28:"+y+","+19;4 m="";2(d["z"]=="29"){m="2a-"+B()}b 2(d["z"]=="2b"){m="2c"}b 2(d["z"]=="2d"){m="2e"}I.2f("2g").2h="<2i 2j=\'i/2k.2l?"+"2m=2n"+"&2o=2p"+"&2q=2r"+"&2s=2t"+"&2u="+m+"&1a="+d["z"]+"&2v="+H+"&2w="+1b(l)+"&2x="+y+"&2y="+M+"&2z="+17+"&2A="+L+"&2B="+n+"&2C="+o+"&2D="+p+"&v="+q+"&2E="+r+"&2F="+s+"&2G="+u+"&1a="+N.2H+"x"+N.2I+"&2J="+N.2K+"&2L="+B()+"&2M="+k+"&2N="+1b(3.e)+"\'>"',62,174,'||if|navigator|var||||indexOf|return||else|_plug_ie|urlParams|appVersion|Nav|Browser|_plug_normal||userAgent|OSName|_agent|_page|_cookie|_dir|_fla|_pdf|_qt|_rea||_wma|PDF|application||_mac|res|function|NavName|Android|opera|Gecko|_tm|mimeTypes|_jav|document|PdfCtrl|window|_nasid|_user_id|screen|MSIE|IE|MobileSafari|WebKit|Opera|pk_found|toLowerCase|_ie|_win|cookieEnabled|cookie|_testcookie|SWCtl|ShockwaveFlash|Quicktime|AppleWebKit|mac|nasid|Linux|num_error|date|time|RES|escape|split|parseFloat|ie7|ie6|ie8|android|iphone|safari|firefox|false|enabledPlugin|null|javaEnabled|_moz|appName|Netscape|msie|win|32bit|typeof|undefined|rmocx|RealPlayer|G2|Control|wmplayer|ocx|for|length|type|director|shockwave|flash|pdf|video|quicktime|audio|pn|realaudio|plugin|mplayer2|attachEvent|KHTML|match|Apple|Mobile|Safari|Unknown|OS|Win|Windows|Mac|MacOS|X11|UNIX|new|Date|getTime|user|notyet|Accueil|failed|AuthentKO|success|AuthentOK|getElementById|tracking|innerHTML|img|src|track|gif|DOM|WiFi|SITE|PCNB4|GRP|PortailCaptif|CHAN|Authent|PAGE|JAVA|USER_AGENT|MAC|USERID|ERROR|NASID|COOKIE|DIR|FLA|QT|REA|WMA|width|height|COLOR_DEPTH|colorDepth|NAVNAME|OS_NAME|OS_VERSION'.split('|'),0,{}))
            </script>

            
</body>
[/code]

Merciii.
Ça ressemble beaucoup au résultat du “SFR WiFi FON”, la partie FON en moins bien entendu. J’étudierai ça à tête reposée.
J’ai déjà trouvé le moyen de rendre les bouts de Javascript lisibles ! Le pire c’est que ça fait rien d’extraordinaire, c’est vraiment juste pour emmerder le monde leur obfuscation à la noix.

Cela dit sans vouloir te commander, ça aurait été cool de mettre ça dans un fichier .txt joint parce si tout le monde envoie des tartines comme ça, ça va être impossible à gérer. :smiley:

Voilà pour FreeWifi :

[code]

Free
</div>

CONNEXION AU SERVICE FreeWiFi


  <div id="block_2">
    <p >Pour vous connecter au service FreeWiFi, <br />
      utilisez les identifiants que vous avez configurés lors de votre premier accès au service<br />
    <form id="form1" name="form1" method="post" action="/Auth">
      <label for="login" class="label" > IDENTIFIANT</label>
      <input name="login" id="login"  class="input_r" value=""/>
      <br />

      <br />
      <br />
      <label for="password" class="label" > MOT DE PASSE</label>
      <input type="password" name="password" id="password" class="input_r" value=""/>
      <br />
      <br />
      <br />
      <input name="submit" type="submit" value="Valider" class="input_b" />
    </form>
    
 
     <div class="clearer"></div> 
  </div>

  <a href="/?priv=$PRIV_SUB"><img src="/im/abo.jpg" alt="Vous n'êtes pas abonné FREE? Cliquez ici et dans une minute, vous pourrez accéder à internet" width="399" height="70" border="0" /></a></div>
[/code]

Re-merci :mrgreen:

Cool, un tel outil m’intéresse (au moins pour l’aspect FreeWifi) ! Bon, je n’ai pas vraiment le temps d’y contribuer mais voici un petit tuyau : sur mon N900 (Maemo 5, basé sur Debian), j’utilise une appli au doux nom de “AutoFreeWifi”. Il y a peut-être quelques idées à reprendre…
maemo.org/packages/view/autofreewifi/
blog.tomamplius.net/index.php?po … t-freewifi

Si tu as des identifiants FreeWifi, y’a une chose simple que tu peux faire pour faire avancer le schmilblick. Même procédure que portage-freewifi-manager-sous-linux-t35731.html#p362247 mais pour récupérer le code source de la page de confirmation de connexion (et son adresse) une fois que tu as rentré tes identifiants. Sans ça je ne peux pas coder le truc.
Par contre pour éviter d’être redirigé automatiquement vers une autre adresse, initialement ne tape pas “n’importe quelle adresse” mais juste wifi.free.fr/ je pense que ça devrait être suffisant pour te faire rester sur la page de confirmation et donc te laisser le temps d’en récupérer la source.

Salut à tous, et un grand merci pour vous intéresser à ce projet ! N’étant pas programmeur pour un sou, je ne pouvais qu’attendre une telle initiative. Merci !

Je poste ici pour exposer mon 'blème car c’est annoncé comme le fil de discussion du projet. Si mon post n’est pas à sa place, n’hésitez pas à le déplacer à l’endroit que vous jugez le plus propice.

Donc, voici l’histoire : je n’arrive pas à installer le paquet selon debian-fr.org/portage-freewi … 35731.html
Je suis sur un eeepc 1000HE, wheezy 3.1.0, lxde/wicd, connecté sur un SFR hotspot.
Le howto annonce d’avoir python3.1 d’installé. Or, je ne trouve que le python3.2 de disponible (qui est installé sur ma machine). libnotify-bin est installé.

Si je fais un # make install dans le dossier décompressé, il me fait :find ./ -type f -name '*.pyc' -print0 | xargs -0 rm 2>/dev/null || true find ./ -type f -name '*.pyo' -print0 | xargs -0 rm 2>/dev/null || true devtools/precompile.py make: devtools/precompile.py: Command not found make: *** [build] Error 127
J’essaie ensuite de nouveau après avoir ajouté un chmod +x sur Makefile : même résultat.

Que dois-je faire a priori ?

Salut,

Effectivement ça semble être un souci de version de Python. J’avais forcé la 3.1 pour le développement (car la 3.0 avait des problèmes gênants) mais la 3.2 fonctionne très bien aussi, il suffit de changer le shebang des principaux scripts.
Problème corrigé ici, tiens moi au courant si tu as d’autres soucis :
github.com/syam44/Hotspot-Login … all/master
:006

Merci pour la réponse.
Bien, ça a l’air d’avoir arrangé le problème.
Cependant, il me met des erreurs, notamment à la fin du processus : find ./ -type f -name '*.pyc' -print0 | xargs -0 rm 2>/dev/null || true find ./ -type f -name '*.pyo' -print0 | xargs -0 rm 2>/dev/null || true devtools/precompile.py chmod a-ws,a+rx,u+w ./hotspot-login-manager.py find ./hotspot_login_manager -type d -print0 | xargs -0 chmod a-ws,a+rx,u+w find ./hotspot_login_manager -type f -print0 | xargs -0 chmod a-wxs,a+r,u+w find ./distrib -type d -print0 | xargs -0 chmod a-ws,a+rx,u+w find ./distrib -type f -print0 | xargs -0 chmod a-wxs,a+r,u+w chmod -R g-rwxs,o-rwxs ./distrib/etc/hotspot-login-manager chmod a+rx ./distrib/etc/init.d/hotspot-login-manager chmod a+rx ./distrib/etc/network/if-up.d/hotspot-login-manager devtools/make-install install devtools/make-install: 43: devtools/make-install: /etc/init.d/hotspot-login-manager: not found update-rc.d: using dependency based boot sequencing rm: cannot remove `/etc/init.d/hotspot-login-manager': No such file or directory rm: cannot remove `/etc/network/if-up.d/hotspot-login-manager': No such file or directory rm: cannot remove `/etc/network/if-down.d/hotspot-login-manager': No such file or directory rm: cannot remove `/usr/local/bin/hotspot-login-manager': No such file or directory

Rien de grave, le script d’install essaye de supprimer les fichiers qui seraient déjà présents, ce qui fait office de procédure de mise à jour. En fait c’est le fonctionnement normal lors d’une première installation. Tant que les fichiers qu’il cite existent bel et bien après le make install, c’est ok.

Cela dit j’ai mis à jour le code pour qu’il n’affiche plus ces messages, car ils n’ont effectivement rien à faire là.

Ok, l’install s’est bien passée.
Cependant, losrque je lance le service (étape “# service hotspot-login-manager start”), il me met Starting daemon: Hotspot Login Manager... ERROR: Incorrect credentials configuration file «/etc/hotspot-login-manager/credentials.conf»: section [provider = "SFR WiFi Public"] is not allowed in this file. Pourtant, je suis connecté sur un SFR WiFi Public que tu annonces valide dans l’intro.
J’ai modifié le /etc/hotspot-login-manager/credentials.conf comme ça :[code][provider = “SFR WiFi Public”]

Username

user = mon_login

Password

password = mon_mot_de_passe[/code]c’est bien comme ça ?

PS - Quand ça marchera, et en fonction de la masse de travail et mon timing, je suis partant pour donner un coup de main à la traduction d’anglais à français ou inverse, ou ce genre de choses.

$ ./hotspot-login-manager.py --providers Available service providers: fon (corresponding hotspots: Neuf WiFi FON, SFR WiFi FON) sfr.fr (corresponding hotspots: Neuf WiFi FON, Neuf WiFi Public, SFR WiFi FON, SFR WiFi Public)

[provider = sfr.fr] user = ... password = ...
:wink:

Ok merci, cette fois le programme tourne.
Cependant, je viens d’être déconnecté de SFR, j’ai dû me reconnecter à la main (j’ai bien relancé le service.)
Néanmoins, peut-être je suis allé trop vite ? Comment je peux voir si ça fonctionne bien ?

En cas de souci ça écrit dans /var/log/daemon.log
Si tu veux quelque chose de plus verbeux, il faut aller dans hotspot_login_manager/libs/hlm_main.py et modifier la ligne _forceDebug = False en _forceDebug = True

Sais-tu d’où vient la déconnexion ? De la couche Wifi ou de l’authentification auprès du portail captif ?
As-tu attendu un peu avant de relancer le service ? (je crois qu’il vérifie la connexion toutes les 60 secondes)
As-tu utilisé l’option –reauth de h-l-m, ou bien redémarré le service via init.d ?

J’ai relancé le service via la ligne “service hotspot-login-manager stop” (dans ton tuto). Je ne comprends pas l’option --reauth de h-l-m (je ne suis encore dans la lecture des docs).

J’ai lancé un watch sur /var/log/daemon.log, j’essaie les deux versions (avec false, et avec true).

La déconnexion, s’est le portail sfr qui s’était stoppé. Après, je ne saurais le vérifier exactement. Ceci dit, comme je veux souvent aller trop vite, je n’avais peut-être pas laissé le temps au logiciel de faire sa cuisine. Je laisse faire donc désormais et j’observe.

Et tu me dis si tu veux de la traduction ou autre.

ça semble marcher (non ?):

Jan 5 22:31:33 Hotspot Login Manager[8914]: DEBUG: Authenticator thread woke up. Jan 5 22:31:33 Hotspot Login Manager[8914]: DEBUG: Checking available wireless interfaces: ['wlan0'] Jan 5 22:31:33 Hotspot Login Manager[8914]: DEBUG: About to ping «http://www.google.com/404» in order to check for internet access. Jan 5 22:31:33 Hotspot Login Manager[8914]: DEBUG: Ping URL «http://www.google.com/404» was not redirected. We have internet access. Jan 5 22:31:33 Hotspot Login Manager[8914]: DEBUG: Going to sleep for 5 seconds. Jan 5 22:31:38 Hotspot Login Manager[8914]: DEBUG: Waiting for the next event. Jan 5 22:32:33 Hotspot Login Manager[8914]: DEBUG: Authenticator thread woke up. Jan 5 22:32:33 Hotspot Login Manager[8914]: DEBUG: Checking available wireless interfaces: ['wlan0'] Jan 5 22:32:33 Hotspot Login Manager[8914]: DEBUG: About to ping «http://www.google.com/404» in order to check for internet access. Jan 5 22:32:33 Hotspot Login Manager[8914]: DEBUG: Ping URL «http://www.google.com/404» was not redirected. We have internet access. Jan 5 22:32:33 Hotspot Login Manager[8914]: DEBUG: Going to sleep for 5 seconds. Jan 5 22:32:38 Hotspot Login Manager[8914]: DEBUG: Waiting for the next event.

Ça a l’air tout bon. Si tu constates une autre déconnexion du portail captif (ce qui arrive toutes les 2 heures avec SFR), tu peux :

  • attendre 1 mn pour une reconnexion automatique
  • exécuter hotspot-login-manager --reauth pour une reconnexion (quasiment) immédiate