summaryrefslogtreecommitdiff
path: root/server/piztor/prober.py
diff options
context:
space:
mode:
Diffstat (limited to 'server/piztor/prober.py')
-rw-r--r--server/piztor/prober.py72
1 files changed, 36 insertions, 36 deletions
diff --git a/server/piztor/prober.py b/server/piztor/prober.py
index 613d667..daf63b9 100644
--- a/server/piztor/prober.py
+++ b/server/piztor/prober.py
@@ -77,7 +77,6 @@ username = "hello"
password = "world"
#username = "1234567890123456789012"
#password = "world12345678901234567890"
-gid = 1
failed_cnt = 0
if len(argv) == 2:
@@ -96,11 +95,11 @@ for i in xrange(10):
failed_cnt += 1
continue
if pl != len(resp): print "God!"
-# print "size: " + str((pl, len(resp)))
-# print "opt: " + str(optcode)
-# print "status: " + str(status)
-# print "uid: " + str(uid)
-# print "token: " + get_hex(token)
+ print "size: " + str((pl, len(resp)))
+ print "opt: " + str(optcode)
+ print "status: " + str(status)
+ print "uid: " + str(uid)
+ print "token: " + get_hex(token)
resp = send(gen_update_location(token, username, random(), random()))
try:
@@ -108,51 +107,52 @@ for i in xrange(10):
except:
print "fuck2"
if pl != len(resp): print "God!"
-# print "size: " + str((pl, len(resp)))
-# print "opt: " + str(optcode)
-# print "status: " + str(status)
-
- resp = send(gen_request_location(token, username, gid))
- try:
- pl, optcode, status = unpack("!LBB", resp[:6])
- except:
- print "fuck3"
- if pl != len(resp): print "God!"
-# print "size: " + str((pl, len(resp)))
- idx = 6
-# print "length: " + str(len(resp[6:]))
- try:
- while idx < pl:
-# print len(resp[idx:idx + 20])
- uid, lat, lng = unpack("!Ldd", resp[idx:idx + 20])
- idx += 20
- except:
- print "fuck4"
-# print (uid, lat, lng)
-
+ print "size: " + str((pl, len(resp)))
+ print "opt: " + str(optcode)
+ print "status: " + str(status)
+
resp = send(gen_request_user_info(token, username, uid))
try:
pl, optcode, status = unpack("!LBB", resp[:6])
except:
print "fuck5"
if pl != len(resp): print "God!"
-# print "size: " + str((pl, len(resp)))
+ print "size: " + str((pl, len(resp)))
idx = 6
try:
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])
+ gid, = unpack("!L", resp[idx:idx + 4])
idx += 4
+ print "gid: {}".format(str(gid))
elif info_key == 0x01:
- info_value, = unpack("!B", resp[idx:idx + 1])
+ sex, = unpack("!B", resp[idx:idx + 1])
idx += 1
-# print (info_key, info_value)
+ print "sex: {}".format(str(sex))
except:
print "fuck6"
+
+ resp = send(gen_request_location(token, username, gid))
+ try:
+ pl, optcode, status = unpack("!LBB", resp[:6])
+ except:
+ print "fuck3"
+ if pl != len(resp): print "God!"
+ print "size: " + str((pl, len(resp)))
+ idx = 6
+ print "length: " + str(len(resp[6:]))
+ try:
+ while idx < pl:
+ print len(resp[idx:idx + 20])
+ uid, lat, lng = unpack("!Ldd", resp[idx:idx + 20])
+ idx += 20
+ print (uid, lat, lng)
+ except:
+ print "fuck4"
+
resp = send(gen_logout(token, username))
try:
@@ -160,9 +160,9 @@ for i in xrange(10):
except:
print "fuck7"
if pl != len(resp): print "God!"
-# print "size: " + str((pl, len(resp)))
-# print "opt: " + str(optcode)
-# print "status: " + str(status)
+ print "size: " + str((pl, len(resp)))
+ print "opt: " + str(optcode)
+ print "status: " + str(status)
sleep(10)
print failed_cnt