SHARE
TWEET

kk.py

a guest Oct 4th, 2017 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def Break_auth_XMPP_test() :
  2.    
  3.     #Details du client :
  4.    
  5.     Username = "user"
  6.     password = "pencil"
  7.    
  8.     #Le client génére le random Nonce : fyko+d2lbbFgONRv9qkxdawL
  9.    
  10.     # Message envoyé par le client : n,,n=user,r=fyko+d2lbbFgONRv9qkxdawL
  11.    
  12.     ClientNonce = "fyko+d2lbbFgONRv9qkxdawL"
  13.    
  14.     #Le serveur génére le Nonce : 3rfcNHYJY1ZVvWVs7j
  15.    
  16.     #Message envoyé par le serveur : r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,s=QSXCR+Q6sek8bf92,i=4096
  17.    
  18.     NonceServeur = "fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j"  
  19.    
  20.     #On decode le Salt et l'encode en hex ca donne :
  21.     salt = "4125c247e43ab1e93c6dff76"
  22.    
  23.     #Client final message bare: c=biws,r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j
  24.    
  25.    
  26.     # Calcul du salted password  : saltedPassword = PBKDF2-SHA-1(normalizedPassword, Salt, i)  
  27.    
  28.     normalizedPassword = bytes(password,'UTF-8')
  29.     salt = bytes(salt,'UTF-8')    
  30.     saltedPassword = hashlib.pbkdf2_hmac('sha1',normalizedPassword , salt, 4096)
  31.     saltedPassword = binascii.hexlify(saltedPassword)
  32.     print ("le salted Password est : "+str(saltedPassword)+"")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top