Package org.owasp.jbrofuzz.util

Examples of org.owasp.jbrofuzz.util.JBroFuzzFileFilter


    // Set the Fuzzing Panel as the one to view
    mWindow.setTabShow(JBroFuzzWindow.ID_PANEL_FUZZING);
    Logger.log("Save As Fuzzing Session", 1);

    final JBroFuzzFileFilter filter = new JBroFuzzFileFilter();

    final String dirString = JBroFuzz.PREFS.get(JBroFuzzPrefs.DIRS[2].getId(), System.getProperty("user.dir"));
    JFileChooser fc;
    try {
      if( (new File(dirString).isDirectory()) ) {
View Full Code Here


    File file = null;
    // Set the Fuzzing Panel as the one to view
    mWindow.setTabShow(JBroFuzzWindow.ID_PANEL_FUZZING);
    Logger.log("Open Fuzzing Session", 1);

    final JBroFuzzFileFilter filter = new JBroFuzzFileFilter();
    final String dirString = JBroFuzz.PREFS.get(
        JBroFuzzPrefs.DIRS[2].getId(), System.getProperty("user.dir"));

    JFileChooser fc = new JFileChooser();

    if (fileName.length() == 0 || fileName.equals("")) {
      try {
        if ((new File(dirString).isDirectory())){
          fc = new JFileChooser(dirString);
        } else {
          fc = new JFileChooser();
        }
      } catch (final SecurityException e1) {
        fc = new JFileChooser();
        Logger.log(
            "A security exception occured, while attempting to point to a directory",
            4);
      }

      fc.setFileFilter(filter);

      final int returnVal = fc.showOpenDialog(mWindow);
      if (returnVal == JFileChooser.APPROVE_OPTION) {

        file = fc.getSelectedFile();
      }
    } else {
      file = new File(fileName);
    }
    Logger.log("Opening: " + file.getName(), 1);

    final String path = file.getAbsolutePath().toLowerCase();
    // If the file does not end in .jbrofuzz, return
    JBroFuzzFileFilter jbfff = new JBroFuzzFileFilter();
    if (!path.endsWith(".jbrofuzz") || !jbfff.accept(file)) {
      JOptionPane.showMessageDialog(fc,
          "The file selected is not a valid .jbrofuzz file",
          " JBroFuzz - Open ", JOptionPane.WARNING_MESSAGE);
      return;
    }
View Full Code Here

    if (fileName.length() == 0 || fileName.equals("")){
      file = mWindow.getCurrentFileOpened();
      // If there is no file opened, show a dialog
      if (!mWindow.isCurrentFileOpened() || (fileName.length() == 0 && fileName.equals(""))) {

        final JBroFuzzFileFilter filter = new JBroFuzzFileFilter();

        final String dirString = JBroFuzz.PREFS.get(JBroFuzzPrefs.DIRS[2].getId(), System.getProperty("user.dir"));
        JFileChooser fc;
        try {
          if( (new File(dirString).isDirectory()) ) {
View Full Code Here

      return false;

    }
    final File inputFile = new File(dirString + File.separator + fileName);
    JBroFuzzFileFilter jbfff = new JBroFuzzFileFilter();
    if (!jbfff.accept(inputFile)){
      return false;
    }
   
    if (inputFile.exists()) {
View Full Code Here

   */
  private static String parseExtFile(String fileName) {

    final File inputFile = new File(System.getProperty("user.dir") + File.separator + fileName);

    JBroFuzzFileFilter jbfff = new JBroFuzzFileFilter();
    if (!jbfff.accept(inputFile)){
      return "This file is not accepted";
    }
   
    if (inputFile.exists()) {
      if (inputFile.isDirectory()) {
View Full Code Here

TOP

Related Classes of org.owasp.jbrofuzz.util.JBroFuzzFileFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.