No announcement yet.

Socket to WebAdmin problem?

  • Filter
  • Time
  • Show
Clear All
new posts

    Socket to WebAdmin problem?

    I'm making a gather bot for UT, and I want certain people, who don't have admin, to be able to run pickups.
    That means the bot will need to change the password, meaning I need sockets.

    So, I use my own webadmin account, which works fine (I can change settings and stuff).
    But, when I try to do it through sockets, I get "You cannot change settings in this..." blah blah blah - any clue why?
    This is what I send the server
      POST /ServerAdmin/defaults_rules HTTP/1.1
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060508 Firefox/
      Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 300
      Connection: keep-alive
      Referer: http://<ip:port>/ServerAdmin/defaults_rules?Page=defaults_rules&Filter=Server
      Authorization: Basic <auth code>
      Content-Type: application/x-www-form-urlencoded
      Content-Length: $len(%string)
      $crlf %string
    Where $crlf is a new line, and %string is what I found using some socket snipping add-on for mozilla (same for that auth code, btw).
    I tried with and without the "Accept-*" stuff, still, not working.

    Has anyone tried this before, and was successful?
    Or maybe tried it and failed?


    Not tried it myself.. try using a packet logger like WPEXP to see what's actually going on when you do it manually.. maybe you missed something...
    And this probably isn't related as it would stop it working at all.. but isn't there supposed to be 2 CrLFs after the header?

    Good luck,


      No, it's fine, since you send the string - I do get response from server.

      I'll try WPEXP, I used mozilla's 'Live HTTP Headers' to catch the one I sent normally.

      Thanks for your help, I'll report back soon

      EDIT: Reporting back. After expermenting with the program, I've tried to make it as a "GET" method. Worked. I replaced the POST with GET, and added %string to the header - works perfectly.

      Thanks for your help, Andy.


        glad to hear you got it sorted.
        Just out of curiosity what language are you writing this in?



          Originally posted by _AndY_
          glad to hear you got it sorted.
          Just out of curiosity what language are you writing this in?

          Erm, sorry for the long long delay, didn't see it

          Was written in mIRC Scripting :P