Fix #8685, Check nil condition for #wordlist_file in jtr modules
JTR modules should never assume there is always a database connected while using #wordlist_file, considering a database is an optional component for Framework. Fix #8685bug/bundler_fix
parent
2ee6df66cf
commit
fe360e3e2a
|
@ -32,6 +32,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
# generate our wordlist and close the file handle
|
||||
wordlist = wordlist_file
|
||||
unless wordlist
|
||||
print_error('This module cannot run without a database connected. Use db_connect to connect to a database.')
|
||||
return
|
||||
end
|
||||
|
||||
wordlist.close
|
||||
print_status "Wordlist file written out to #{wordlist.path}"
|
||||
cracker.wordlist = wordlist.path
|
||||
|
|
|
@ -31,6 +31,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
# generate our wordlist and close the file handle
|
||||
wordlist = wordlist_file
|
||||
unless wordlist
|
||||
print_error('This module cannot run without a database connected. Use db_connect to connect to a database.')
|
||||
return
|
||||
end
|
||||
|
||||
wordlist.close
|
||||
print_status "Wordlist file written out to #{wordlist.path}"
|
||||
cracker.wordlist = wordlist.path
|
||||
|
|
|
@ -46,6 +46,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
# generate our wordlist and close the file handle
|
||||
wordlist = wordlist_file
|
||||
unless wordlist
|
||||
print_error('This module cannot run without a database connected. Use db_connect to connect to a database.')
|
||||
return
|
||||
end
|
||||
|
||||
wordlist.close
|
||||
print_status "Wordlist file written out to #{wordlist.path}"
|
||||
cracker.wordlist = wordlist.path
|
||||
|
|
|
@ -33,6 +33,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
# generate our wordlist and close the file handle
|
||||
wordlist = wordlist_file
|
||||
unless wordlist
|
||||
print_error('This module cannot run without a database connected. Use db_connect to connect to a database.')
|
||||
return
|
||||
end
|
||||
|
||||
wordlist.close
|
||||
print_status "Wordlist file written out to #{wordlist.path}"
|
||||
cracker.wordlist = wordlist.path
|
||||
|
|
|
@ -32,6 +32,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
# generate our wordlist and close the file handle
|
||||
wordlist = wordlist_file
|
||||
unless wordlist
|
||||
print_error('This module cannot run without a database connected. Use db_connect to connect to a database.')
|
||||
return
|
||||
end
|
||||
|
||||
wordlist.close
|
||||
print_status "Wordlist file written out to #{wordlist.path}"
|
||||
cracker.wordlist = wordlist.path
|
||||
|
|
|
@ -36,6 +36,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
# generate our wordlist and close the file handle
|
||||
wordlist = wordlist_file
|
||||
unless wordlist
|
||||
print_error('This module cannot run without a database connected. Use db_connect to connect to a database.')
|
||||
return
|
||||
end
|
||||
|
||||
wordlist.close
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue