1. Llamatron

    Llamatron New Member

    Messages:
    133
    Likes Received:
    0
    I was using the default urllib from Python 3.2, it should support digest authentication, apparently there's been a few issues with it but I didn't see a recent bug report that could explain why it wasn't working. Except maybe some realm issue, the server gives something like "mydomain.com".

    I've set up a SF page at https://sourceforge.net/projects/mncservermon/ , guess the MNCServer class could save some time if some people want to write something using java.
  2. racquemis

    racquemis New Member

    Messages:
    289
    Likes Received:
    0
    currently the code for the serverlist is not ver user friendly, no commenting and pretty coding style (hate to do everything the "correct" way :p)
    If post the code if it's finished, trying to work a out a way in which i don't need a database and background query system (script takes ages to complete when it's querying all 464 servers in the master serverlist.)
    Then the wait the starts for the unauthenticated webadmin, it will make so much possible for this script im building.

    if anyone has any suggestions of speeding up the query process using php please let me know, currently using fsocksopen & fread to send and retrieve data.
  3. CoZmicShReddeR

    CoZmicShReddeR New Member

    Messages:
    1
    Likes Received:
    0
  4. racquemis

    racquemis New Member

    Messages:
    289
    Likes Received:
    0
    MNC uses different classes then UT3, that webadmin wouldnt work.
    i'll think ill just work with multithreading the script, running multiple instances, querying 20 servers at a time on a daily basis + live update when a a visitor requests information about a particular server.

    Serverlist code is coming along nicely, now fixed all the bugs with retrieving servers and added the ability to sort on region/country:
    preview of functionality:
    http://178.18.89.72/masterserver.php
  5. o

    o Head Honcho Official PA

    Messages:
    132
    Likes Received:
    39
    From their documentation:
    In other words, both methods are NOT secure. :)

    It's a fundamental problem with their web server implementation. I started down the road of just adding digest authentication and got it mostly working and then I discovered mongoose embedded server. It was pretty trivial to drop it into the engine and have everything "just work".
  6. christianhood

    christianhood New Member

    Messages:
    2
    Likes Received:
    0
    I decided to try and make a C# library for WebAdmin access, but I'm also having problems with the Digest authentication. I set the authentication type to digest, but it's still giving me error 401: unauthenticated.

    I also have the problem with IE9 not authenticating, but chrome authenticates just fine.

    Edit: It may have something to do with this? http://stackoverflow.com/questions/2192 ... e-are-fine
  7. o

    o Head Honcho Official PA

    Messages:
    132
    Likes Received:
    39
    For testing Digest Auth I used Firefox, Chrome, and Python w/ httplib and urllib. I ignored IE intentionally. Please don't use that awful browser :)

    For the Python test, I didn't know of any libraries that handled digest auth so I wrote all the stuff manually. This made sense with my original strategy of simply adding digest auth support to Unreal's existing web server because I needed very precise control over the whole process to implement it correctly. Once I decided to dump Unreal's web server in favor of mongoose, which already had digest auth support out of the box, I stopped using python for testing.

    So I ran my python test again and it failed auth. Turns out there was a mongoose bug in the handling of the auth header. It so happens that my python script was constructing the auth header in the same way IE constructs it, without extra spaces separating the elements. This is why Chrome and FF worked fine, but IE did not (and neither did my python script).

    Fixed in the next patch.
  8. christianhood

    christianhood New Member

    Messages:
    2
    Likes Received:
    0
    I managed to make my own digest method instead of using the built in .NET one which allowed me to make some progress on my library.

    I put it up on codeplex (http://mncwebadminapi.codeplex.com/) incase anyone is interested. The actual library is pretty close to complete, but I would use the WPF application with caution or not at all.
  9. Llamatron

    Llamatron New Member

    Messages:
    133
    Likes Received:
    0
    Anything new regarding the webadmin api in this patch? At least the chathistory is working now (don't think it was fixed in the previous patch)

    EDIT: chat history is reset when a new round starts, is it intended?

    EDIT2: uploaded a new version for the java server monitor, with a working chat.
  10. o

    o Head Honcho Official PA

    Messages:
    132
    Likes Received:
    39
    Nope, that's a bug.
  11. iNilo

    iNilo New Member

    Messages:
    13
    Likes Received:
    0
    -Deleted- sorry :)
    Last edited: May 8, 2011
  12. iNilo

    iNilo New Member

    Messages:
    13
    Likes Received:
    0
    I'm working on a chat script, but its annoying that the ingame message says : "[ADMIN]"
    is it possible to remove that ? We can put our name manually there,so then it just sends a chat string to the server :)
    example : instead of :
    "[ADMIN][Rules] : Dont eat to much bacon"
    "[ADMIN][Admin] : Yes, the assasin is hot"
    "[ADMIN][Info] : Server will reboot tomorrow"

    it would be :
    "[Rules] : Dont eat to much bacon"
    "[Admin] : Yes, the assasin is hot"
    "[Info] : Server will reboot tomorrow"

    Thanks :)
    Comment please :)
  13. o

    o Head Honcho Official PA

    Messages:
    132
    Likes Received:
    39
    Done. Will be in next patch.
  14. racquemis

    racquemis New Member

    Messages:
    289
    Likes Received:
    0
    I've noticed that score and TotalPoints on the playerdetails remain at 0 during the match

    will these two variables be removed or fixed? currently i have included those variables in my server statistics script i'm building. can i just leave them there ?
  15. iNilo

    iNilo New Member

    Messages:
    13
    Likes Received:
    0
    Thank you so much ! <3
  16. Llamatron

    Llamatron New Member

    Messages:
    133
    Likes Received:
    0
    Chat history comes out all funky for me, apparently with some characters (t, r for example) replaced by tabulation, and B, f replaced by non displayable chars, anyone else having this?
  17. racquemis

    racquemis New Member

    Messages:
    289
    Likes Received:
    0
    Yes, Inilo and I informed o of an issue with unescaped characters, putting JSON control characters in your name would make parsing JSON data impossible. A fix for this was added to the patch. but apparently it replaces normal characters with escaped ones.

    r is replaced with /r
    n is replaced with /n
    b is replaced with /b

    since /b /r /n are something totally different the normal characters won't show.

    I've already emailed Bob about it.

    Also another issue:
    There is a , after every Timestamp value which caused some JSON parsers to fail.
  18. bigbot

    bigbot New Member

    Messages:
    1
    Likes Received:
    0
    Can you give us more information about which console commands work and how to use them through the API? I would like to possibly create a GUI app that uses all the commands that I can discover.

    I haven't been able to get any console commands to work so far with the API. It seems that the format is console?cmd=/(command). The slash seems to be required. I have tried commands such as "exit", "restartmap", "restartlevel", etc and none of them have worked. Some of these commands don't seem to work in the game console either (restartmap and restartlevel even..)

    It would be really useful to compile a list of ALL console commands both in the game and usable with the API. Here are the API commands I know about. You can just paste these into a browser as well:

    Format: http://server:8080/(command)

    Commands:

    serverstatus
    playerlist
    playerdetails?id=(player id)
    kick?id=(player id)
    kickban?id=(player id)
    listbans
    unban?id=(player id)
    chathistory?time=0
    sendchat?msg=(message)

    Unknown Commands:

    Restart Server
    Shutdown Server
    Change Map
    Console Commands
  19. ruohki

    ruohki New Member

    Messages:
    2
    Likes Received:
    0
    Hi maybe i missed this one but... how do i access multible serverinstances? Those is startet with -ServerInstance=x? I noticed that all servers are trying to bind the webadmin port to the one i set in the config... Is there a way to set different webadmin for different instances without copying the server to a whole new directory?

    Edit:

    nvm found a post by racquemis :)
  20. courgette

    courgette New Member

    Messages:
    2
    Likes Received:
    0
    Hi,

    I'd like to report an issue with the json returned by the chathistory command which is not valid because of a trailing coma.

    Also, regarding the character issue, could not the json be encoded with the UTF-8 charset ?

Share This Page