Several fixes to authenticator, added more unit tests

Some fixes include, in more detail:
- Using little over big endianess in some parts
- Flagging all the constructor numbers as unsigned
- Fixed bugs with factorizer
- Implemented TLSharp's RSA
This commit is contained in:
Lonami
2016-09-03 10:54:58 +02:00
parent 12cb66ab2c
commit 75a648f438
28 changed files with 226 additions and 53 deletions

9
main.py Normal file → Executable file
View File

@@ -1,10 +1,15 @@
import parser.tl_generator
from network.tcp_transport import TcpTransport
from network.authenticator import do_authentication
if __name__ == '__main__':
if not parser.tl_generator.tlobjects_exist():
print('First run. Generating TLObjects...')
parser.tl_generator.generate_tlobjects('scheme.tl')
print('Done.')
pass
transport = TcpTransport('149.154.167.91', 443)
auth_key, time_offset = do_authentication(transport)
print(auth_key)
print(time_offset)