当前位置: 首页>>代码示例>>Python>>正文


Python Request.__init__方法代码示例

本文整理汇总了Python中twisted.web.http.Request.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Request.__init__方法的具体用法?Python Request.__init__怎么用?Python Request.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twisted.web.http.Request的用法示例。


在下文中一共展示了Request.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       = reactor
     self.urlMonitor    = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
     self.dnsCache      = DnsCache.getInstance()
     self.plugins       = ProxyPlugins.getInstance()
开发者ID:djgrasss,项目名称:MITMf,代码行数:9,代码来源:ClientRequestHSTS.py

示例2: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
    def __init__(self, channel, queued, reactor = reactor):
        Request.__init__(self, channel, queued)

        logging.debug('Client request initiated...')

        self.reactor = reactor
        self.url_monitor = URLMonitor.get_instance()
        self.cookie_cleaner = CookieCleaner.get_instance()
        self.dns_cache = DNSCache.get_instance()
开发者ID:Tijme,项目名称:tsslstrip,代码行数:11,代码来源:ClientRequest.py

示例3: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
	def __init__(self, channel, queued, reactor=reactor):
		Request.__init__(self, channel, queued)
		self.reactor = reactor
		self.peers = {}
		self.protocol = None
		self.host = None
		self.port = None
		self.rest = None
		self.configs = reactor.configs
		self.log = Logger()
开发者ID:doctorOb,项目名称:MQP,代码行数:12,代码来源:BaseProxy.py

示例4: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       = reactor
     self.urlMonitor    = URLMonitor.getInstance()
     self.hsts          = URLMonitor.getInstance().hsts
     self.cookieCleaner = CookieCleaner.getInstance()
     self.dnsCache      = DnsCache.getInstance()
     #self.uniqueId      = random.randint(0, 10000)
     
     #Use are own DNS server instead of reactor.resolve()
     self.customResolver = dns.resolver.Resolver()    
     self.customResolver.nameservers  = ['127.0.0.1']
开发者ID:Gajasurve,项目名称:MITMf,代码行数:14,代码来源:ClientRequest.py

示例5: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
    def __init__(self, channel, path):
        """
        @param channel: the channel we're connected to.
        @param path: URI path
        """
        Request.__init__(self, channel, queued=False)

        # Unlike http.Request, which waits until it's received the whole request to set uri, args,
        # and path, we must do this ASAP
        self.uri = path
        x = self.uri.split('?', 1)

        if len(x) == 1:
            self.path = self.uri
            self.args = {}
        else:
            self.path, argstring = x
            self.args = parse_qs(argstring, 1)
开发者ID:ajdavis,项目名称:SyncSend,代码行数:20,代码来源:upload.py

示例6: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued):
     Request.__init__(self, channel, queued)
开发者ID:beelives,项目名称:opencanary,代码行数:4,代码来源:httpproxy.py

示例7: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.channel = channel
     self.urlMonitor = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
开发者ID:xiaolaba,项目名称:sectk,代码行数:8,代码来源:ClientRequest.py

示例8: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
	def __init__(self, channel, queued, reactor=reactor):
		Request.__init__(self, channel, queued)
		self.reactor	   = reactor
		self.urlMonitor	= URLMonitor.getInstance()
		self.dnsCache	  = DnsCache.getInstance()
开发者ID:Churro,项目名称:clipcaptcha,代码行数:7,代码来源:ClientRequest.py

示例9: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor       	     = reactor
     self.PersistentData      = PersistentData.getInstance()
开发者ID:Kharlam,项目名称:Lupin,代码行数:6,代码来源:ClientRequest.py

示例10: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, *a, **kw):
     self.yay = kw.pop('yay')
     Request.__init__(self, *a, **kw)
开发者ID:pombredanne,项目名称:boiler,代码行数:5,代码来源:deploy.py

示例11: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued=_QUEUED_SENTINEL, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
开发者ID:JohnDoes95,项目名称:project_parser,代码行数:5,代码来源:proxy.py

示例12: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.endpointFactory = channel.createEndpoint
开发者ID:majestrate,项目名称:i2p-tools,代码行数:6,代码来源:http.py

示例13: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     Request.__init__(self, *args, **kwargs)
     self.reply_channel = Channel.new_name("!http.response")
     self.channel.factory.reply_protocols[self.reply_channel] = self
开发者ID:ydaniv,项目名称:channels,代码行数:6,代码来源:http_twisted.py

示例14: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, *a, **kw):
     self.task = kw.pop('task')
     Request.__init__(self, *a, **kw)
开发者ID:isotoma,项目名称:boiler,代码行数:5,代码来源:deploy.py

示例15: __init__

# 需要导入模块: from twisted.web.http import Request [as 别名]
# 或者: from twisted.web.http.Request import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     self.key = KEYFILE
     self.cert = CERTFILE
     self.opener = urllib2.build_opener(HTTPSClientCertHandler(self.key, self.cert))
     Request.__init__(self, *args, **kwargs)
开发者ID:nookieman,项目名称:ClientCertHTTPProxy,代码行数:7,代码来源:clientCertHTTPProxy.py


注:本文中的twisted.web.http.Request.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。