HTTPS Login



I am trying to login to a secure website and I am having some difficulty understanding the process. Here is what I have with my limited knowledge of the subject:

##Start Code##
#!/usr/bin/env python



import urllib

import urllib2



# Main

params = urllib.urlencode({

"user" : "username",

"pass" : "password"

})



req = urllib2.Request("https://web.site.com/default.aspx";, params) data = urllib2.urlopen(req)



for line in data.readlines():

print line
##End Code##

This just doesn't seem to work. It just brings me back to a login screen.

If you can lend a hand it would be much appreciated.

-Tom


.



Relevant Pages

  • Re: Web authentication urllib2
    ... I'm experimenting with urllib2, ... And the problem is, that this code logs me in on some sites, but on others doesn't, especially on the one I really ... login on that specific site? ...
    (comp.lang.python)
  • 1-Column Output from ls
    ... Even with params ... like --format=horizontal or -C there's no joy. ... Yet a login as root gives ls with the normal multicolumn output. ...
    (alt.os.linux.suse)
  • Re: User login
    ... without really understanding what it does. ... This command will do it: ... I want to run a login script file for certain users. ...
    (microsoft.public.windows.server.general)
  • Re: GNU software compromised : Cert Advisory
    ... And apparently it was done by someone who had login ... Am I understanding this correctly? ... All anyone has to do to evade this ... cracker's work is to check the md5 sums? ...
    (comp.os.linux.setup)
  • Re: GNU software compromised : Cert Advisory
    ... And apparently it was done by someone who had login ... Am I understanding this correctly? ... All anyone has to do to evade this ... cracker's work is to check the md5 sums? ...
    (comp.os.linux)