Skip to content

Commit 2be5ae3

Browse files
committed
Fix bugs
1 parent 0ff114b commit 2be5ae3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/egghunter.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ def self.parse(args)
2020
opt.separator ''
2121
opt.separator 'Specific options:'
2222

23-
options[:badchars] = ''
24-
options[:platform] = 'windows'
25-
options[:arch] = ARCH_X86 # 'x86'
26-
2723
opt.on('-f', '--format <String>', "See --list-formats for a list of supported output formats") do |v|
2824
options[:format] = v
2925
end
@@ -47,7 +43,7 @@ def self.parse(args)
4743

4844
opt.on('--forward', "(Optional) To search forward") do |v|
4945
# Do not change this key. This should matching the one in Rex::Exploitation::Egghunter
50-
options[:startreg] = true
46+
options[:searchforward] = true
5147
end
5248

5349
opt.on('--depreg <String>', "(Optional) The DEP register") do |v|
@@ -99,6 +95,10 @@ def self.parse(args)
9995
raise OptionParser::InvalidOption, "--depsize must be a Fixnum"
10096
end
10197

98+
options[:badchars] = '' unless options[:badchars]
99+
options[:platform] = 'windows' unless options[:platform]
100+
options[:arch] = ARCH_X86 unless options[:arch]
101+
102102
options
103103
end
104104
end

0 commit comments

Comments
 (0)