Significant headway on the rewrite.
Handle crypto with the excellent crytography library, still a lot of TODOs to take care of but at least we can connect now
This commit is contained in:
1 parent
f68206140b
commit
7e8df47352
8 files changed
+424
-96
No files matched your search
@@ -5,9 +5,6 @@ from optparse import OptionParser
|
||||
import authentication
|
||||
|
||||
|
||||
PROTOCOL_VERSION = 5
|
||||
|
||||
|
||||
def main():
|
||||
parser = OptionParser()
|
||||
|
||||
@@ -28,13 +25,13 @@ def main():
|
||||
if not options.password:
|
||||
options.password = getpass.getpass("Enter your password: ")
|
||||
|
||||
login_response = authentication.login_to_minecraft(options.username, options.password)
|
||||
from pprint import pprint # TODO: remove debug
|
||||
try:
|
||||
login_response = authentication.login_to_minecraft(options.username, options.password)
|
||||
from pprint import pprint # TODO: remove debug
|
||||
|
||||
pprint(vars(login_response)) # TODO: remove debug
|
||||
|
||||
if login_response.error:
|
||||
print login_response.human_error
|
||||
pprint(vars(login_response)) # TODO: remove debug
|
||||
except authentication.YggdrasilError as e:
|
||||
print e.human_readable_error
|
||||
return
|
||||
|
||||
print("Logged in as " + login_response.username)
|
||||
@@ -53,7 +50,7 @@ def main():
|
||||
from network.connection import Connection
|
||||
|
||||
connection = Connection(address, port, login_response)
|
||||
connection.status()
|
||||
connection.connect()
|
||||
|
||||
while True:
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user