summaryrefslogtreecommitdiff
path: root/server/piztor/prob.py
diff options
context:
space:
mode:
Diffstat (limited to 'server/piztor/prob.py')
-rw-r--r--server/piztor/prob.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/server/piztor/prob.py b/server/piztor/prob.py
index 57ce2fe..f18e42d 100644
--- a/server/piztor/prob.py
+++ b/server/piztor/prob.py
@@ -78,12 +78,29 @@ print "status: " + str(status)
resp = send(gen_request_location(token, username, gid))
print len(resp)
-pl, optcode, status, length = unpack("!LBBL", resp[:10])
+pl, optcode, status = unpack("!LBB", resp[:6])
print "size: " + str((pl, len(resp)))
-idx = 10
-print "length: " + str(len(resp[10:]))
-for i in xrange(length):
+idx = 6
+print "length: " + str(len(resp[6:]))
+while idx < pl:
print len(resp[idx:idx + 20])
uid, lat, lng = unpack("!Ldd", resp[idx:idx + 20])
idx += 20
print (uid, lat, lng)
+
+resp = send(gen_request_user_info(token, username, uid))
+pl, optcode, status = unpack("!LBB", resp[:6])
+print "size: " + str((pl, len(resp)))
+
+idx = 6
+while idx < pl:
+ info_key, = unpack("!B", resp[idx:idx + 1])
+ idx += 1
+ print info_key
+ if info_key == 0x00:
+ info_value, = unpack("!L", resp[idx:idx + 4])
+ idx += 4
+ elif info_key == 0x01:
+ info_value, = unpack("!B", resp[idx:idx + 1])
+ idx += 1
+ print (info_key, info_value)