¿Alguien tiene idea de que estoy haciendo mal?
PD: también he probado a intentar lo mismo con el paquete "tcllib-1.14.kit" ya que el des.tcl va incluido en su interior.
Gracias.
El script que intento correr:
Código:
package require des
puts "\naMSN Password Decryptor 0.1"
puts "by: bruno.borges@gmail.com"
puts "--------------------------"
if {$argc < 2} {
puts "Invalid arguments. Please do: $argv0 <login> <encpassword> \[<remotepass>\]"
exit 1
}
set i_login [lindex $argv 0]
set i_encpassword [lindex $argv 1]
if {$argc == 3} {
set i_rempass [lindex $argv 2]
}
puts "Login: $i_login"
puts "Encpassword: $i_encpassword"
#Get the encrypted password
set key [string range $i_login"dummykey" 0 7]
set password "$i_encpassword"
catch {set encpass [binary format h* "$i_encpassword"]}
catch {set password [::DES::des -mode ecb -dir decrypt -key $key -- $encpass]}
puts "Password length is: [string first "\n" $password]"
set password [string range $password 0 [expr { [string first "\n" $password] -1 }]]
puts "Password is: $password"
#Get the encrypted remote password
if {$argc == 3} {
set key [string range $i_login"dummykey" 0 7]
catch {set encpass [binary format h* $i_rempass]}
catch {set remotepassword [::DES::des -mode ecb -dir decrypt -key $key -- $encpass]}
puts "Remote Password length is: [string first "\n" $remotepassword]\n"
set remotepassword [string range $remotepassword 0 [expr { [string first "\n" $remotepassword] -1 }]]
puts "Remote Password is: $remotepassword"
}