Pyogp Client Lib/Login Test Script
< Pyogp Client Lib
Jump to navigation
Jump to search
Revision as of 09:03, 7 July 2008 by Locklainn Linden (talk | contribs) (New page: <pre> import os.path if os.path.exists("../setup_path.py"): execfile("../setup_path.py") import time from indra.base import llsd from eventlet import api, httpc, util util.wrap_socket_w...)
import os.path if os.path.exists("../setup_path.py"): execfile("../setup_path.py") import time from indra.base import llsd from eventlet import api, httpc, util util.wrap_socket_with_coroutine_socket() loginparams={'password' : 'gtaIV', # md5-password '$1$' + md5hash 'lastname' : 'Tester', 'firstname' : 'Locklainn', } llsdloginparams = llsd.format_xml(loginparams) headers = {"content-type" : "application/llsd+xml"} try: response = httpc.post('https://login1.aditi.lindenlab.com/cgi-bin/auth.cgi', llsdloginparams, headers) loginurl = response.read() except httpc.Found, e: loginurl = e.location() print loginurl data = {'caps': {'place_avatar' : True}} data = llsd.format_xml(data) headers = {"content-type" : "application/llsd+xml"} response = httpc.post(loginurl, data, headers) request = response.read() print request
--Locklainn Linden 09:03, 7 July 2008 (PDT)