def work(argv)
      @options = DEFAULT_OPTIONS.dup
      parser.parse!(argv)
      return show("OneGadget Version #{OneGadget::VERSION}") if @options[:version]
      return info_build_id(@options[:info]) if @options[:info]

      libc_file = argv.pop
      build_id = @options[:build_id]
      level = @options[:level]
      return error('Either FILE or BuildID can be passed') if libc_file && @options[:build_id]
      return show(parser.help) && false unless build_id || libc_file

      gadgets = if build_id
                  OneGadget.gadgets(build_id: build_id, details: true, level: level)
                else # libc_file
                  OneGadget.gadgets(file: libc_file, details: true, force_file: @options[:force_file], level: level)
                end
      handle_gadgets(gadgets, libc_file)
    end
def work(argv)
      @options = DEFAULT_OPTIONS.dup
      parser.parse!(argv)
      return show("OneGadget Version #{OneGadget::VERSION}") if @options[:version]
      return info_build_id(@options[:info]) if @options[:info]

      libc_file = argv.pop
      build_id = @options[:build_id]
      level = @options[:level]
      return error('Either FILE or BuildID can be passed') if libc_file && @options[:build_id]
      return show(parser.help) && false unless build_id || libc_file

      gadgets = if build_id
                  OneGadget.gadgets(build_id: build_id, details: true, level: level)
                else # libc_file
                  OneGadget.gadgets(file: libc_file, details: true, force_file: @options[:force_file], level: level)
                end
      handle_gadgets(gadgets, libc_file)
    end
Main method of CLI.
 @param [Array<String>] argv
   Command line arguments.
 @return [Boolean]
   Whether the command execute successfully.
 @example
   CLI.work(%w[--help])
   # usage message
   #=> true
   CLI.work(%w[--version])
   # version message
   #=> true
 @example
   CLI.work([])
   # usage message
   #=> false
 @example
   CLI.work(%w[-b b417c0ba7cc5cf06d1d1bed6652cedb9253c60d0 -r])
   # 324293 324386 1090444
   #=> true