dns_mock.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:0k
源码类别:

Ajax

开发平台:

Others

  1. class IPSocket
  2.   def self.getaddress(host)
  3.     case host
  4.     when *%w{ buy-computer.us.bsb.empty.us chinaaircatering.com.bsb.empty.us
  5.              206.230.42.212.opm.blitzed.us }
  6.       "127.0.0.2"
  7.     when *%w{ bofh.org.uk.multi.surbl.org www.bofh.org.uk.multi.surbl.org }
  8.       "10.10.10.10"
  9.     else
  10.       raise SocketError.new("getaddrinfo: Name or service not known")
  11.     end
  12.   end
  13. end