Sha256: f2e37dea31929b4aa654a7da6eb369a1bebd563bb59cb95502ce68b9a4d0e93f

Contents?: true

Size: 766 Bytes

Versions: 1

Compression:

Stored size: 766 Bytes

Contents

module Nmapr
  module Options
    module TCP 
      def tcp(type, value = false)
        case type
        when :syn
          add_argument("-sS")
        when :connect
          add_argument("-sT")
        when :null
          add_argument("-sN")
        when :fin
          add_argument("-sF")
        when :ack
          add_argument("-sA")
        when :rpc
          add_argument("-sR")
        when :window
          add_argument("-sW")
        when :maimon
          add_argument("-sM")
        when :xmas
          # Sets the FIN, PSH, and URG flags, lighting the packet up like a Christmas tree.
          add_argument("-sX")
        when :custom
          add_argument("--scanflags " << value) if value.is_a? String
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nmapr-1.0.0 lib/nmapr/options/tcp.rb