#PoC CVE-2011-0762 ( vsftpd ) #Remote Denial of Service #Affected: 2.3.2 #Fix: 2.3.4 #Author: # A script that will pretend to resize a number of images require 'optparse' # This hash will hold all of the options # parsed from the command-line by # OptionParser. options = {} optparse = OptionParser.new do|opts| # Set a banner, displayed at the top # of the help screen. opts.banner = "Usage: vsftpd2.3.2dos.rb [options] HOST PORT" # Define the options, and what they do options[:verbose] = false opts.on( '-v', '--verbose', 'Output more information' ) do options[:verbose] = true end # This displays the help screen, all programs are # assumed to have this option. opts.on( '-h', '--help', 'Display Help' ) do puts opts exit end end #puts optparse # Parse the command-line. Remember there are two forms # of the parse method. The 'parse' method simply parses # ARGV, while the 'parse!' method parses ARGV and removes # any options found there, as well as any parameters for # the options. What's left is the list of files to resize. optparse.parse! puts "Being verbose" if options[:verbose] if ARGV.length < 2 || ARGV.length > 2 puts "Usage: vsftpd2.3.2dos.rb [options] HOST PORT" end #ARGV.each do|f| # puts "Resizing image #{f}..." # sleep 0.5 #end