somewhat gracefully handle missing ossl, fix missing method

git-svn-id: file:///home/svn/incoming/trunk@3014 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-11-03 04:43:19 +00:00
parent 46a9a9e51e
commit da05fa0415
3 changed files with 18 additions and 3 deletions

View File

@ -1,10 +1,11 @@
require 'openssl'
module Rex
module Proto
module SMB
class Crypt
begin
require 'openssl'
def self.lanman_des(pass, chal)
e_p24( [ e_p16( [ pass.upcase()[0,14] ].pack('a14') ) ].pack('a21'), chal)
end
@ -53,6 +54,10 @@ class Crypt
def self.md5_hash(data)
digest = OpenSSL::Digest::Digest.digest('md5', data)
end
rescue LoadError
end
end
end
end

View File

@ -1,4 +1,3 @@
require 'openssl'
require 'rex/socket'
###
@ -9,6 +8,9 @@ require 'rex/socket'
###
module Rex::Socket::SslTcp
begin
require 'openssl'
include Rex::Socket::Tcp
##
@ -75,4 +77,7 @@ protected
attr_accessor :sslsock, :sslctx
rescue LoadError
end
end

View File

@ -14,6 +14,11 @@ class Input::Stdio < Rex::Ui::Text::Input
return $stdin.gets
end
def _print_prompt(prompt)
$stdout.print(prompt)
$stdout.flush
end
def eof?
return $stdin.eof?
end