[Tutor] Error in my code

govind goyal govindgoyal at gmail.com
Tue Apr 17 17:28:35 CEST 2007


Hi,

I am executing following lines of code:

def WEP40_KEY(n):
  params = urllib.urlencode({})
  headers = {"Connection": "Keep-Alive","Authorization": ""}
  conn = httplib.HTTPConnection(HOST)
  conn.request("GET", "/w_sec.htm HTTP/1.1", params, headers)
    response = conn.getresponse()
    print response.status, response.reason
 params = urllib.urlencode({'wsecurity':"WEP",'wep_auth':"Shared+Key",'wepenc':"128+bit",'wep_key_no':"key1",'ascii_key1':"12345678901234567890123456",'ascii_key2':"",'ascii_key3':"",'ascii_key4':"",'passphrase':"",'wpa_psk':"12345678",'key_lifetime':"65535",'wpa_enc':"TKIP",'save':"Save",'message':
"",'todo':""})
    headers = {"Connection": "Keep-Alive","Authorization": ""}
    conn = httplib.HTTPConnection(HOST)
    conn.request("POST", "w_sec.htm", params, headers)
    response = conn.getresponse()
    print response.status, response.reason
    conn.close()

WEP40_KEY(sys.argv)



I am getting following error:


C:\Documents and Settings\Govindadya\Desktop\Marvell>Marvell_WEP40.py
192.168.1.
16
  File "C:\Documents and
Settings\Govindadya\Desktop\Marvell\Marvell_WEP40.py",
line 41
   * response = conn.getresponse()
                                ^
IndentationError: unindent does not match any outer indentation level*

**

Can anybody help me out on this?

Best Regards,

Govind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070417/3c5cb378/attachment.htm 


More information about the Tutor mailing list