Skip to content
Snippets Groups Projects
Commit b51dac58 authored by Parallels's avatar Parallels
Browse files

 Style: prompts en francais

parent 0c285d8b
No related branches found
No related tags found
No related merge requests found
Showing
with 7 additions and 7 deletions
File added
...@@ -112,10 +112,10 @@ def sign_info(auth_info: AuthInfo): ...@@ -112,10 +112,10 @@ def sign_info(auth_info: AuthInfo):
userauth_request = base64.b64decode(auth_info.userauth_request) userauth_request = base64.b64decode(auth_info.userauth_request)
username = auth_info.username username = auth_info.username
print("Signature request received for username : " + username + " and algorithm : " + algorithm) print("Demande de signature recue pour : " + username )
print("Session ID : " + str(session_id)) # print("Session ID : " + str(session_id))
print("Userauth request : " + str(userauth_request)) # print("Userauth request : " + str(userauth_request))
user_validation = input("Do you want to validate the signature? (yes/no): ") user_validation = input("Voulez vous valider la signature ? (yes/no): ")
if user_validation.lower() == 'yes' or user_validation.lower() == 'y': if user_validation.lower() == 'yes' or user_validation.lower() == 'y':
# Sending the signature back to the client # Sending the signature back to the client
...@@ -154,9 +154,9 @@ def sign_info(auth_info: AuthInfo): ...@@ -154,9 +154,9 @@ def sign_info(auth_info: AuthInfo):
m3 += hex_sequence2 m3 += hex_sequence2
m3 += pack_bytes(sig.asbytes()) # Assuming bits is a string m3 += pack_bytes(sig.asbytes()) # Assuming bits is a string
print(m3) # print(m3)
encoded_data = base64.b64encode(m3).decode('utf-8') encoded_data = base64.b64encode(m3).decode('utf-8')
print("encoded: ", encoded_data) # print("encoded: ", encoded_data)
# # Pour récupérer le binaire # # Pour récupérer le binaire
# decoded_data = base64.b64decode(encoded_data) # decoded_data = base64.b64decode(encoded_data)
...@@ -165,7 +165,7 @@ def sign_info(auth_info: AuthInfo): ...@@ -165,7 +165,7 @@ def sign_info(auth_info: AuthInfo):
print(bcolors.OKGREEN + "Transaction signée avec succes, la connexion sur l'appareil principal est ouverte" + bcolors.ENDC) print(bcolors.OKGREEN + "Transaction signée avec succes, la connexion sur l'appareil principal est ouverte" + bcolors.ENDC)
return {"message":encoded_data} return {"message":encoded_data}
else: else:
print(bcolors.FAIL + "User did not validate the signature. Closing the connection..." + bcolors.ENDC) print(bcolors.FAIL + "Signature refusée. Fermeture de la connection..." + bcolors.ENDC)
# Sending a disconnect message back to the client # Sending a disconnect message back to the client
return {"reject": base64.b64encode(bytes(MSG_DISCONNECT)).decode('utf-8')} return {"reject": base64.b64encode(bytes(MSG_DISCONNECT)).decode('utf-8')}
......
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment