diff options
Diffstat (limited to 'server/piztor/prob.py')
-rw-r--r-- | server/piztor/prob.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/server/piztor/prob.py b/server/piztor/prob.py index 0ed328f..17e7972 100644 --- a/server/piztor/prob.py +++ b/server/piztor/prob.py @@ -6,7 +6,7 @@ def get_hex(data): return "".join([hex(ord(c))[2:].zfill(2) for c in data]) host = "localhost" -port = 9990 +port = 2222 def gen_auth(username, password): length = 4 + 1 + len(username) + 1 + len(password) + 1 @@ -56,13 +56,17 @@ def send(data): from sys import argv -if len(argv) == 2: - host = argv[1] - username = "hello" password = "world" gid = 1 +if len(argv) == 2: + host = argv[1] + +if len(argv) == 3: + username = argv[1] + password = arv[2] + resp = send(gen_auth(username, password)) pl, optcode, status, uid, token = unpack("!LBBL32s", resp) print "size: " + str((pl, len(resp))) |