Guest User

tcl xml-rpc post over http

a guest
Apr 7th, 2010
2,438
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set getchal "<?xml version=\"1.0\"?>
  2. <methodCall>
  3. <methodName>LJ.XMLRPC.getchallenge</methodName>
  4. <params>
  5. <param>
  6. <value><struct>
  7. <member><name>username</name><value><string>$::ljname</string></value></member>
  8. <member><name>password</name><value><string>$::ljpswd</string></value></member>
  9. </struct></value>
  10. </param>
  11. </params>
  12. </methodCall>"
  13.  
  14. set getchallenge [http::geturl http://www.livejournal.com/interface/xmlrpc -query $getchal -type "text/xml" ]
  15. set mychal [http::meta $getchallenge] # also tried with http::status, no joy either way
  16. set doc [dom parse $mychal]
  17. set root [$mychal documentElement]
  18. set nodeList [$root selectNodes {descendant::a}]
  19. set chalvar {}
  20.  
  21. foreach node $nodeList {
  22. set attList [$node attributes *]
  23. foreach attribute $attList {
  24. if {[string tolower $attribute] == "c0:"} {
  25. set mychal [$node getAttribute $attribute]
  26. break
  27. }
  28. }
  29. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×