Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set getchal "<?xml version=\"1.0\"?>
- <methodCall>
- <methodName>LJ.XMLRPC.getchallenge</methodName>
- <params>
- <param>
- <value><struct>
- <member><name>username</name><value><string>$::ljname</string></value></member>
- <member><name>password</name><value><string>$::ljpswd</string></value></member>
- </struct></value>
- </param>
- </params>
- </methodCall>"
- set getchallenge [http::geturl http://www.livejournal.com/interface/xmlrpc -query $getchal -type "text/xml" ]
- set mychal [http::meta $getchallenge] # also tried with http::status, no joy either way
- set doc [dom parse $mychal]
- set root [$mychal documentElement]
- set nodeList [$root selectNodes {descendant::a}]
- set chalvar {}
- foreach node $nodeList {
- set attList [$node attributes *]
- foreach attribute $attList {
- if {[string tolower $attribute] == "c0:"} {
- set mychal [$node getAttribute $attribute]
- break
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement