Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new hashcat parameter #18

Merged
merged 2 commits into from Mar 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkers_available/external_list_checker.rb
Expand Up @@ -25,7 +25,7 @@ def parse_params opts
end

if @file_name.nil?
puts "External File Checker - No file specified, aborting"
puts "External File Checker - No file specified, use --ext.file to specify the file to use. Aborting"
exit 1
# raise Exception.new(true), "External File Checker - No file specified"
end
Expand Down
22 changes: 21 additions & 1 deletion checkers_available/hashcat_mask_generator.rb
@@ -1,11 +1,26 @@
register_checker("Hashcat_Mask_Generator")

class Hashcat_Mask_Generator < Checker
@override_cap = false

def initialize
super
@description = "Hashcat mask generator"
@hashcat_masks = {}
@cli_params = [['--hashcat.all', GetoptLong::NO_ARGUMENT]]
end

def usage
return "\t--hashcat.all: return Hashcat masks for all passwords\n\t\t\tThis overrides --top"
end

def parse_params opts
opts.each do |opt, arg|
case opt
when '--hashcat.all'
@override_cap = true
end
end
end

def process_word (word, extras = nil)
Expand Down Expand Up @@ -34,7 +49,12 @@ def process_word (word, extras = nil)
end

def get_results()
ret_str = "Hashcat masks (Top #{@cap_at.to_s})\n\n"
if @override_cap
@cap_at = @hashcat_masks.length
ret_str = "Hashcat masks\n\n"
else
ret_str = "Hashcat masks (Top #{@cap_at.to_s})\n\n"
end

count_ordered = []
@hashcat_masks.each_pair do |name, data|
Expand Down