コード例 #1
0
 private void stopButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_stopButtonActionPerformed
   portScaner.setStopFlag(false);
 } // GEN-LAST:event_stopButtonActionPerformed
コード例 #2
0
  private void scanButtonActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_scanButtonActionPerformed
    portScaner.setStopFlag(true);
    if (urlTextField.getText().length() > 1) {
      portScaner.setIp(urlTextField.getText());
      if (allPortsRadio.isSelected()) {
        portScaner.setSinglePortFlag(false);
        portScaner.setPortRangeFlag(false);
      } else if (singlePortRadio.isSelected()) {
        portScaner.setSinglePort(Integer.parseInt(startPortTextField.getText()));
        portScaner.setSinglePortFlag(true);
        portScaner.setPortRangeFlag(false);
      } else if (portRangeRadio.isSelected()) {
        portScaner.setSinglePortFlag(false);
        portScaner.setPortRangeFlag(true);
        portScaner.setS(Integer.parseInt(startPortTextField.getText()));
        portScaner.setF(Integer.parseInt(endPortField.getText()));
      } else {
        outPutArea.setText(
            outPutArea.getText()
                + "\n Invalid input please make sure you made the correct selection");
      }
      servisor.execute(portScaner);

    } else {
      outPutArea.setText(
          outPutArea.getText()
              + "\n Invalid input please make sure you entered the correct URL or ip address");
    }
  } // GEN-LAST:event_scanButtonActionPerformed
コード例 #3
0
 public void setServisor(ExecutorService servisor) {
   this.servisor = servisor;
   portScaner.setServicsor(servisor);
 }
コード例 #4
0
 /** Creates new form scanWindow */
 public scanWindow() {
   initComponents();
   portScaner.setOutPutArea(outPutArea);
   portScaner.setProgressBar(progressBar);
 }