소스 검색

removed debug print from server

now calling protected method in client
master
DragonSkills99 5 년 전
부모
커밋
168325b965
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    0
      chap-client.py
  2. 0
    2
      chap-server.py

+ 2
- 0
chap-client.py 파일 보기

@@ -9,6 +9,8 @@ s = xmlrpc.client.ServerProxy('http://localhost:8000')
key = s.init()
# does the actual authentication
print( s.auth( hashlib.sha256( ( 'Test123' + key ).encode( 'utf-8' ) ).hexdigest() ) )
# tests protected method
print( s.hello() )

# Print list of available methods
print( s.system.listMethods() )

+ 0
- 2
chap-server.py 파일 보기

@@ -35,8 +35,6 @@ class CHAP:
def auth(self, password_hash):
combined = CHAP.test_password + self.key
passhash = hashlib.sha256( combined.encode( 'utf-8' ) ).hexdigest()
print( passhash )
print( password_hash )
self.authenticated = passhash == password_hash
return self.authenticated


Loading…
취소
저장