Ejemplo n.º 1
0
    def isIP(self):
        """
        Check if lineEdit IP is well formed
        :return: True if IP is well formed and it is reachable, False otherwise
        """

        IP = self.lineEditIP.text()
        if IP:
            # Verify if the IP "matches" the regular expression
            state = self.__validator.validate(IP, 0)[0]
            if state == QValidator.Acceptable:
                if Network.ping(IP):
                    return True
                else:
                    MessageBox.critical("Error",
                                        "Destination Host Unreachable.")
                    return False
            else:
                MessageBox.critical("Error",
                                    "You have to add a valid IP (0.0.0.0).")
                return False
        else:
            MessageBox.information("Information",
                                   "You have not add a IP on this project.")
            return True
Ejemplo n.º 2
0
 def actionReportPDF(self):
     """This function is executed when actionReportPDF is clicked."""
     if self.__scanController.save():
         if self.__exploitsController.save():
             if self.__reportController.show():
                 MessageBox.information(
                     "Report PDF", "Your report was saved successfully")
Ejemplo n.º 3
0
    def isIP(self):
        """
        Check if lineEdit IP is well formed
        :return: True if IP is well formed and it is reachable, False otherwise
        """

        # Verify if the IP "matches" the regular expression
        IP = self.lineEditIP.text()
        if IP:
            state = self.__validator.validate(IP, 0)[0]
            if state == QValidator.Acceptable:
                return True
            else:
                MessageBox.critical("Error", "You have to add a valid IP (0.0.0.0).")
                return False
        else:
            MessageBox.information("Information", "You have not add a IP on this project.")
            return True
Ejemplo n.º 4
0
 def actionSave(self):
     """This function is executed when actionSave is clicked."""
     if self.__scanController.save():
         if self.__exploitsController.save():
             MessageBox.information("Save",
                                    "All changes was saved successfully")
Ejemplo n.º 5
0
 def actionSave(self):
     """This function is executed when actionSave is clicked."""
     if self.__scanController.save():
         if self.__exploitsController.save():
             MessageBox.information("Save", "All changes was saved successfully")
Ejemplo n.º 6
0
 def actionReportPDF(self):
     """This function is executed when actionReportPDF is clicked."""
     if self.__scanController.save():
         if self.__exploitsController.save():
             if self.__reportController.show():
                 MessageBox.information("Report PDF", "Your report was saved successfully")