Пример #1
0
def addLocalResolverHosts(footprint_id):
    print "addLocalResolverHosts()"
    conf = ConfigParser.ConfigParser()
    conf.read("connections.conf")
    
    db = MySQLdb.connect(host="localhost", user=conf.get('MySQL',  'user'), passwd=conf.get('MySQL',  'pass'), db=conf.get('MySQL',  'db'))
    db.autocommit(True)
    
    dbfunctions.addIP(db, footprint_id, footprintfunctions.getIPAddress(), 0)

    dbfunctions.addDomain(db, footprint_id, footprintfunctions.getLocalResolver())

    footprintfunctions.extractHostsFromDomains(db, footprint_id)
    
    db.close()
Пример #2
0
 def on_btnAddDomain_clicked(self):
     addDomainWnd = AddDomainDialog()
     if addDomainWnd.exec_():
         dbfunctions.addDomain(self.db, self.footprintID,
                               addDomainWnd.getResult())
         self.updateUI()
Пример #3
0
 def on_btnAddDomain_clicked(self):
     addDomainWnd = AddDomainDialog()
     if addDomainWnd.exec_():
         dbfunctions.addDomain(self.db,  self.footprintID,  addDomainWnd.getResult())
         self.updateUI()