|
72 | 72 |
|
73 | 73 | public class FlowExtension implements IBurpExtender, ITab, IHttpListener, IScopeChangeListener, IExtensionStateListener {
|
74 | 74 |
|
75 |
| - private final String version = "Flow v1.18 (2017-10-14)"; |
| 75 | + private final String version = "Flow v1.18 (2017-10-15)"; |
76 | 76 | // Changes in v1.18:
|
77 | 77 | // - added Target tool filter and capture source
|
78 | 78 | // - added active / passive scans to context menu
|
| 79 | + // - FIX: fixed sorting using status and length |
79 | 80 | //private final String versionFull = "<html>" + version + ", <a href=\"https://github.com/hvqzao/burp-flow\">https://github.com/hvqzao/burp-flow</a>, MIT license</html>";
|
80 | 81 | private static IBurpExtenderCallbacks callbacks;
|
81 | 82 | private static IExtensionHelpers helpers;
|
@@ -737,8 +738,13 @@ public void processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequ
|
737 | 738 | // both complete and incomplete requests
|
738 | 739 | if (mode == 1) {
|
739 | 740 | int row = flow.size();
|
740 |
| - flow.add(new FlowEntry(toolFlag, messageInfo)); |
741 |
| - flowTableModel.fireTableRowsInserted(row, row); |
| 741 | + try { |
| 742 | + flow.add(new FlowEntry(toolFlag, messageInfo)); |
| 743 | + flowTableModel.fireTableRowsInserted(row, row); |
| 744 | + } catch (Exception ex) { |
| 745 | + // do nothing |
| 746 | + //ex.printStackTrace(stderr); |
| 747 | + } |
742 | 748 | triggerAutoDelete();
|
743 | 749 | }
|
744 | 750 | //stdout.println("[+] " + String.valueOf(helpers.analyzeRequest(messageInfo.getHttpService(), messageInfo.getRequest()).getUrl()));
|
@@ -1843,17 +1849,9 @@ public Object getValueAt(int rowIndex, int columnIndex) {
|
1843 | 1849 | case 7:
|
1844 | 1850 | return flowEntry.paramCount;
|
1845 | 1851 | case 8:
|
1846 |
| - if (flowEntry.status != -1) { |
1847 |
| - return flowEntry.status; |
1848 |
| - } else { |
1849 |
| - return ""; |
1850 |
| - } |
| 1852 | + return flowEntry.status; |
1851 | 1853 | case 9:
|
1852 |
| - if (flowEntry.length != -1) { |
1853 |
| - return flowEntry.length; |
1854 |
| - } else { |
1855 |
| - return ""; |
1856 |
| - } |
| 1854 | + return flowEntry.length; |
1857 | 1855 | case 10:
|
1858 | 1856 | return flowEntry.mime;
|
1859 | 1857 | case 11:
|
@@ -1913,8 +1911,8 @@ public static final class FlowEntry {
|
1913 | 1911 | private final String method;
|
1914 | 1912 | private final URL url;
|
1915 | 1913 | private final boolean hasParams;
|
1916 |
| - private short paramCount; |
1917 |
| - private Short status; |
| 1914 | + private int paramCount; |
| 1915 | + private int status; |
1918 | 1916 | private int length;
|
1919 | 1917 | private String mime;
|
1920 | 1918 | private final Date date;
|
@@ -2332,6 +2330,9 @@ protected void setValue(Object value) {
|
2332 | 2330 | if (value instanceof Date) {
|
2333 | 2331 | value = new SimpleDateFormat("HH:mm:ss d MMM yyyy").format(value);
|
2334 | 2332 | }
|
| 2333 | + if ((value instanceof Integer) && ((Integer) value == -1)) { |
| 2334 | + value = ""; |
| 2335 | + } |
2335 | 2336 | super.setValue(value);
|
2336 | 2337 | }
|
2337 | 2338 |
|
|
0 commit comments