Commits

WebBreacher committed 26c3280

Adding module

Comments (0)

Files changed (6)

modules/auxiliary/mcafee_affil.py

         framework.module.__init__(self, params)
         self.register_option('domain', self.goptions['domain']['value'], 'yes', self.goptions['domain']['desc'])
         self.register_option('verbose', self.goptions['verbose']['value'], 'yes', self.goptions['verbose']['desc'])
+        self.classify = 'passive'
         self.info = {
                      'Name': 'McAfee Domain Affiliation Lookup',
                      'Author': 'Micah Hoffman (@WebBreacher)',
         try: resp = self.request(url)
         except KeyboardInterrupt:
             print ''
+            return
         except Exception as e:
             self.error(e.__str__())
             return
             tdata = [] 
             tdata.append(['Domain/URL', 'Category', 'Links'])
             for col in resp.json:
-                tdata.append([col['label'], col['hover'], str(col['link'])])
-            
-            # Print the table  
+                tdata.append([col['label'], col['hover'], str(col['link'])]) 
             self.table(tdata, True)
 
         else:

modules/auxiliary/mcafee_dns.py

         framework.module.__init__(self, params)
         self.register_option('domain', self.goptions['domain']['value'], 'yes', self.goptions['domain']['desc'])
         self.register_option('verbose', self.goptions['verbose']['value'], 'yes', self.goptions['verbose']['desc'])
+        self.register_option('addhoststodb', False, 'no', 'Add hosts discovered to the database.')
+        self.classify = 'passive'
         self.info = {
                      'Name': 'McAfee Domain DNS Lookup',
                      'Author': 'Micah Hoffman (@WebBreacher)',
-                     'Description': 'Checks mcafee.com site for DNS information about a domain.',
+                     'Description': 'Checks mcafee.com site for DNS information about a domain. This module can update the \'hosts\' table of the database with the results.',
                      'Comments': []
                      }
    
     def mcafee_dns(self):
         verbose = self.options['verbose']['value']
         domain = self.options['domain']['value']
+        addhosts = self.options['addhoststodb']['value']
 
         url = 'http://www.mcafee.com/threat-intelligence/jsproxy/domain.ashx?q=dns&f=%s' % (domain)
         if verbose: self.output('URL being retrieved: %s' % url)
         try: resp = self.request(url)
         except KeyboardInterrupt:
             print ''
+            return
         except Exception as e:
             self.error(e.__str__())
             return
                 tdata.append([col['Domain'], col['Hostname'], ip, col['First_Seen'], col['Last_Seen'],col['Risk'], col['Type']])
                 
                 # Add each host to the database
-                self.add_host(col['Hostname'], address=ip)
+                if addhosts: self.add_host(col['Hostname'], address=ip)
                 
             # Print the table  
             self.table(tdata, True)

modules/auxiliary/mcafee_mail.py

         framework.module.__init__(self, params)
         self.register_option('domain', self.goptions['domain']['value'], 'yes', self.goptions['domain']['desc'])
         self.register_option('verbose', self.goptions['verbose']['value'], 'yes', self.goptions['verbose']['desc'])
+        self.register_option('addhoststodb', False, 'no', 'Add hosts discovered to the database.')
+        self.classify = 'passive'
         self.info = {
                      'Name': 'McAfee Mail Host Lookup',
                      'Author': 'Micah Hoffman (@WebBreacher)',
-                     'Description': 'Checks mcafee.com site for mail servers for given domain.',
+                     'Description': 'Checks mcafee.com site for mail servers for given domain. This module can update the \'hosts\' table of the database with the results.',
                      'Comments': []
                      }
    
     def mcafee_mail(self):
         verbose = self.options['verbose']['value']
         domain = self.options['domain']['value']
+        addhosts = self.options['addhoststodb']['value']
 
         url = 'http://www.mcafee.com/threat-intelligence/jsproxy/domain.ashx?q=mail&f=%s' % (domain)
         if verbose: self.output('URL being retrieved: %s' % url)
         try: resp = self.request(url)
         except KeyboardInterrupt:
             print ''
+            return
         except Exception as e:
             self.error(e.__str__())
             return
                 tdata.append([col['Domain'], col['MX_Data'], col['IP_Address'], col['Weight']])
                 
                 # Add each host to the database
-                self.add_host(col['MX_Data'], address=col['IP_Address'])
+                if addhosts: self.add_host(col['MX_Data'], address=col['IP_Address'])
                 
             # Print the table            
             self.table(tdata, True)

modules/auxiliary/siteadvisor_summary.py

         try: resp = self.request(url)
         except KeyboardInterrupt:
             print ''
+            return
         except Exception as e:
             self.error(e.__str__())
             return

modules/auxiliary/urlvoid.py

         try: resp = self.request(url)
         except KeyboardInterrupt:
             print ''
+            return
         except Exception as e:
             self.error(e.__str__())
             return

modules/auxiliary/xssed.py

         framework.module.__init__(self, params)
         self.register_option('domain', self.goptions['domain']['value'], 'yes', self.goptions['domain']['desc'])
         self.register_option('verbose', self.goptions['verbose']['value'], 'yes', self.goptions['verbose']['desc'])
+        self.classify = 'passive'
         self.info = {
                      'Name': 'XSSed Host Lookup',
                      'Author': 'Micah Hoffman (@WebBreacher)',
         try: resp = self.request(url)
         except KeyboardInterrupt:
             print ''
+            return
         except Exception as e:
             self.error(e.__str__())
             return