parent
33519b1fcd
commit
a5fb898904
2
Gemfile
2
Gemfile
|
@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
||||||
# Add default group gems to `metasploit-framework.gemspec`:
|
# Add default group gems to `metasploit-framework.gemspec`:
|
||||||
# spec.add_runtime_dependency '<name>', [<version requirements>]
|
# spec.add_runtime_dependency '<name>', [<version requirements>]
|
||||||
gemspec
|
gemspec
|
||||||
|
gem 'pry'
|
||||||
group :db do
|
group :db do
|
||||||
# Needed for Msf::DbManager
|
# Needed for Msf::DbManager
|
||||||
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
|
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
|
||||||
|
|
|
@ -53,6 +53,7 @@ GEM
|
||||||
arel (3.0.3)
|
arel (3.0.3)
|
||||||
bcrypt (3.1.7)
|
bcrypt (3.1.7)
|
||||||
builder (3.0.4)
|
builder (3.0.4)
|
||||||
|
coderay (1.1.0)
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.2.5)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
factory_girl (4.4.0)
|
factory_girl (4.4.0)
|
||||||
|
@ -71,6 +72,7 @@ GEM
|
||||||
activerecord (>= 3.2.13, < 4.0.0)
|
activerecord (>= 3.2.13, < 4.0.0)
|
||||||
activesupport
|
activesupport
|
||||||
pg
|
pg
|
||||||
|
method_source (0.8.2)
|
||||||
mini_portile (0.6.0)
|
mini_portile (0.6.0)
|
||||||
msgpack (0.5.8)
|
msgpack (0.5.8)
|
||||||
multi_json (1.0.4)
|
multi_json (1.0.4)
|
||||||
|
@ -80,6 +82,10 @@ GEM
|
||||||
packetfu (1.1.9)
|
packetfu (1.1.9)
|
||||||
pcaprub (0.11.3)
|
pcaprub (0.11.3)
|
||||||
pg (0.17.1)
|
pg (0.17.1)
|
||||||
|
pry (0.9.12.6)
|
||||||
|
coderay (~> 1.0)
|
||||||
|
method_source (~> 0.8)
|
||||||
|
slop (~> 3.4)
|
||||||
rack (1.4.5)
|
rack (1.4.5)
|
||||||
rack-cache (1.2)
|
rack-cache (1.2)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
|
@ -124,6 +130,7 @@ GEM
|
||||||
multi_json (~> 1.0.3)
|
multi_json (~> 1.0.3)
|
||||||
simplecov-html (~> 0.5.3)
|
simplecov-html (~> 0.5.3)
|
||||||
simplecov-html (0.5.3)
|
simplecov-html (0.5.3)
|
||||||
|
slop (3.5.0)
|
||||||
sprockets (2.2.2)
|
sprockets (2.2.2)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
@ -150,6 +157,7 @@ DEPENDENCIES
|
||||||
network_interface (~> 0.0.1)
|
network_interface (~> 0.0.1)
|
||||||
pcaprub
|
pcaprub
|
||||||
pg (>= 0.11)
|
pg (>= 0.11)
|
||||||
|
pry
|
||||||
rake (>= 10.0.0)
|
rake (>= 10.0.0)
|
||||||
redcarpet
|
redcarpet
|
||||||
rspec (>= 2.12)
|
rspec (>= 2.12)
|
||||||
|
|
|
@ -140,6 +140,10 @@ module Metasploit
|
||||||
cmd << ( "--rules=" + rules )
|
cmd << ( "--rules=" + rules )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if max_runtime.present?
|
||||||
|
cmd << ( "--max-run-time=" + max_runtime.to_s)
|
||||||
|
end
|
||||||
|
|
||||||
cmd << hash_path
|
cmd << hash_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ describe Metasploit::Framework::JtR::Cracker do
|
||||||
let(:nt_format) { 'nt' }
|
let(:nt_format) { 'nt' }
|
||||||
let(:incremental) { 'Digits5' }
|
let(:incremental) { 'Digits5' }
|
||||||
let(:rules) { 'Rule34'}
|
let(:rules) { 'Rule34'}
|
||||||
|
let(:max_runtime) { 5000 }
|
||||||
|
|
||||||
describe '#binary_path' do
|
describe '#binary_path' do
|
||||||
|
|
||||||
|
@ -110,6 +111,11 @@ describe Metasploit::Framework::JtR::Cracker do
|
||||||
expect(cracker.crack_command).to include "--rules=#{rules}"
|
expect(cracker.crack_command).to include "--rules=#{rules}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'uses the user supplied max-run-time' do
|
||||||
|
cracker.max_runtime = max_runtime
|
||||||
|
expect(cracker.crack_command).to include "--max-run-time=#{max_runtime.to_s}"
|
||||||
|
end
|
||||||
|
|
||||||
it 'puts the path to the has file at the end' do
|
it 'puts the path to the has file at the end' do
|
||||||
cracker.hash_path = hash_path
|
cracker.hash_path = hash_path
|
||||||
expect(cracker.crack_command.last).to eq hash_path
|
expect(cracker.crack_command.last).to eq hash_path
|
||||||
|
|
Loading…
Reference in New Issue