Skip to content

Commit f45e8f4

Browse files
committed
Custom var name
1 parent 2be5ae3 commit f45e8f4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/egghunter.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def self.parse(args)
7575
options[:list_formats] = true
7676
end
7777

78+
opt.on('-v', '--var-name <name>', String, '(Optional) Specify a custom variable name to use for certain output formats') do |v|
79+
options[:var_name] = v
80+
end
81+
7882
opt.on_tail('-h', '--help', 'Show this message') do
7983
$stdout.puts opt
8084
exit
@@ -124,7 +128,7 @@ def run
124128
raw_code = egghunter.hunter_stub('', @opts[:badchars], @opts)
125129
output_stream = $stdout
126130
output_stream.binmode
127-
output_stream.write ::Msf::Simple::Buffer.transform(raw_code, @opts[:format])
131+
output_stream.write ::Msf::Simple::Buffer.transform(raw_code, @opts[:format], @opts[:var_name])
128132
end
129133

130134
private

0 commit comments

Comments
 (0)