Beispiel #1
0
 def execute(self, targethost, targetport, dictionary, methods=None, max_test_pkts_per_method=20, ackenabled=False):
     if methods is None:
         methods = ["PING","REGISTER","OPTIONS",]
 
     self._methods = methods
     self._max_test_pkts_per_method = max_test_pkts_per_method
     self._targetip = socket.gethostbyname(targethost)
     self._targetport = targetport
     self._ackenabled = ackenabled
     self._doneusernames = []
     try:
         self._scaniter = fileLineIterator(open(dictionary, 'r'))
     except:
         self.logDebug("caught exception while opening dictionary '%s' (see traceback below):\n%s" %(dictionary,traceback.format_exc()))
         return        
     self.set_currentmethod()
     self.mainLoop()
     if self._doneusernames:
         self.logInfo('cracked usernames: %s' %(', '.join(self._doneusernames))) # XXX reportVuln here !!!
     else:
         self.logInfo('nothing found')
Beispiel #2
0
 def execute(self, targetip, targetport, extension, dictionary):
     self._targetip = targetip
     self._targetport = targetport
     self._username = extension
     self._realm = None
     self._digestalgorithm = None
     self._scaniter = fileLineIterator(dictionary)
     self._targetisproxy = False
     self._testpktgenerated = False
     self._targetisalive = False
     self._reusenonce = False
     self._passwordcracked = False
     self._failed = False
     self._notfound = False
     self._challenges = list()
     self._testreqsent = False
     self.mainLoop()
     if not self._targetisalive:
         self.logWarning("No server response")
     elif not (self._notfound or self._passwordcracked):
         self.logInfo("could'nt crack password for '%s" %(self._username))