Home Page › Forums › Network Management › ZeroShell › Zeroshell Auto Login – Script
- This topic is empty.
-
AuthorPosts
-
January 23, 2009 at 6:49 pm #41418
fnmunhoz
MemberHello,
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
January 23, 2009 at 9:50 pm #47452imported_fulvio
ParticipantThanks 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
FulvioJanuary 24, 2009 at 1:04 pm #47453fnmunhoz
MemberHi 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.phpMarch 23, 2009 at 10:15 am #47454j2fet
MemberI’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.confHope that helps.
March 23, 2009 at 4:50 pm #47455fnmunhoz
MemberHello 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.confHope that helps.
March 24, 2009 at 12:05 pm #47456j2fet
Memberfnmunhoz, 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.cfgMay 19, 2009 at 8:53 am #47457josean_rt
MemberHi!!
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!!!
May 22, 2009 at 12:20 pm #47458j2fet
MemberExplanation 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.pyCondition 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.pyCondition 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 py2exeThe 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.
May 25, 2009 at 8:18 pm #47459josean_rt
MemberThanks a lot!!!
Thanks for a very good job!!!
this link don´t let me download because i don´t have permiss
May 28, 2009 at 2:45 am #47460josean_rt
Memberjejeje 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
May 28, 2009 at 10:23 am #47461j2fet
MemberDon’t double click on the exe instead, use Start->Run->cmd
cd C:zscp
zscp-autologin.exeThat 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.
May 28, 2009 at 10:12 pm #47462josean_rt
MemberI 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!!May 31, 2009 at 3:15 pm #47463josean_rt
MemberPlease, 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!!!
June 2, 2009 at 5:23 am #47464j2fet
MemberPermission for the binaries were fixed.
Script was modified. Redownload for both scripts please.Good luck.
June 2, 2009 at 7:57 am #47465josean_rt
MemberThaks you very much j2fet!!
-
AuthorPosts
- You must be logged in to reply to this topic.