FAQ
this works but i don't understand it. it retrieves data from my
router.
params = urllib.urlencode({'RC': '@D', 'ACCT' : "root", 'PSWD' :
"71:29:26", 'URL': 'admin' })
ipurl = "http://" + iphost + "/cgi-bin/logi"
urlfp = urllib.urlopen(ipurl, params)

i was wondering exactly what those params mean.
i have some other code that wants a user name and password and i don't
know what to give it. is the username = 'root'?
and what is the password? a string with 3 two digit numbers separated
by colons?
what is the 'URL' param mean?
somewhere to find documentation?

Search Discussions

  • Wladimir at Jun 11, 2002 at 2:56 am

    On Tue, 11 Jun 2002 04:35:07 +0200, rdack wrote:

    this works but i don't understand it. it retrieves data from my router.
    params = urllib.urlencode({'RC': '@D', 'ACCT' : "root", 'PSWD' :
    "71:29:26", 'URL': 'admin' })
    ipurl = "http://" + iphost + "/cgi-bin/logi"
    < urlfp = urllib.urlopen(ipurl, params)
    i was wondering exactly what those params mean. i have some other code
    that wants a user name and password and i don't know what to give it. is
    the username = 'root'? and what is the password? a string with 3 two
    digit numbers separated by colons?
    So it passes four parameters to the script

    [name] [value]
    RC @D
    ACCT root
    PSWD 71:29:26
    URL admin

    What those parameters exactly mean is not a python issue but propetiary to
    the router in question. (see router docs for that)
    what is the 'URL' param mean?
    somewhere to find documentation?
    http://www.python.org/doc/current/lib/module-urllib.html would be a good
    place to start :D

    Wladimir
  • Rdack at Jun 14, 2002 at 1:39 am
    rdacker at pacbell.net (rdack) wrote in message news:<644f6688.0206101835.5dc793b1 at posting.google.com>...
    this retrieves data from my router:
    params = urllib.urlencode({'RC': '@D', 'ACCT' : "root", 'PSWD' :
    "71:29:26", 'URL': 'admin' })
    ipurl = "http://" + iphost + "/cgi-bin/logi"
    urlfp = urllib.urlopen(ipurl, params)
    is there some way i can what exactly this is posting?
    a way to get the post object out of urlib?
    it should be something like:

    POST http://192.168.0.1/cgi-bin/logi
    Content-Length: 47
    Content-Type: application/x-www-form-urlencoded

    RC=%40D&PSWDq%3A29%3A26&URL­min&ACCT=root

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 11, '02 at 2:35a
activeJun 14, '02 at 1:39a
posts3
users2
websitepython.org

2 users in discussion

Rdack: 2 posts Wladimir: 1 post

People

Translate

site design / logo © 2022 Grokbase