Zeroshell Auto Login – Script

Home Page Forums Network Management ZeroShell Zeroshell Auto Login – Script

This topic contains 16 replies, has 0 voices, and was last updated by  fnmunhoz 9 years, 6 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #41418

    fnmunhoz
    Member

    Hello,

    I’m write a very basic script in Python ( test version) to automate the web login process of Captive Portal.

    I publish the version at google code http://code.google.com/p/zeroshell-autologin/

    So I’m looking for sugestions to improve the code and to point security and performance issues about the script.

    Thanks

    #47452

    imported_fulvio
    Participant

    Thanks for the wonderful idea. I will put a link in the documentation page. Would it be possible to translate it in Java code. I think a Java authentication program is more portable on communication devices such as a cellular phone or a PDA.

    Regards
    Fulvio

    #47453

    fnmunhoz
    Member

    Hi Fulvio, you are right a Java implementation is more portable than Python, but my clients are 99% windows users (Windows 98 included) and I have to do it more simple as possible to install for them.

    With Python I use py2exe [1] to package python interpreter, python library and my script, and all files places in one folder. After that I use InnoSetup [2] to make a Installer.

    Moreover, I think python is a little bit lighter for this task, but it is debatable.

    I do not know if I would have these advantages with java. But if someone is interested, I think a great idea two implementations.

    Thanks for the link in the documentation page, and congratulations for the excellent work.

    [1] http://www.py2exe.org/
    [2] http://www.innosetup.com/isinfo.php

    #47454

    j2fet
    Member

    I’ve modified captive portal auto-logon script by Munhoz.
    It uses python’s ConfigParser to read from a config file (ie. cp-autologin.conf)

    With this we can distribute a binary for cp-autologin.py (ie. cp-autologin.exe+dlls, using py2exe),
    while the user handles their user info in a separate files themselves.

    The links:
    http://aljufry.org/zeroshell/cp-autologin.py
    http://aljufry.org/zeroshell/cp-autologin.conf

    Hope that helps.

    #47455

    fnmunhoz
    Member

    Hello J2fet, thanks for the modification. I’m sure that will help.

    I Will upload your version in google code, ok?

    @j2fet wrote:

    I’ve modified captive portal auto-logon script by Munhoz.
    It uses python’s ConfigParser to read from a config file (ie. cp-autologin.conf)

    With this we can distribute a binary for cp-autologin.py (ie. cp-autologin.exe+dlls, using py2exe),
    while the user handles their user info in a separate files themselves.

    The links:
    http://aljufry.org/zeroshell/cp-autologin.py
    http://aljufry.org/zeroshell/cp-autologin.conf

    Hope that helps.

    #47456

    j2fet
    Member

    fnmunhoz, great! Thanks for the upload.

    Changes:
    1. Now the config file stores the password in encoded format and the main script can decode the encoded password directly. No more clear-text password.
    2. I’ve created config maker for the non savvy.

    Future Changes?:
    1. CN based redirection support, so that user don’t have to put server= values.
    2. User keyboard interrupt to disconnect/renew login.
    3. GUI based, maybe bundled together modified OpenVPN GUI for windows package and called it Zeroshell client utility or something… What says you Fulvio?

    Anyways, the links:
    http://aljufry.org/zeroshell/zscp-autologin.py
    http://aljufry.org/zeroshell/zscp-autologin-makecfg.py
    http://aljufry.org/zeroshell/config.cfg

    #47457

    josean_rt
    Member

    Hi!!

    Please, somebody can explain how can i do to auto login the clients?
    I read your coments but I dont know how to built the .exe installer or where take the .DLL library… could you explain step by step?

    Thanks a lot for youre job!!!

    #47458

    j2fet
    Member

    Explanation on using Zeroshell Captive Portal Auto Login

    Step 0.1 – Get http://aljufry.org/zeroshell/zscp-autologin-makecfg.py
    Step 0.2 – Get http://aljufry.org/zeroshell/zscp-autologin.py

    Condition 1 – Windows/Linux was installed with python
    1.Execute $python ~/zscp-autologin-makecfg.py to create the configuration file needed. Answer the questions. Run once or whenever you feel like doing so.
    2.Execute $python ~/zscp-autologin.py
    3.Put the line below in user’s ~/.bashrc file for automatic login in Linux (sort of…)
    python ~/zscp-autologin.py

    Condition 2 – Windows was not installed with python and you want to have the exe version
    1.Download and install python from http://www.python.org/download/
    2.Download and install py2exe for the same python version that you’ve installed in Step 1 from http://sourceforge.net/projects/py2exe/
    3.You need to create a file called setup.py which looks like:

    from distutils.core import setup
    import py2exe
    setup (version = “0.1”,
    name = “zscp-autologin”,
    console = [“zscp-autologin.py”])

    Then run:
    C:zscp>python setup.py py2exe

    The executable and DLLs will appear in the “dist” subdirectory of your current working directory. Proceed with Condition 3, Step 2-4.

    Condition 3 – You trust ZSCP-autologin so much, that you don’t mind getting the binaries from a stranger
    I’ve compiled using py2exe-2.6 and put it up at http://aljufry.org/zeroshell/zscp-autologin.zip
    1.Extract the zip file and cd to it
    2.Execute C:zscp>zscp-autologin-makecfg.exe to create the configuration file needed. Answer the questions. Run once or whenever you feel like doing so.
    3.Execute C:zscp>zscp-autologin.exe
    4.Put the symlink in Windows Startup for automatic login (sort of…)

    Good luck for any of the 3 conditions…

    You may check the updates in http://code.google.com/p/zeroshell-autologin/ as well.

    #47459

    josean_rt
    Member

    Thanks a lot!!!

    Thanks for a very good job!!!

    this link don´t let me download because i don´t have permiss

    http://aljufry.org/zeroshell/zscp-autologin.zip

    #47460

    josean_rt
    Member

    jejeje I can Believe… I´m clumsy!
    When I´m compiling, the compiler doesn´t let me put “zscp>” only “python setup.exe py2exe” When it finish compiling i can get only one “.exe”. When I do double click it only appear a black screen from the MSDOS during 1 second and closed.

    please, what I did wrong?

    I install the python 2.6 and the py2exe is for the same version. When I´ll go to compile i put the files on “Python 26” folder

    #47461

    j2fet
    Member

    Don’t double click on the exe instead, use Start->Run->cmd
    cd C:zscp
    zscp-autologin.exe

    That should do… Provided you put the binaries in folder C:zscp.

    Regarding the compilation, you have to create one exe by one exe, the final zipped binaries were combined to make things easy. I kind of skip the steps in my earlier explanations.

    Regarding the folder name, you have to change it accordingly.

    #47462

    josean_rt
    Member

    I think thak something I´m doing wrong. Thanks a lot for your patient.

    Please, Coul you repair the acces to the file named “zscp-autologin.zip” in this link http://aljufry.org/zeroshell/zscp-autologin.zip? because I dimiss to try to compilate again the autologin for ZeroShell some errors apear when i ejecute.
    Thanks a lot!!

    #47463

    josean_rt
    Member

    Please, somebody can compile for me both programs “zscp-autologin-makecfg.py” and “zscp-autologin.py” in exe because i think that i have some trouble o i´m a inept to do it.

    Thank a lot!!!

    #47464

    j2fet
    Member

    Permission for the binaries were fixed.
    Script was modified. Redownload for both scripts please.

    Good luck.

    #47465

    josean_rt
    Member

    Thaks you very much j2fet!!

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.