private void ShowAttackResultsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ShowAttackResultsButtonActionPerformed
    PreparedStatement ps = null;
    ResultSet rs = null;
    Connection conn = null;
    int i;

    try {
        if ((conn = JavaDBAccess.setConn()) != null) {
            System.out.println("Connected to database " + JavaDBAccess.getDatabaseName());
        } else {
            throw new Exception("Not connected to database " + JavaDBAccess.getDatabaseName());
        }

        conn.setAutoCommit(false);

        AttackTextArea.setText("");
        ps = conn.prepareStatement("SELECT COUNT(*) FROM ATTACK_PAYLOADS WHERE ATTACK_RESULT ='NOT SUCCESSFUL'");
        rs = ps.executeQuery();
        rs.next();
        AttackTextArea.setText(AttackTextArea.getText() + "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
        AttackTextArea.setText(AttackTextArea.getText() + "Attacks not Successful: " + rs.getString(1) + "\n");
        ps = conn.prepareStatement("SELECT COUNT(*) FROM ATTACK_PAYLOADS WHERE ATTACK_RESULT ='UNDEFINED'");
        rs = ps.executeQuery();
        rs.next();
        AttackTextArea.setText(AttackTextArea.getText() + "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
        AttackTextArea.setText(AttackTextArea.getText() + "Attacks not Successful (undefined): " + rs.getString(1) + "\n");
        ps = conn.prepareStatement("SELECT COUNT(*) FROM ATTACK_PAYLOADS WHERE ATTACK_RESULT ='SUCCESSFUL'");
        rs = ps.executeQuery();
        rs.next();
        AttackTextArea.setText(AttackTextArea.getText() + "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
        AttackTextArea.setText(AttackTextArea.getText() + "Attacks Successful: " + rs.getString(1) + "\n");
        ps = conn.prepareStatement("SELECT 1 FROM ATTACK_PAYLOADS,VULNERABILITY_INJECTION_RESULTS,TARGET_PHP_FILES,TARGET_PHP_FILES_VARIABLES WHERE ATTACK_PAYLOADS.VULNERABILITY_INJECTION_RESULT=VULNERABILITY_INJECTION_RESULTS.ID AND VULNERABILITY_INJECTION_RESULTS.TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND ATTACK_PAYLOADS.TARGET_PHP_FILES_VARIABLE=TARGET_PHP_FILES_VARIABLES.ID AND ATTACK_PAYLOADS.ATTACK_RESULT ='SUCCESSFUL' GROUP BY ATTACK_PAYLOADS.TARGET_PHP_FILES_RUNS_FUNCTION,TARGET_PHP_FILES.NAME,ATTACK_PAYLOADS.TARGET_PHP_FILES_VARIABLE,TARGET_PHP_FILES_VARIABLES.NAME,VULNERABILITY_INJECTION_RESULTS.DIFF_TEXT");
        rs = ps.executeQuery();
        i = 0;
        while (rs.next()) {
            i++;
        }
        AttackTextArea.setText(AttackTextArea.getText() + "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
        AttackTextArea.setText(AttackTextArea.getText() + "Vulnerabilities that could be Attacked: " + i + "\n");

        ps = conn.prepareStatement("SELECT ATTACK_PAYLOADS.TARGET_PHP_FILES_RUNS_FUNCTION,TARGET_PHP_FILES.NAME,ATTACK_PAYLOADS.TARGET_PHP_FILES_VARIABLE,TARGET_PHP_FILES_VARIABLES.NAME,VULNERABILITY_INJECTION_RESULTS.DIFF_TEXT FROM ATTACK_PAYLOADS,VULNERABILITY_INJECTION_RESULTS,TARGET_PHP_FILES,TARGET_PHP_FILES_VARIABLES WHERE ATTACK_PAYLOADS.VULNERABILITY_INJECTION_RESULT=VULNERABILITY_INJECTION_RESULTS.ID AND VULNERABILITY_INJECTION_RESULTS.TARGET_PHP_FILE=TARGET_PHP_FILES.ID AND ATTACK_PAYLOADS.TARGET_PHP_FILES_VARIABLE=TARGET_PHP_FILES_VARIABLES.ID AND ATTACK_PAYLOADS.ATTACK_RESULT ='SUCCESSFUL' GROUP BY ATTACK_PAYLOADS.TARGET_PHP_FILES_RUNS_FUNCTION,TARGET_PHP_FILES.NAME,ATTACK_PAYLOADS.TARGET_PHP_FILES_VARIABLE,TARGET_PHP_FILES_VARIABLES.NAME,VULNERABILITY_INJECTION_RESULTS.DIFF_TEXT");
        rs = ps.executeQuery();
        while (rs.next()) {
            AttackTextArea.setText(AttackTextArea.getText() + "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n");
            AttackTextArea.setText(AttackTextArea.getText() + rs.getInt(1) + "\t" + rs.getString(2) + "\t" + rs.getInt(3) + "\t" + rs.getString(4) + "\n" + rs.getString(5) + "\n");
        }
        rs.close();
        ps.close();
        conn.commit();
        conn.close();

    } catch (Throwable e) {
        System.out.println("Errors in ParsePHPFile!");
        System.out.println("exception thrown:");

        if (e instanceof SQLException) {
            JavaDBAccess.printSQLError((SQLException) e);
        } else {
            e.printStackTrace();
        }
    }
}