Package org.owasp.webscarab.plugin

Examples of org.owasp.webscarab.plugin.Script


    private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed
        TreePath path = _hookTree.getTree().getSelectionPath();
        if (path.getPathCount()==4) {
            String plugin = (String) path.getPathComponent(1);
            Hook hook = (Hook) path.getPathComponent(2);
            Script script = (Script) path.getPathComponent(3);
            _manager.removeScript(plugin, hook, script);
        }
    }//GEN-LAST:event_removeButtonActionPerformed
View Full Code Here


        jfc.setDialogTitle("Load script");
        int returnVal = jfc.showOpenDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = jfc.getSelectedFile();
            try {
                Script script = new Script(file);
                _manager.addScript(plugin, hook, script);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, new String[] {"Error loading Script : ", e.getMessage()}, "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
View Full Code Here

        }
       
        public Object getValueAt(Object node, int column) {
            if (column == 0) return node;
            if (node instanceof Script) {
                Script script = (Script) node;
                return new Boolean(script.isEnabled());
            }
            return null;
        }
View Full Code Here

                if (hook != null) {
                    label.setText(hook.getName());
                }
            } else if (value instanceof Script && comp instanceof JLabel) {
                JLabel label = (JLabel) comp;
                Script script = (Script) value;
                if (script != null) {
                    label.setText(script.getFile().getName());
                }
            }
            return comp;
        }
View Full Code Here

    private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed
        TreePath path = _hookTree.getTree().getSelectionPath();
        if (path.getPathCount()==4) {
            String plugin = (String) path.getPathComponent(1);
            Hook hook = (Hook) path.getPathComponent(2);
            Script script = (Script) path.getPathComponent(3);
            _manager.removeScript(plugin, hook, script);
        }
    }//GEN-LAST:event_removeButtonActionPerformed
View Full Code Here

        jfc.setDialogTitle("Load script");
        int returnVal = jfc.showOpenDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = jfc.getSelectedFile();
            try {
                Script script = new Script(file);
                _manager.addScript(plugin, hook, script);
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, new String[] {"Error loading Script : ", e.getMessage()}, "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
View Full Code Here

        }
       
        public Object getValueAt(Object node, int column) {
            if (column == 0) return node;
            if (node instanceof Script) {
                Script script = (Script) node;
                return new Boolean(script.isEnabled());
            }
            return null;
        }
View Full Code Here

                if (hook != null) {
                    label.setText(hook.getName());
                }
            } else if (value instanceof Script && comp instanceof JLabel) {
                JLabel label = (JLabel) comp;
                Script script = (Script) value;
                if (script != null) {
                    label.setText(script.getFile().getName());
                }
            }
            return comp;
        }
View Full Code Here

TOP

Related Classes of org.owasp.webscarab.plugin.Script

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.