-
Notifications
You must be signed in to change notification settings - Fork 26
get_server_info errors out on pytan 2.0.3 against tanium 6.2 #9
Comments
Nevermind - just read the subject. Is port 444 open on your firewall for your tanium server? Port 444 is necessary for pytan to access /info (and /info.json) in 6.2 |
Yeah the connection is made to 444 just fine and everything works it's just returning that weird string instead of json. I hard-coded the "server version" to 6.2 so get_server_info is never called and everything works fine (question fires and returns the expected results). |
That's.. odd. I've never seen that. Though that string aligns with what would be a session-id, possibly. I'm about to check in a change to pytan.sessions.Sessions.get_server_info() that makes that function a little more error proof. Mind trying with the develop branch? |
Point of note, http_post is SUPPOSED to return a string. get_server_info() is supposed to parse that string as json into a python dict here: https://github.com/tanium/pytan/blob/2.0.3/lib/pytan/sessions.py#L389 |
Oh right when I said string I just meant it wasn't a json structure (ie it wouldn't be a dictionary which was expected). I went home for the day but I can checkout the dev branch (just master or is there another one?) and see what happens. |
The develop branch is here: https://github.com/tanium/pytan/tree/develop It contains the next version of PyTan (which is likely to be 2.1.0, although it's currently marked as 2.0.4). I check in all my changes to develop and once I've fully tested them all, I push to master and do version increments/etc. |
Okay cool I'll give it a shot tomorrow and let you know how it goes. Thanks! |
Wow that's a lot of documentation in that branch; nice job! Anyway got this exception now:
info_dict is what you're setting in the json.loads exception body; with a value equal to the string I posted above. |
Are you able to webex with me? let's take this direct to email, something is going on that I can't see through what you've provided me. |
Fixed in 2.1.0. Thanks! |
In pytan.sessions.py the function
get_server_info
it looks likeself.http_post
is returning a str instead of json:This of course is problematic as you can't call
get
on a unicode string. The library technically continues functioning after the exception is thrown though...I don't really have access to the Tanium instance but I can try to work with the platform owner if this is unexpected. I did a simple get on /info.json and it looks like the second number increases every time and the last bit is random (I tried hex decoding it but it was gibberish).
The text was updated successfully, but these errors were encountered: