>Go to discovery.webSpider, and learn how the htmlParser is used >(search for dpCache) and then apply that to fingerPKS. When you have a >working version of fingerPKS, you should send it to the list for me to >review and finally commit to the SVN.
Here is my code from your idea, using documentParsers to get Email from PKS server's response : <code> #fingerPKS.py ------------snip--------------- def discover(self, fuzzableRequest ): ''' @parameter fuzzableRequest: A fuzzableRequest instance that contains (among other things) the URL to test. ''' if not self._run: # This will remove the plugin from the discovery plugins to be runned. raise w3afRunOnce() else: # This plugin will only run one time. self._run = False pks_se = pks( self._urlOpener) url = fuzzableRequest.getURL() domain_root = urlParser.getRootDomain( url ) url = 'http://pgp.mit.edu:11371/pks/lookup?' #search for email account relate domain_root _query = urllib.urlencode({'op':'index','search':domain_root}) #get response from PKI server response = urllib2.urlopen(url+_query).read() documentParser = dpCache.dpc.getDocumentParserFor( response ) #here we get emails address with @domain_root results = documentParser.getEmails(domain_root) for result in results: i = info.info() i.setURL( 'http://pgp.mit.edu:11371/' ) mail = result.username +'@' + domain_root i.setName( mail ) i.setDesc( 'The mail account: "'+ mail + '" was found in the MIT PKS server. ' ) i['mail'] = mail i['user'] = result.username i['name'] = result.name kb.kb.append( 'mails', 'mails', i ) kb.kb.append( self, 'mails', i ) om.out.information( i.getDesc() ) return [] -------snip------------------ </code> I can't check if it work because my eric ide doesn't woking properly. Please check it and send me result, if it not work, i will try again. Thanks !
------------------------------------------------------------------------------
_______________________________________________ W3af-develop mailing list W3af-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/w3af-develop