daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Get the encrypted password
  2. set key [string range $i_login"dummykey" 0 7]
  3. set password "$i_encpassword"
  4. catch {set encpass [binary format h* "$i_encpassword"]}
  5. catch {set password [::DES::des -mode ecb -dir decrypt -key $key -- $encpass]}
  6. puts "Password length is: [string first "n" $password]"
  7. set password [string range $password 0 [expr { [string first "n" $password] -1 }]]
  8. puts "Password is: $password"
  9.    
  10. require 'rubygems'
  11. require 'openssl'
  12.  
  13. $key = "A75435F0B240012A9489000C2952E41F"
  14.  
  15. class String
  16.  
  17.  
  18. def decrypt(key=$key)
  19. e = OpenSSL::Cipher::Cipher.new 'DES-EDE3-CBC'
  20. e.pkcs5_keyivgen key
  21. s = self.to_a.unpack("H*")
  22. s = e.update s
  23. s << e.final
  24. end
  25. end
  26.  
  27.  
  28. puts "509067DC2076497134DBF9A7DE5992B2".decrypt("password")
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
 
Top