Package org.owasp.webscarab.model

Examples of org.owasp.webscarab.model.ConversationID


            new ColumnDataModel() {
                public String getColumnName() {
                    return "Possible Injection";
                }
                public Object getValue(Object key) {
                    ConversationID id = (ConversationID) key;
                    return _model.isXSSSuspected(id) || _model.isCRLFSuspected(id)? Boolean.TRUE : Boolean.FALSE;
                }
                public Class getColumnClass() {
                    return Boolean.class;
                }
View Full Code Here


            public void valueChanged(ListSelectionEvent e) {
                if (e.getValueIsAdjusting()) return;
                int row = conversationTable.getSelectedRow();
                TableModel tm = conversationTable.getModel();
                if (row >-1) {
                    ConversationID id = (ConversationID) tm.getValueAt(row, 0); // UGLY hack! FIXME!!!!
                    _showAction.putValue("CONVERSATION", id);
                } else {
                    _showAction.putValue("CONVERSATION", null);
                }
            }
View Full Code Here

                _conversationList.clear();
                if (_type != null && _key != null) {
                    ConversationModel cmodel = _model.getConversationModel();
                    int count = cmodel.getConversationCount();
                    for (int i=0; i<count; i++) {
                        ConversationID id = cmodel.getConversationAt(i);
                        String[] fragments = getConversationFragmentKeys(id,  _type);
                        if (fragments != null) {
                            for (int j=0; j<fragments.length; j++) {
                                if (fragments[j].equals(_key)) {
                                    _conversationList.add(id);
View Full Code Here

       
        requestComboBox.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Object o = requestComboBox.getSelectedItem();
                if (o instanceof ConversationID) {
                    ConversationID id = (ConversationID) o;
                    Request r = _model.getRequest(id);
                    _requestPanel.setEditable(true);
                    _requestPanel.setRequest(r);
                    _responsePanel.setEditable(false);
                    _responsePanel.setResponse(null);
View Full Code Here

   
    public void run() {
        _runThread = Thread.currentThread();
        _model.setRunning(true);
        int count = 0;
        ConversationID id = null;
        ConversationModel cmodel = _model.getConversationModel();
        while (!_model.isStopping()) {
            try {
                synchronized(_lock) {
                    _lock.wait();
                }
                if (id != _selected) {
                    id = _selected;
                    _model.setBusy(true);
                    HttpUrl baseUrl = cmodel.getRequestUrl(id);
                    if (baseUrl.getQuery() != null)
                      baseUrl = baseUrl.getParentUrl();
                    Response baseResponse = cmodel.getResponse(id);
                    byte[] baseBytes = baseResponse.getContent();
                    String type = baseResponse.getHeader("Content-Type");
                    if (type == null || !type.startsWith("text")) {
                        _logger.warning("Base response is not text, skipping!");
                        return;
                    }
                    List baseline = tokenize(baseBytes);
                    _diff = new LevenshteinDistance(baseline);
                   
                    count = cmodel.getConversationCount();
                    _logger.info("Checking " + count + " conversaitons");
                    for (int i=0; i<count; i++) {
                        ConversationID cid = cmodel.getConversationAt(i);
                        HttpUrl curl = cmodel.getRequestUrl(cid);
                        if (curl.getQuery() != null)
                          curl = curl.getParentUrl();
                        if (!curl.equals(baseUrl))
                          continue;
                        _logger.info("Checking conversation " + i + " == " + cid);
                        if (cid.equals(id)) {
                            _model.setDistance(cid, 0);
                        } else {
                            Response response = cmodel.getResponse(cid);
                            String ctype = response.getHeader("Content-Type");
                            _logger.info("Content-type is " + ctype);
View Full Code Here

            _analysisQueue.add(id);
        }
    }
   
    public ConversationID addConversation(Request request, Response response, String origin) {
        ConversationID id = reserveConversationID();
        addConversation(id, new Date(), request, response, origin);
        return id;
    }
View Full Code Here

   
    private class QueueProcessor implements Runnable {
       
        public void run() {
            while (true) {
                ConversationID id = null;
                synchronized (_analysisQueue) {
                    if (_analysisQueue.size()>0)
                        id = (ConversationID) _analysisQueue.remove(0);
                }
                if (id != null) {
View Full Code Here

    public void removeSearch(String description) {
        _model.removeSearch(description);
        ConversationModel cmodel = _frameworkModel.getConversationModel();
        int count = cmodel.getConversationCount();
        for (int i=0; i<count; i++) {
            ConversationID id = cmodel.getConversationAt(i);
            _model.setSearchMatch(id, description, false);
        }
        saveSearches();
    }
View Full Code Here

    public void setFilter(String description) {
        _model.setFilter(description);
    }
   
    public void reload(String description) {
        ConversationID id = null;
        try {
            String expr = _model.getSearchExpression(description);
            ConversationModel cmodel = _frameworkModel.getConversationModel();
            int count = cmodel.getConversationCount();
            for (int i=0; i<count; i++) {
View Full Code Here

    public ConversationID findCorrespondingHTMLFormConversation(ConversationID samlId) {
        ConversationModel conversationModel = this.model.getConversationModel();
        HttpUrl samlHttpUrl = conversationModel.getRequestUrl(samlId);
        int samlConversationIndex = conversationModel.getIndexOfConversation(samlId);
        for (int conversationIndex = samlConversationIndex - 1; conversationIndex >= 0; conversationIndex--) {
            ConversationID id = conversationModel.getConversationAt(conversationIndex);
            Response response = conversationModel.getResponse(id);
            HttpUrl httpUrl = conversationModel.getRequestUrl(id);
            Object parsedContent = Parser.parse(httpUrl, response);
            if (null == parsedContent) {
                continue;
View Full Code Here

TOP

Related Classes of org.owasp.webscarab.model.ConversationID

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.