PageRenderTime 649ms queryTime 26ms sortTime 3ms getByIdsTime 520ms findMatchingLines 33ms

100+ results results for 'ipv6' (649 ms)

Not the results you expected?
network_fix_ipv6_test.rb https://gitlab.com/thomasphillips3/vagrant | Ruby | 165 lines
                    
3
                    
4describe VagrantPlugins::ProviderVirtualBox::Action::NetworkFixIPv6 do
                    
5  include_context "unit"
                    
37
                    
38  context "with IPv6 interfaces" do
                    
39    let(:socket) { double("socket") }
                    
52      all_networks = [{name: "vboxnet0",
                    
53                       ipv6: "dead:beef::",
                    
54                       ipv6_prefix: 64,
                    
57                      {name: "vboxnet1",
                    
58                       ipv6: "badd:badd::",
                    
59                       ipv6_prefix: 64,
                    
70      expect(socket).to have_received(:connect)
                    
71        .with(all_networks[0][:ipv6] + (['ffff']*4).join(':'), 80)
                    
72    end
                    
                
base.rb https://github.com/jeffbozek/whois.git | Ruby | 191 lines
                    
53        #         The type of WHOIS adapter to define.
                    
54        #         Known values are :tld, :ipv4, :ipv6.
                    
55        # @param  [String] allocation
                    
                
rack_test.rb https://github.com/atambo/rails.git | Ruby | 191 lines
                    
109
                    
110  test "host if ipv6 reference" do
                    
111    @env.delete "HTTP_X_FORWARDED_HOST"
                    
115
                    
116  test "host if ipv6 reference with port" do
                    
117    @env.delete "HTTP_X_FORWARDED_HOST"
                    
                
mongodb_spec.rb https://github.com/jwhitcraft/backup.git | Ruby | 144 lines
                    
18
                    
19      db.ipv6               = true
                    
20      db.only_collections   = ['users', 'pirates']
                    
88
                    
89  describe '#ipv6' do
                    
90    it 'should return a mongodb syntax compatible ipv6 flag' do
                    
91      db.ipv6 = true
                    
92      db.ipv6.should == '--ipv6'
                    
93    end
                    
95    it 'should return an empty string' do
                    
96      db.ipv6 = nil
                    
97      db.ipv6.should == ''
                    
105      "mongodump --db='mydatabase' --username='someuser' --password='secret' " +
                    
106      "--host='localhost' --port='123' --ipv6 --query --out='#{ File.join(Backup::TMP_PATH, Backup::TRIGGER, 'MongoDB') }'"
                    
107    end
                    
                
extconf.rb https://github.com/kwatch/rubinius.git | Ruby | 288 lines
                    
41default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
                    
42if enable_config("ipv6", default_ipv6)
                    
43  if checking_for("ipv6") {try_link(<<EOF)}
                    
73      have_library(ipv6lib = "inet6") and "zeta"
                    
74    elsif ipv6lib = with_config("ipv6-lib")
                    
75      warn <<EOS
                    
75      warn <<EOS
                    
76--with-ipv6-lib and --with-ipv6-libdir option will be obsolete, use
                    
77--with-inet6lib and --with-inet6-{include,lib} options instead.
                    
78EOS
                    
79      find_library(ipv6lib, nil, with_config("ipv6-libdir", ldirs)) and
                    
80        ipv6lib
                    
228
                    
229Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature.
                    
230But your getaddrinfo() and getnameinfo() are appeared to be broken.  Sorry,
                    
                
status_registered_spec.rb https://github.com/priithaamer/whois.git | Ruby | 137 lines
                    
125      @parser.nameservers[0].ipv4.should == "192.93.0.1"
                    
126      @parser.nameservers[0].ipv6.should == "2001:660:3005:1::1:1"
                    
127      @parser.nameservers[1].should be_a(Whois::Record::Nameserver)
                    
129      @parser.nameservers[1].ipv4.should == "192.93.0.4"
                    
130      @parser.nameservers[1].ipv6.should == "2001:660:3005:1::1:2"
                    
131      @parser.nameservers[2].should be_a(Whois::Record::Nameserver)
                    
133      @parser.nameservers[2].ipv4.should == "192.134.0.49"
                    
134      @parser.nameservers[2].ipv6.should == "2001:660:3006:1::1:1"
                    
135    end
                    
                
status_registered_spec.rb https://github.com/doubledrones/whois.git | Ruby | 137 lines
                    
125      subject.nameservers[0].ipv4.should == "192.93.0.1"
                    
126      subject.nameservers[0].ipv6.should == "2001:660:3005:1::1:1"
                    
127      subject.nameservers[1].should be_a(Whois::Record::Nameserver)
                    
129      subject.nameservers[1].ipv4.should == "192.93.0.4"
                    
130      subject.nameservers[1].ipv6.should == "2001:660:3005:1::1:2"
                    
131      subject.nameservers[2].should be_a(Whois::Record::Nameserver)
                    
133      subject.nameservers[2].ipv4.should == "192.134.0.49"
                    
134      subject.nameservers[2].ipv6.should == "2001:660:3006:1::1:1"
                    
135    end
                    
                
helper.rb https://gitlab.com/debian-ruby/ruby-fog-rackspace | Ruby | 229 lines
                    
8  'ipv4Public'      => String,
                    
9  'ipv6Public'      => String,
                    
10}
                    
                
request.rb https://github.com/areijonen/ramaze.git | Ruby | 222 lines
                    
47    # Request is from a local network?
                    
48    # Checks both IPv4 and IPv6
                    
49
                    
50    ipv4 = %w[ 127.0.0.1/32 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 169.254.0.0/16 ]
                    
51    ipv6 = %w[ fc00::/7 fe80::/10 fec0::/10 ::1 ]
                    
52    LOCAL = (ipv4 + ipv6).map{|a| IPAddr.new(a)} unless defined?(LOCAL)
                    
                
bind_php_ipv6.rb https://bitbucket.org/cfield/metasploit-framework.git | Ruby | 87 lines
                    
21		super(merge_info(info,
                    
22			'Name'          => 'PHP Command Shell, Bind TCP (via php) IPv6',
                    
23			'Description'   => 'Listen for a connection and spawn a command shell via php (IPv6)',
                    
                
common_types.rb https://github.com/juandebravo/bluevia-juan.git | Ruby | 166 lines
                    
64#   ipv4 - (any)
                    
65#   ipv6 - (any)
                    
66class IpAddressType
                    
67  attr_accessor :ipv4
                    
68  attr_accessor :ipv6
                    
69
                    
69
                    
70  def initialize(ipv4 = nil, ipv6 = nil)
                    
71    @ipv4 = ipv4
                    
71    @ipv4 = ipv4
                    
72    @ipv6 = ipv6
                    
73  end
                    
                
ack.rb https://bitbucket.org/cfield/metasploit-framework.git | Ruby | 138 lines
                    
37
                    
38	# No IPv6 support yet
                    
39	def support_ipv6?
                    
                
fakedns.rb https://gitlab.com/0072016/metasploit-framework-rapid7 | Ruby | 284 lines
                    
143          # isatap.localdomain -> XP SP >= 1
                    
144          # teredo.ipv6.microsoft.com -> XP SP >= 2
                    
145          #
                    
                
external_http.rb https://gitlab.com/shaneutt/gitlab | Ruby | 101 lines
                    
82        uri.scheme = call[:scheme]
                    
83        # The host can be a domain, IPv4 or IPv6.
                    
84        # Ruby handle IPv6 for us at
                    
                
interface.rb https://github.com/lak/puppet-old.git | Ruby | 109 lines
                    
80       * IPV4/prefixlength like 127.0.1.1/24
                    
81       * IPV6/prefixlength like FE80::21A:2FFF:FE30:ECF0/128
                    
82       * an optional suffix for IPV6 addresses from this list: eui-64, link-local
                    
                
reverse_http.rb https://bitbucket.org/DinoRex99/metasploit-framework.git | Ruby | 414 lines
                    
103    addr = datastore['LHOST'] if addr.nil? || addr.empty?
                    
104    uri_host = Rex::Socket.is_ipv6?(addr) ? "[#{addr}]" : addr
                    
105    "#{scheme}://#{uri_host}:#{bind_port}#{luri}"
                    
109  #
                    
110  # Host will be properly wrapped in square brackets, +[]+, for ipv6
                    
111  # addresses.
                    
144
                    
145    if Rex::Socket.is_ipv6? callback_host
                    
146      callback_host = "[#{callback_host}]"
                    
280
                    
281    if Rex::Socket.is_ipv6?(uri_host)
                    
282      uri_host = "[#{info[:host]}]"
                    
                
mac_addresses_controller.rb https://github.com/toyokazu/mac_address_manager.git | Ruby | 183 lines
                    
31            if (mac_addr.ipv4_addr.nil? || mac_addr.ipv4_addr.empty?)
                    
32              ip_addr = mac_addr.ipv6_addr
                    
33            else
                    
                
status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 126 lines
                    
114      expect(subject.nameservers[0].ipv4).to eq(nil)
                    
115      expect(subject.nameservers[0].ipv6).to eq(nil)
                    
116      expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
                    
118      expect(subject.nameservers[1].ipv4).to eq(nil)
                    
119      expect(subject.nameservers[1].ipv6).to eq(nil)
                    
120      expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)
                    
122      expect(subject.nameservers[2].ipv4).to eq(nil)
                    
123      expect(subject.nameservers[2].ipv6).to eq(nil)
                    
124    end
                    
                
middleware.rb https://gitlab.com/KiaraGrouwstra/better_errors | Ruby | 142 lines
                    
38    allow_ip! "127.0.0.0/8"
                    
39    allow_ip! "::1/128" rescue nil # windows ruby doesn't have ipv6 support
                    
40
                    
                
status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 161 lines
                    
147      expect(subject.nameservers[0].ipv4).to eq(nil)
                    
148      expect(subject.nameservers[0].ipv6).to eq(nil)
                    
149      expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
                    
151      expect(subject.nameservers[1].ipv4).to eq(nil)
                    
152      expect(subject.nameservers[1].ipv6).to eq(nil)
                    
153      expect(subject.nameservers[2].name).to eq("ns-374.awsdns-46.com")
                    
154      expect(subject.nameservers[2].ipv4).to eq(nil)
                    
155      expect(subject.nameservers[2].ipv6).to eq(nil)
                    
156      expect(subject.nameservers[3].name).to eq("ns-914.awsdns-50.net")
                    
157      expect(subject.nameservers[3].ipv4).to eq(nil)
                    
158      expect(subject.nameservers[3].ipv6).to eq(nil)
                    
159    end
                    
                
ipcidr_spec.rb https://bitbucket.org/schatt/puppetlabs-firewall.git | Ruby | 67 lines
                    
35
                    
36  describe 'ipv6 address' do
                    
37    before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:85a3:0:0:8a2e:370:7334') }
                    
43
                    
44  describe 'single ipv6 addr with cidr' do
                    
45    before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:85a3:0:0:8a2e:370:7334/128') }
                    
51
                    
52  describe 'ipv6 addr range with cidr' do
                    
53    before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:1234::/48') }
                    
59
                    
60  describe 'ipv6 open range with cidr' do
                    
61    before { @ipaddr = Puppet::Util::IPCidr.new('::/0') }
                    
                
reverse_ipv6_tcp.rb https://bitbucket.org/cfield/metasploit-framework.git | Ruby | 70 lines
                    
18	def self.handler_type_alias
                    
19		"reverse_ipv6_tcp"
                    
20	end
                    
24		super(merge_info(info,
                    
25			'Name'          => 'Reverse TCP Stager (IPv6)',
                    
26			'Description'   => 'Connect back to the attacker over IPv6',
                    
65			[
                    
66				OptInt.new("SCOPEID", [false, "The IPv6 Scope ID, required for link-layer addresses", 0])
                    
67			], self.class)
                    
                
status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 168 lines
                    
148      expect(subject.nameservers[0].ipv4).to eq(nil)
                    
149      expect(subject.nameservers[0].ipv6).to eq(nil)
                    
150      expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
                    
152      expect(subject.nameservers[1].ipv4).to eq(nil)
                    
153      expect(subject.nameservers[1].ipv6).to eq(nil)
                    
154      expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)
                    
156      expect(subject.nameservers[2].ipv4).to eq(nil)
                    
157      expect(subject.nameservers[2].ipv6).to eq(nil)
                    
158      expect(subject.nameservers[3]).to be_a(Whois::Record::Nameserver)
                    
160      expect(subject.nameservers[3].ipv4).to eq(nil)
                    
161      expect(subject.nameservers[3].ipv6).to eq(nil)
                    
162      expect(subject.nameservers[4]).to be_a(Whois::Record::Nameserver)
                    
164      expect(subject.nameservers[4].ipv4).to eq(nil)
                    
165      expect(subject.nameservers[4].ipv6).to eq(nil)
                    
166    end
                    
                
interface.rb https://gitlab.com/gutocarvalho/puppet | Ruby | 82 lines
                    
28      lambda do |prefix,ip,option|
                    
29        ip.ipv6? ? "ipv6 address #{ip.to_s}/#{prefix} #{option}" :
                    
30                   "ip address #{ip.to_s} #{netmask(Socket::AF_INET,prefix)}"
                    
                
xmas.rb https://github.com/rapid7/metasploit-framework.git | Ruby | 151 lines
                    
34
                    
35  # No IPv6 support yet
                    
36  def support_ipv6?
                    
                
network_setting.rb https://github.com/amooma/GS4.git | Ruby | 141 lines
                    
2  
                    
3  #OPTIMIZE Make netmask an integer instead of a string and use the prefix length instead of a dotted quad. Easier to handle (validate/store/convert) and works for both IPv4 and IPv6.
                    
4  
                    
                
new_spec.rb https://github.com/gilmation/rubyspec.git | Ruby | 78 lines
                    
19
                    
20  it "binds to localhost and a port with either IPv4 or IPv6" do
                    
21    @server = TCPServer.new(SocketSpecs.hostname, SocketSpecs.port)
                    
                
config_file.rb https://github.com/mrkn/ruby.git | Ruby | 508 lines
                    
145  # == Experimental ==
                    
146  # Fallback to IPv4 when IPv6 is not reachable or slow (default: false)
                    
147
                    
                
computer_browser_discovery.rb https://bitbucket.org/DinoRex99/metasploit-framework.git | Ruby | 146 lines
                    
143    print_status('If none of the IP addresses show up you are running this from a Win2k or older system')
                    
144    print_status("If a host doesn't have an IP it either timed out or only has an IPv6 address assinged to it")
                    
145  end
                    
                
disco_info_spec.rb https://github.com/halorgium/blather.git | Ruby | 207 lines
                    
188  it 'will auto-inherit nodes' do
                    
189    n = XML::Document.string "<feature var='ipv6' />"
                    
190    i = Stanza::Iq::DiscoInfo::Feature.new n.root
                    
190    i = Stanza::Iq::DiscoInfo::Feature.new n.root
                    
191    i.var.must_equal 'ipv6'
                    
192  end
                    
204    a.must_equal Blather::Stanza::Iq::DiscoInfo::Feature.new('var')
                    
205    a.wont_equal "<feature var='ipv6' />"
                    
206  end
                    
                
server_config_spec.rb https://gitlab.com/my-application.bjoernbartels.earth/application-base | Ruby | 159 lines
                    
51
                    
52  describe 'with specific bind_ip values and ipv6' do
                    
53    let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $rcfile = '/root/.mongorc.js' $ensure = present $bind_ip = ['127.0.0.1', 'fd00:beef:dead:55::143'] $ipv6 = true }", "include mongodb::server"]}
                    
56      is_expected.to contain_file('/etc/mongod.conf').with_content(/bind_ip\s=\s127\.0\.0\.1\,fd00:beef:dead:55::143/)
                    
57      is_expected.to contain_file('/etc/mongod.conf').with_content(/ipv6=true/)
                    
58    }
                    
                
status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 113 lines
                    
87      expect(subject.nameservers[0].ipv4).to eq(nil)
                    
88      expect(subject.nameservers[0].ipv6).to eq(nil)
                    
89      expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver)
                    
91      expect(subject.nameservers[1].ipv4).to eq(nil)
                    
92      expect(subject.nameservers[1].ipv6).to eq(nil)
                    
93      expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)
                    
95      expect(subject.nameservers[2].ipv4).to eq(nil)
                    
96      expect(subject.nameservers[2].ipv6).to eq(nil)
                    
97      expect(subject.nameservers[3]).to be_a(Whois::Record::Nameserver)
                    
99      expect(subject.nameservers[3].ipv4).to eq(nil)
                    
100      expect(subject.nameservers[3].ipv6).to eq(nil)
                    
101    end
                    
                
tc_xrules.rb https://github.com/ironbee/ironbee.git | Ruby | 405 lines
                    
68
                    
69  def test_xruleipv6_no_subnet
                    
70    clipp(
                    
73        ProtectionEngineOptions +blockingMode
                    
74        XRuleIpv6 "::1" EnableBlockingMode
                    
75      EOS
                    
                
test_addrinfo.rb https://github.com/shugo/jruby.git | Ruby | 219 lines
                    
117        if addr.afamily == Socket::AF_INET6
                    
118          addr.ipv6_loopback?
                    
119        else
                    
119        else
                    
120          assert_equal(false, addr.ipv6_loopback?)
                    
121          nil
                    
155      else
                    
156        # TODO: (gf) test ipv6 addresses when Socket.unpack_sockaddr_in works for ipv6 and ipv6
                    
157        if addr.ipv4?
                    
200  # def test_ipv6_mc_global? ; end
                    
201  # def test_ipv6_mc_linklocal? ; end
                    
202  # def test_ipv6_mc_nodelocal? ; end
                    
209  # def test_ipv6_v4compat? ; end
                    
210  # def test_ipv6_v4mapped? ; end
                    
211  # def test_listen ; end
                    
                
tc_helper.rb https://github.com/edavis10/cerberus.git | Ruby | 156 lines
                    
104    form.add(Dataforms::XDataField.new('FORM_TYPE', :hidden)).value = 'urn:xmpp:dataforms:softwareinfo'
                    
105    form.add(Dataforms::XDataField.new('ip_version')).values = ['ipv4', 'ipv6']
                    
106    form.add(Dataforms::XDataField.new('software')).value = 'Psi' # re-ordered
                    
135        <value>ipv4</value>
                    
136        <value>ipv6</value>
                    
137      </field>
                    
                
ipv6_spec.rb git://github.com/todb/packetfu.git | Ruby | 81 lines
                    
11    it "should contain sane defaults" do
                    
12      expect(@ipv6_header.ipv6_v).to eql(6)
                    
13      expect(@ipv6_header.ipv6_len).to eql(0)
                    
13      expect(@ipv6_header.ipv6_len).to eql(0)
                    
14      expect(@ipv6_header.ipv6_src).to eql(0)
                    
15      expect(@ipv6_header.ipv6_dst).to eql(0)
                    
47    before :each do
                    
48      @ipv6_packet = IPv6Packet.new
                    
49    end
                    
63      @ipv6_packet.recalc
                    
64      expect(@ipv6_packet.ipv6_len).to eq(14)
                    
65
                    
76      @ipv6_packet.payload = "\xff" * 12
                    
77      @ipv6_packet.ipv6_recalc(:ipv6_len)
                    
78      expect(@ipv6_packet.ipv6_len).to eq(12)
                    
                
email_validator.rb https://github.com/balexand/email_validator.git | Ruby | 164 lines
                    
85
                    
86    def ipv6
                    
87      # only supporting full IPv6 addresses right now
                    
87      # only supporting full IPv6 addresses right now
                    
88      'IPv6:[[:xdigit:]]{1,4}(?::[[:xdigit:]]{1,4}){7}'
                    
89    end
                    
91    def address_literal
                    
92      "\\[(?:#{ipv4}|#{ipv6})\\]"
                    
93    end
                    
                
faithd.rb https://bitbucket.org/cooljeanius/dragonflybsd.git | Ruby | 313 lines
                    
13# XXX should be derived from system headers
                    
14IPPROTO_IPV6 = 41
                    
15IPV6_FAITH = 29
                    
161      if DEBUG
                    
162	STDERR.print "IPv6 dest: #{dest6}  IPv4 dest: #{dest4}\n" if DEBUG
                    
163      end
                    
205      if DEBUG
                    
206	STDERR.print "IPv6 dest: #{dest6}  IPv4 dest: #{dest4}\n" if DEBUG
                    
207      end
                    
279  n = Socket.getnameinfo(s.getsockname, Socket::NI_NUMERICHOST|Socket::NI_NUMERICSERV).join(" port ")
                    
280  if i[6] == IPPROTO_IPV6
                    
281    s.setsockopt(i[6], IPV6_FAITH, 1)
                    
                
syslog.rb https://github.com/jnewland/logstash.git | Ruby | 194 lines
                    
116        LogStash::Util::set_thread_name("input|syslog|tcp|#{ip}:#{port}}")
                    
117        if ip.include?(":") # ipv6
                    
118          source = "syslog://[#{ip}]/"
                    
                
getaddrinfo_spec.rb https://github.com/koichiro/jruby.git | Ruby | 121 lines
                    
25    # The check for AP_INET6's class is needed because ipaddr.rb adds
                    
26    # fake AP_INET6 even in case when IPv6 is not really supported.
                    
27    # Without such check, this test might fail when ipaddr was required
                    
92
                    
93   it "accepts empty addresses for IPv6 passive sockets" do
                    
94     res = Socket::getaddrinfo(nil, "http",
                    
106
                    
107   it "accepts empty addresses for IPv6 non-passive sockets" do
                    
108     res = Socket::getaddrinfo(nil, "http",
                    
                
merge_and_resolve_default_url_config_test.rb git://github.com/rails/rails.git | Ruby | 424 lines
                    
244
                    
245      def test_database_url_with_ipv6_host_and_port
                    
246        ENV["DATABASE_URL"] = "postgres://[::1]:5454/foo"
                    
                
ngircd.rb https://gitlab.com/jcsilkey/homebrew-core | Ruby | 57 lines
                    
30      --sysconfdir=#{HOMEBREW_PREFIX}/etc
                    
31      --enable-ipv6
                    
32      --with-openssl
                    
                
ipv6_neighbor.rb https://gitlab.com/alx741/metasploit-framework | Ruby | 220 lines
                    
106      next unless adv.eth_saddr == mac_addr
                    
107      ipv6_addr = adv.ipv6_saddr
                    
108      return {:eth => mac_addr, :ipv4 => ipv4_addr, :ipv6 => ipv6_addr}
                    
113  def neighbor_discovery(neighs)
                    
114    print_status("Discovering IPv6 addresses for IPv4 nodes...")
                    
115    print_status("")
                    
141            :type   => 'host.ipv4.ipv6.mapping',
                    
142            :data   => "system with IPv4 address #{addr[:ipv4]} matches to IPv6 address #{addr[:ipv6]}"
                    
143          )	# with this we have the results in our database
                    
156
                    
157          print_status(sprintf("  %16s maps to %s",addr[:ipv4], addr[:ipv6]))
                    
158        end
                    
190    dmac = ipv6_soll_mcast_mac(neigh)
                    
191    dhost = ipv6_soll_mcast_addr6(neigh)
                    
192
                    
                
test_acl.rb https://gitlab.com/0072016/0072016-ruby | Ruby | 198 lines
                    
20              192.168.1.5 yum.macos.or.jp
                    
21              ::ffff:192.168.1.5 ipv6.macos.or.jp
                    
22              ::192.168.1.5 too.yumipv6.macos.or.jp
                    
59    assert(a.match(@hosts['yum']))
                    
60    assert(a.match(@hosts['ipv6']))
                    
61    assert(! a.match(@hosts['too']))
                    
                
test-access-log-parser.rb https://github.com/ranguba/racknga.git | Ruby | 303 lines
                    
99
                    
100    def ipv6_log_line
                    
101      log_line("::1 - - #{time_log_component}  " +
                    
104
                    
105    def ipv6_log_entry
                    
106      options = {
                    
181
                    
182    def test_ipv6_log
                    
183      accesses = parse(join_lines(ipv6_log_line))
                    
183      accesses = parse(join_lines(ipv6_log_line))
                    
184      assert_equal([ipv6_log_entry],
                    
185                   accesses)
                    
                
shell_reverse_ipv6_tcp.rb https://gitlab.com/alx741/metasploit-framework | Ruby | 92 lines
                    
20    super(merge_info(info,
                    
21      'Name'          => 'BSD x64 Command Shell, Reverse TCP Inline (IPv6)',
                    
22      'Description'   => 'Connect back to attacker and spawn a command shell over IPv6',
                    
23      'Author'        => 'Balazs Bucsay @xoreipeip <balazs.bucsay[-at-]rycon[-dot-]hu>',
                    
24      'References'    => ['URL', 'https://github.com/earthquake/shellcodes/blob/master/x86_64_bsd_ipv6_reverse_tcp.asm.c'],
                    
25      'License'       => MSF_LICENSE,
                    
79            "\x00\x00\x00\x00"     +#   no-one-cares                       #
                    
80            "\x00\x00\x00\x00"     +#   IPv6-                              #
                    
81            "\x00\x00\x00\x00"     +#   addr-                              #
                    
87      register_options([
                    
88         OptInt.new('SCOPEID', [false, "IPv6 scope ID, for link-local addresses", 0])
                    
89      ])
                    
                
bind_tcp.rb https://gitlab.com/alx741/metasploit-framework | Ruby | 206 lines
                    
48
                    
49  def use_ipv6
                    
50    false
                    
90
                    
91    if use_ipv6
                    
92      af_inet = 0xa
                    
138
                    
139    if use_ipv6
                    
140      asm << %Q^
                    
                
ipcidr_spec.rb https://bitbucket.org/joshcrawmer4/php-contact-form.git | Ruby | 96 lines
                    
56
                    
57  describe 'ipv6 address' do
                    
58    subject { ipaddr }
                    
66
                    
67  describe 'single ipv6 addr with cidr' do
                    
68    subject { ipaddr }
                    
76
                    
77  describe 'ipv6 addr range with cidr' do
                    
78    subject { ipaddr }
                    
86
                    
87  describe 'ipv6 open range with cidr' do
                    
88    subject { ipaddr }
                    
                
agent.rb https://github.com/adamhjk/marionette-collective.git | Ruby | 277 lines
                    
183            # validate :command, :shellsafe
                    
184            # validate :command, :ipv6address
                    
185            # validate :command, :ipv4address
                    
207
                    
208                            when :ipv6address
                    
209                                begin
                    
211                                    ip = IPAddr.new(@request[key])
                    
212                                    raise InvalidRPCData, "#{key} should be an ipv6 address" unless ip.ipv6?
                    
213                                rescue
                    
213                                rescue
                    
214                                    raise InvalidRPCData, "#{key} should be an ipv6 address"
                    
215                                end
                    
                
miq-file_spec.rb https://gitlab.com/aljesusg/manageiqtest | Ruby | 50 lines
                    
29
                    
30    it 'handles an IPv6 hostname as expected' do
                    
31      hostname = '::1'
                    
                
enum_ad_mssql_srv.rb https://github.com/darkoperator/Meterpreter-Scripts.git | Ruby | 151 lines
                    
94
                    
95            # Resolve IPv6 address
                    
96            begin
                    
96            begin
                    
97              ipv6_info = session.net.resolve.resolve_host(obj[2][:value], AF_INET6)
                    
98              table << [obj[0][:value], obj[1][:value], obj[2][:value], obj[3][:value],obj[4][:value],ipv4_info[:ip]]
                    
102              report_host(
                    
103                  :host      => ipv6_info[:ip],
                    
104                  :os_name   => 'Windows',
                    
111            rescue
                    
112              vprint_status 'Could not resolve IPv6 Address for Domain Controller'
                    
113            end
                    
                
new_spec.rb https://github.com/eregon/ruby.git | Ruby | 96 lines
                    
19
                    
20  it "binds to localhost and a port with either IPv4 or IPv6" do
                    
21    @server = TCPServer.new(SocketSpecs.hostname, 0)
                    
                
udp.rb https://bitbucket.org/cfield/metasploit-framework.git | Ruby | 165 lines
                    
101
                    
102		# Catch unconnected IPv6 sockets talking to IPv4 addresses
                    
103		peer = Rex::Socket.resolv_nbo(peerhost)
                    
                
firewallchain_spec.rb https://bitbucket.org/schatt/puppetlabs-firewall.git | Ruby | 107 lines
                    
29    }.each_pair do |table, allowedinternalchains|
                    
30      ['IPv4', 'IPv6', 'ethernet'].each do |protocol|
                    
31        [ 'test', '$5()*&%\'"^$09):' ].each do |chainname|
                    
32          name = "#{chainname}:#{table}:#{protocol}"
                    
33          if table == 'nat' && protocol == 'IPv6'
                    
34            it "should fail #{name}" do
                    
                
default.rb https://github.com/crowbar/barclamp-dns.git | Ruby | 380 lines
                    
90  # Since there is no elegant method for doing this that takes into account
                    
91  # CIDR or IPv6, do it the excessively ugly way and create one zone per IP.
                    
92  hostsprocessed={}
                    
                
server_tests.rb https://bitbucket.org/dievssoftware/fog.git | Ruby | 144 lines
                    
32      'accessIPv4' => String,
                    
33      'accessIPv6' => String,
                    
34      'OS-DCF:diskConfig' => String,
                    
                
mysql_grant_spec.rb https://gitlab.com/billyprice1/phpservermon | Ruby | 308 lines
                    
190    end
                    
191    it 'finds ipv6' do
                    
192      shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'\"") do |r|
                    
196    end
                    
197    it 'finds short ipv6' do
                    
198      shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'::1/128'\"") do |r|
                    
                
fix-overtrusting_in_non_standard_http_header.rb https://bitbucket.org/gibwar/moebooru | Ruby | 135 lines
                    
11    # http://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces
                    
12    # http://en.wikipedia.org/wiki/Private_network#Private_IPv6_addresses.
                    
13    remove_const :TRUSTED_PROXIES
                    
                
default.rb https://gitlab.com/gitlab-cookbooks/gitlab-iptables | Ruby | 99 lines
                    
81
                    
82# IPv6 rules
                    
83iptables_ng_rule '999-all-drop-ip6' do
                    
                
socks5.rb https://github.com/wangmh/webistrano.git | Ruby | 142 lines
                    
107          when 4
                    
108            ipv6addr hostname = socket.recv(16)
                    
109          else
                    
                
connection_string.rb https://github.com/mongodb/mongo-ruby-driver.git | Ruby | 327 lines
                    
179          'ipv4' => Mongo::Address::IPv4,
                    
180          'ipv6' => Mongo::Address::IPv6,
                    
181          'unix' => Mongo::Address::Unix
                    
                
rest_authconfig_spec.rb https://github.com/glarizza/puppet-1.git | Ruby | 145 lines
                    
70
                    
71  it "should support IPv6 address" do
                    
72    add_rule("allow 2001:DB8::8:800:200C:417A")
                    
                
test_rack_handler.rb https://github.com/puma/puma.git | Ruby | 270 lines
                    
99
                    
100  def test_ipv6_host_supplied_port_default
                    
101    @options[:Host] = "::1"
                    
                
spec_helper_acceptance.rb https://gitlab.com/tmountjr/vagrant-lamp | Ruby | 82 lines
                    
9  c.run_all_when_everything_filtered = true
                    
10  # apache on Ubuntu 10.04 and 12.04 doesn't like IPv6 VirtualHosts, so we skip ipv6 tests on those systems
                    
11  if fact('operatingsystem') == 'Ubuntu' and (fact('operatingsystemrelease') == '10.04' or fact('operatingsystemrelease') == '12.04')
                    
11  if fact('operatingsystem') == 'Ubuntu' and (fact('operatingsystemrelease') == '10.04' or fact('operatingsystemrelease') == '12.04')
                    
12    c.filter_run_excluding :ipv6 => true
                    
13  end
                    
                
test_domain_name.rb https://gitlab.com/gitnyasha/zimcreative | Ruby | 317 lines
                    
272
                    
273  test "parse IPv6 addresseses" do
                    
274    a = '2001:200:dff:fff1:216:3eff:feb1:44d7'
                    
                
ipv4_address.rb https://github.com/pr0d1r2/ipv4_address.git | Ruby | 145 lines
                    
10  DOCUMENTATION = ['192.0.2.0/24', '198.51.100.0/24', '203.0.113.0/24']
                    
11  IPV6_RELAY = ['192.88.99.0/24']
                    
12  BENCHMARK = ['198.18.0.0/15']
                    
74
                    
75  def ipv6_relay?
                    
76    exist_in_pool?(IPV6_RELAY)
                    
78
                    
79  def self.ipv6_relay?(addr)
                    
80    begin
                    
80    begin
                    
81      new(addr).ipv6_relay?
                    
82    rescue
                    
116    !documentation? &&
                    
117    !ipv6_relay? &&
                    
118    !benchmark? &&
                    
                
common_regular_expressions_spec.rb https://github.com/andreazaupa/request-log-analyzer.git | Ruby | 80 lines
                    
42    
                    
43    it "should pase IPv6 addresses" do
                    
44      anchored(ip_address).should =~ '::1'
                    
                
extconf.rb https://github.com/bg/vmsruby.git | Ruby | 400 lines
                    
28default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
                    
29if enable_config("ipv6", default_ipv6)
                    
30  if try_link(<<EOF)
                    
69    $ipv6type = "toshiba"
                    
70    $ipv6lib="inet6"
                    
71    $ipv6libdir="/usr/local/v6/lib"
                    
87  else
                    
88    $ipv6lib=with_config("ipv6-lib", nil)
                    
89    $ipv6libdir=with_config("ipv6-libdir", nil)
                    
93  if $ipv6lib
                    
94    if File.directory? $ipv6libdir and File.exist? "#{$ipv6libdir}/lib#{$ipv6lib}.a"
                    
95      $LOCAL_LIBS = " -L#$ipv6libdir -l#$ipv6lib"
                    
296
                    
297Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature.
                    
298But your getaddrinfo() and getnameinfo() are appeared to be broken.  Sorry,
                    
                
server_tests.rb https://gitlab.com/debian-ruby/ruby-fog-rackspace | Ruby | 274 lines
                    
89      @instance.access_ipv4_address= "10.10.0.1"
                    
90      @instance.access_ipv6_address= "::1"
                    
91      @instance.save
                    
94      returns("10.10.0.1") { @instance.access_ipv4_address }
                    
95      returns("::1") { @instance.access_ipv6_address }
                    
96      returns(new_name) { @instance.name }
                    
                
open-mpi.rb https://bitbucket.org/bathtub/tigerbrew.git | Ruby | 56 lines
                    
32      --disable-dependency-tracking
                    
33      --enable-ipv6
                    
34    ]
                    
                
rebuild_server.rb https://gitlab.com/debian-ruby/ruby-fog-rackspace | Ruby | 71 lines
                    
6        # The serverRef and all IP addresses remain the same. If you specify name, metadata, accessIPv4,
                    
7        # or accessIPv6 in the rebuild request, new values replace existing values. Otherwise, these values do not change.
                    
8        # @param [String] server_id id of the server to rebuild
                    
11        # @option options [String] accessIPv4 The IP version 4 address.
                    
12        # @option options [String] accessIPv6 The IP version 6 address.
                    
13        # @option options [String] adminPass The administrator password.
                    
                
new_spec.rb https://github.com/nobu/ruby.git | Ruby | 110 lines
                    
10
                    
11  it "initializes IPAddr ipv6 address with short notation" do
                    
12    a = IPAddr.new
                    
17
                    
18  it "initializes IPAddr ipv6 address with long notation" do
                    
19    a = IPAddr.new("0123:4567:89ab:cdef:0ABC:DEF0:1234:5678")
                    
24
                    
25  it "initializes IPAddr ipv6 address with / subnet notation" do
                    
26    a = IPAddr.new("3ffe:505:2::/48")
                    
30    a.should_not.ipv4?
                    
31    a.should.ipv6?
                    
32    a.inspect.should == "#<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000>"
                    
34
                    
35  it "initializes IPAddr ipv6 address with mask subnet notation" do
                    
36    a = IPAddr.new("3ffe:505:2::/ffff:ffff:ffff::")
                    
                
snort.rb https://github.com/aaroncm/homebrew.git | Ruby | 52 lines
                    
18              --disable-dependency-tracking
                    
19              --enable-ipv6
                    
20              --enable-gre
                    
                
http_basic.rb https://gitlab.com/alx741/metasploit-framework | Ruby | 116 lines
                    
47  # Not compatible today
                    
48  def support_ipv6?
                    
49    false
                    
                
whois.nic.ch.rb git://github.com/weppos/whois.git | Ruby | 112 lines
                    
97                list[name].ipv4 = ip if Whois::Server.valid_ipv4?(ip)
                    
98                list[name].ipv6 = ip if Whois::Server.valid_ipv6?(ip)
                    
99              else
                    
                
interface_types.rb https://github.com/kazuyas/trema.git | Ruby | 130 lines
                    
125
                    
126class IPv6_in_IPv4 < NetworkAdapter
                    
127end
                    
                
nodejs.rb https://gitlab.com/alx741/metasploit-framework | Ruby | 70 lines
                    
37    net_lib = if use_ssl then 'tls' else 'net' end
                    
38    lhost = Rex::Socket.is_ipv6?(lhost) ? "[#{datastore['LHOST']}]" : datastore['LHOST']
                    
39    # the global.process.mainModule.constructor._load fallback for require() is
                    
                
cares.rb git://github.com/davidbalbert/eventless.git | Ruby | 146 lines
                    
138        ip = IPAddress.parse(IPSocket.getaddress(host))
                    
139        family = ip.ipv6? ? Socket::AF_INET6 : Socket::AF_INET
                    
140
                    
                
ipaddress6_spec.rb https://github.com/phantez/facter.git | Ruby | 36 lines
                    
11
                    
12describe "IPv6 address fact" do
                    
13  it "should return ipaddress6 information for Darwin" do
                    
                
rbconfig.rb https://github.com/atomicobject/LTIB-Ruby-Source.git | Ruby | 187 lines
                    
21  CONFIG["NROFF"] = "/usr/bin/nroff"
                    
22  CONFIG["configure_args"] = " '--host=i686-pc-linux-gnu' '--target=arm-rpm-linux-gnu' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/info' '--host=arm-linux' '--build=i686-gnu-linux' '--prefix=/usr' '--enable-shared' '--disable-ipv6' '--without-X11' '--without-tk' '--without-tcl' '--with-sitedir=/usr/lib/ruby/site_ruby' '--with-sitearchdir=/usr/lib/ruby/site_ruby' '--with-vendordir=/usr/lib/ruby/vendor_ruby' '--with-vendorarchdir=/usr/lib/ruby/vendor_ruby' 'build_alias=i686-gnu-linux' 'host_alias=arm-linux' 'target_alias=arm-rpm-linux-gnu' 'CC=gcc' 'CFLAGS=-O2 -fno-strict-aliasing'"
                    
23  CONFIG["vendorarchdir"] = "$(DESTDIR)/usr/lib/ruby/vendor_ruby"
                    
                
definition.rb https://github.com/halvards/veewee.git | Ruby | 103 lines
                    
69   'NetBSD61-amd64<Enter>',
                    
70# Perform IPv6 autoconfiguration?  a: No
                    
71   '<Enter>',
                    
                
cgi_test.rb https://github.com/wayshawn/rails.git | Ruby | 220 lines
                    
101
                    
102  def test_host_if_ipv6_reference
                    
103    @request_hash.delete "HTTP_X_FORWARDED_HOST"
                    
107
                    
108  def test_host_if_ipv6_reference_with_port
                    
109    @request_hash.delete "HTTP_X_FORWARDED_HOST"
                    
                
get_server.rb https://gitlab.com/debian-ruby/ruby-fog-rackspace | Ruby | 63 lines
                    
14        #       * accessIPv4 [String] - The public IP version 4 access address.
                    
15        #       * accessIPv6 [String] - The public IP version 6 access address.
                    
16        #       * addresses [Hash] - Public and private IP addresses, The version field indicates whether the IP address is version 4 or 6.
                    
54          else
                    
55            server_response = Fog::Rackspace::MockData.keep(server, 'id', 'name', 'hostId', 'created', 'updated', 'status', 'progress', 'user_id', 'tenant_id', 'links', 'metadata', 'accessIPv4', 'accessIPv6', 'OS-DCF:diskConfig', 'rax-bandwidth:bandwidth', 'addresses', 'flavor', 'image')
                    
56            server_response['image']['links'].map! { |l| l.delete("type"); l }
                    
                
candlepin_consumer_spec.rb https://github.com/mbacovsky/katello.git | Ruby | 83 lines
                    
23      "net.interface.eth2.netmask" => "255.255.255.0",
                    
24      "net.interface.eth2.ipv6_address.link" => "fe80::1a03:73ff:fe44:6d94",
                    
25      "net.interface.eth0.broadcast" => "123.123.123.123",
                    
27      "net.interface.eth0.netmask" => "255.255.255.0",
                    
28      "net.interface.eth0.ipv6_address.link" => "fe80::2a03:73ff:fe44:6d94",
                    
29      "net.interface.em1.broadcast" => "123.123.123.123",
                    
31      "net.interface.em1.netmask" => "255.255.255.0",
                    
32      "net.interface.em1.ipv6_address.link" => "fc80::2a03:73ff:fe44:6d94"
                    
33    }
                    
                
httpbl_lookup.rb https://bitbucket.org/cfield/metasploit-framework.git | Ruby | 98 lines
                    
38	# Not compatible today
                    
39	def support_ipv6?
                    
40		false
                    
                
net_http_wrappers.rb git://github.com/newrelic/rpm.git | Ruby | 79 lines
                    
65            connection_address = @connection.address
                    
66            if (connection_address =~ Resolv::IPv6::Regex)
                    
67              connection_address = "[#{connection_address}]"
                    
                
helper.rb https://gitlab.com/wilane/fluentd | Ruby | 141 lines
                    
125
                    
126def ipv6_enabled?
                    
127  require 'socket'
                    
                
update_bundled_ca_certificates.rb https://github.com/technicalpickles/rubygems.git | Ruby | 136 lines
                    
17def connect_to(uri, store)
                    
18  # None of the URIs are IPv6, so URI::Generic#hostname(ruby 1.9.3+) isn't needed
                    
19  http = Net::HTTP.new uri.host, uri.port
                    
                
base.rb https://gitlab.com/billhibadb/geolocal.git | Ruby | 193 lines
                    
37        elsif lofam == Socket::AF_INET6
                    
38          namefam = name.upcase + 'v6' if config[:ipv6]
                    
39        else
                    
59          a.merge! k.upcase+'v4' => [] if config[:ipv4]
                    
60          a.merge! k.upcase+'v6' => [] if config[:ipv6]
                    
61          a
                    
89          v4mod = config[:ipv4] ? name.to_s.upcase + 'v4' : 'nil'
                    
90          v6mod = config[:ipv6] ? name.to_s.upcase + 'v6' : 'nil'
                    
91          write_method file, name, v4mod, v6mod
                    
142    end
                    
143    return false unless mod # if we didn't compile in ipv6, assume nothing's local
                    
144    true if mod.bsearch { |range| num > range.max ? 1 : num < range.min ? -1 : 0 }
                    
                
auth.rb https://github.com/lzap/foreman.git | Ruby | 63 lines
                    
10      set('require_ssl_smart_proxies', N_('Client SSL certificates are used to identify Smart Proxies (:require_ssl should also be enabled)'), true, N_('Require SSL for smart proxies')),
                    
11      set('trusted_hosts', N_('List of hostnames, IPv4, IPv6 addresses or subnets to be trusted in addition to Smart Proxies for access to fact/report importers and ENC output'), [], N_('Trusted hosts')),
                    
12      set('ssl_certificate', N_("SSL Certificate path that Foreman would use to communicate with its proxies"), nil, N_('SSL certificate')),
                    
                
CMakeListGen.rb https://github.com/vonami/inet-flc.git | Ruby | 219 lines
                    
7# CMakeLists.txt generater for omnetpp type projects. Currently works with INET
                    
8# and generates IPv6Suite's OneBigExe.cmake but should work for others too. 
                    
9#
                    
74
                    
75# Used only by IPv6Suite
                    
76def readSourceList(filename)
                    
149      #Do special inclusion of files only found in sourceList returned from
                    
150      #readSourceList (IPv6Suite one huge statc executable)
                    
151      readSourceList("#{dir}/sourcelist")
                    
215  projName = ARGV[1]
                    
216  @customise = projName == "IPv6Suite"
                    
217  outname = @customise ? "OneBigStaticExe.cmake" : "CMakeLists.txt"
                    
                
extconf.rb https://github.com/idletekz/ruby.git | Ruby | 495 lines
                    
39default_ipv6 = /mswin|cygwin|beos|haiku/ !~ RUBY_PLATFORM
                    
40if enable_config("ipv6", default_ipv6)
                    
41  if checking_for("ipv6") {try_link(<<EOF)}
                    
77      have_library(ipv6lib = "inet6") and "zeta"
                    
78    elsif ipv6lib = with_config("ipv6-lib")
                    
79      warn <<EOS
                    
361
                    
362Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature.
                    
363But your getaddrinfo() and getnameinfo() are appeared to be broken.  Sorry,
                    
456have_type("struct in6_pktinfo", headers) {|src|
                    
457  src.sub(%r'^/\*top\*/', '\1'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") <<
                    
458  "#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n"
                    
475# workaround for recent Windows SDK
                    
476$defs << "-DIPPROTO_IPV6=IPPROTO_IPV6" if $defs.include?("-DHAVE_CONST_IPPROTO_IPV6") && !have_macro("IPPROTO_IPV6")
                    
477
                    
                
mixins.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 101 lines
                    
34require 'msf/core/exploit/ip'
                    
35require 'msf/core/exploit/ipv6'
                    
36require 'msf/core/exploit/dhcp'
                    
                
command_output_decoder_spec.rb https://github.com/WinRb/WinRM.git | Ruby | 35 lines
                    
18  let(:expected) do
                    
19    "   Connection-specific DNS Suffix  . : \r\n   Link-local IPv6 Address . . . . . : fe80::911" \
                    
20    "d:1694:5704:5b29%12\r\n   IPv4 Address. . . . . . . . . . . : 10.0.2.15\r\n   Subnet Mask ." \
                    
24    "unnel adapter Teredo Tunneling Pseudo-Interface:\r\n\r\n   Connection-specific DNS Suffix  " \
                    
25    ". : \r\n   IPv6 Address. . . . . . . . . . . : 2001:0:9d38:6abd:4bb:28b5:f5ff:fdf0\r\n   Li" \
                    
26    "nk-local IPv6 Address . . . . . : fe80::4bb:28b5:f5ff:fdf0%14\r\n   Default Gateway . . . ." \
                    
                
utils.rb https://github.com/phiggins/ruby.git | Ruby | 270 lines
                    
59    #
                    
60    # It will create IPV4 and IPV6 sockets on all interfaces.
                    
61    def create_listeners(address, port)
                    
                
firewall.rb https://gitlab.com/jkday/bootstrap.git | Ruby | 227 lines
                    
95  #     It will be qualified with a /32 CIDR notation
                    
96  #   - An IPv6 address:
                    
97  #     It will be qualified with a /128 CIDR notation
                    
180        %w{/sbin/service iptables save}
                    
181      when :IPv6
                    
182        %w{/sbin/service ip6tables save}
                    
187        %w{/usr/libexec/iptables/iptables.init save}
                    
188      when :IPv6
                    
189        %w{/usr/libexec/iptables/ip6tables.init save}
                    
192      case proto.to_sym
                    
193      when :IPv4, :IPv6
                    
194        if (persist_ver and Puppet::Util::Package.versioncmp(persist_ver, '1.0') > 0)
                    
208        ["/bin/sh", "-c", "/usr/sbin/iptables-save > /etc/iptables/iptables.rules"]
                    
209      when :IPv6
                    
210        ["/bin/sh", "-c", "/usr/sbin/ip6tables-save > /etc/iptables/ip6tables.rules"]
                    
                
mplayer_common_task.rb https://github.com/postmodern/rtranscoder.git | Ruby | 239 lines
                    
79  # <tt>-hr-mp3-seek</tt>:: <tt>mplayer.hires_mp3_seeking</tt>
                    
80  # <tt>-prefer-ipv6</tt>:: <tt>mplayer.prefer_ipv6</tt>
                    
81  # <tt>-cdda</tt>:: <tt>mplayer.cdda</tt>
                    
181    long_option :flag => '-prefer-ipv4'
                    
182    long_option :flag => '-prefer-ipv6'
                    
183    long_option :flag => '-psprobe', :name => :probe_into_stream
                    
                
result.rb https://github.com/mongodb/mongo-ruby-driver.git | Ruby | 128 lines
                    
70        address_str = if record_host.index(':')
                    
71          # IPV6 address
                    
72          "[#{record_host}]:#{port}"
                    
                
http_javascript_keylogger.rb https://gitlab.com/0072016/metasploit-framework-rapid7 | Ruby | 306 lines
                    
125    prot = (!! datastore['SSL']) ? 'https://' : 'http://'
                    
126    if Rex::Socket.is_ipv6?(host)
                    
127      host = "[#{host}]"
                    
                
nbns_response.rb https://github.com/rapid7/metasploit-framework.git | Ruby | 179 lines
                    
52    rhost = ::IPAddr.new(rhost)
                    
53    # `recvfrom` (on Linux at least) will give us an ipv6/ipv4 mapped
                    
54    # addr like "::ffff:192.168.0.1" when the interface we're listening
                    
54    # addr like "::ffff:192.168.0.1" when the interface we're listening
                    
55    # on has an IPv6 address. Convert it to just the v4 addr
                    
56    if rhost.ipv4_mapped?
                    
                
dnsel_spec.rb https://github.com/bendiken/tor-ruby.git | Ruby | 72 lines
                    
62
                    
63    it "raises ArgumentError for IPv6 addresses" do
                    
64      expect(lambda { Tor::DNSEL.getaddress('::1') }).to raise_error(ArgumentError)
                    
                
miq_web_server_worker_mixin_spec.rb https://gitlab.com/aljesusg/manageiqtest | Ruby | 83 lines
                    
1describe MiqWebServerWorkerMixin do
                    
2  it "build_uri (ipv6)" do
                    
3    test_class = Class.new do
                    
                
platform.rb https://github.com/tronwarrior/chapter-admin.git | Ruby | 154 lines
                    
133        if info.empty?
                    
134          raise Error::WebDriverError, "unable to translate 'localhost' for TCP+IPv6"
                    
135        end
                    
                
rack_test.rb https://github.com/drd/rails.git | Ruby | 150 lines
                    
60
                    
61  def test_host_if_ipv6_reference
                    
62    @env.delete "HTTP_X_FORWARDED_HOST"
                    
66
                    
67  def test_host_if_ipv6_reference_with_port
                    
68    @env.delete "HTTP_X_FORWARDED_HOST"
                    
                
client_request_spec.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 259 lines
                    
60
                    
61  context "with ipv6 host" do
                    
62    let(:host) { '2001:DB8::1' }
                    
136
                    
137    [ "with ipv6 host",
                    
138      default_options.merge({
                    
145
                    
146    [ "with ipv6 host and non-default port",
                    
147      default_options.merge({
                    
                
 

Source

Language