Skip to content

Commit

Permalink
Update bofk-cli.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
KINGSABRI committed Feb 3, 2013
1 parent 7edfb37 commit cde5ab8
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions bofk-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
GEMS = "#{APP_ROOT}/gems"
BIN = "#{APP_ROOT}/bin"
OUT = "#{APP_ROOT}/out"

VERSION = "0.0.4"

require "#{GEMS}/colorize-0.5.8/lib/colorize.rb"
require 'pattern'
Expand Down Expand Up @@ -50,23 +50,28 @@
options[:bin2hex] = bin2hex
end
#--> Version
#opts.on('-V', '--version', 'Display Buffer Overflow Kit version.') do |v|
# options[:version] = v
#end
opts.on('-v', '--version', 'Display Buffer Overflow Kit version.') do |v|
options[:version] = v
end
#--> Help screen
opts.banner = "\nUsage:".underline +
" ruby bofk-cli.rb {OPTIONS} ARGUMENT\n" +
"\nExamples:\n".underline +
"ruby bofk-cli.rb --pattern-create 500\n" +
"ruby bofk-cli.rb --pattern-offset Aa4Z\n" +
"ruby bofk-cli.rb --hex2endl 0x41F2E377\n" +
"ruby bofk-cli.rb --hex2bin input.txt output.bin\n" +
"ruby bofk-cli.rb --bin2hex input.bin\n\n"

opts.on( '-h', '--help', "Display this screen \n" ) do
decor = decoration.decorate("Help screen")
" ruby bofk-cli.rb {OPTIONS} ARGUMENT\n\n"

opts.on( '-h', '--help', "Display help screen \n" ) do
decor = decoration.decorate("Help screen.")
puts "#{decor[:head]}".light_blue + "#{decor[:title]}".white + "#{decor[:tail]}".light_blue
puts "#{opts}"

puts "\nExternal tools - bin/\n".underline +
"[-] hex2bin.rb \t Hex to Binary file - BoFkit.\n" +
"[-] nasm.exe \t Assembler and disassembler.\n" +
"[-] mona.py \t Immunity debugger plugin - Corelan team.\n"

puts "\nExamples:\n".underline +
"ruby bofk-cli.rb --pattern-create 500\n" +
"ruby bofk-cli.rb --pattern-offset Aa4Z\n" +
"ruby bofk-cli.rb --hex2endl 0x41F2E377\n" +
"ruby bofk-cli.rb --bin2hex input.bin\n\n"
puts "#{decor[:end]}".light_blue
exit
end
Expand Down Expand Up @@ -135,7 +140,10 @@

#--> Version
when options[:version]
puts "You should include lib/version.rb file"
decor = decoration.decorate("BoFKit Version")
puts "#{decor[:head]}".light_blue + "#{decor[:title]}".white + "#{decor[:tail]}".light_blue
puts "#{VERSION}"
puts "#{decor[:end]}".light_blue

else
decor = decoration.decorate("Help screen")
Expand Down

0 comments on commit cde5ab8

Please sign in to comment.