Python模糊器,线程异常

时间:2014-05-09 13:11:56

标签: python multithreading ftp fuzzing

我正在用Python开发一个简单的FTP模糊器。我首先测试USER命令,然后测试后验证命令。问题是在USER模糊请求之后,所有其他命令(一次一个)的线程根本没有启动。如果我在没有模糊用户之前直接启动所有其他命令的模糊请求(即评论该部分代码),它可以正常工作。这似乎是线程启动/停止的问题。 winappdbg api用于为每个循环启动FTP服务器的新实例,如果没有发生崩溃,应该使用join()关闭它。任何的想法?

    t = threading.Thread(target=simple_debuggerFTP)
    t.start()
    ftpfuzzer =  FtpFuzz()
    i = 2
    while True:
        # get fuzz heuristic code
        s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)


        try:
            # send fuzz request
        except:
            print "[!] Target server doesn't respond any more, check crash logs..."
            break

    t.join()

    # fuzz loop for all other commands
    commands = ["PUT", "TEST", "MKD", "CWD"]
    for cmd in commands:
        t = threading.Thread(target=simple_debuggerFTP)
        t.start()
        ftpfuzzer.reset()
        i = 2
        while True:
           # get fuzz heuristic

            s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)


            try:
               # send fuzz request
            except:
                print "[!] Target server doesn't respond any more, check crash logs..."
                break

    t.join()

0 个答案:

没有答案