aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/tools/web/static/app.css1
-rw-r--r--mitmproxy/tools/web/static/app.js1167
-rw-r--r--web/src/js/components/Footer.jsx6
3 files changed, 746 insertions, 428 deletions
diff --git a/mitmproxy/tools/web/static/app.css b/mitmproxy/tools/web/static/app.css
index b95155a7..9b44ea9a 100644
--- a/mitmproxy/tools/web/static/app.css
+++ b/mitmproxy/tools/web/static/app.css
@@ -564,7 +564,6 @@ footer .label {
.CodeMirror {
border: 1px solid #ccc;
height: auto !important;
- max-height: 2048px !important;
}
/* BASICS */
diff --git a/mitmproxy/tools/web/static/app.js b/mitmproxy/tools/web/static/app.js
index 7160def8..480d9c71 100644
--- a/mitmproxy/tools/web/static/app.js
+++ b/mitmproxy/tools/web/static/app.js
@@ -598,13 +598,22 @@ function ContentViewOptions(_ref) {
return _react2.default.createElement(
'div',
{ className: 'view-options' },
- _react2.default.createElement(_ViewSelector2.default, { message: message }),
+ readonly ? _react2.default.createElement(_ViewSelector2.default, { message: message }) : _react2.default.createElement(
+ 'span',
+ null,
+ _react2.default.createElement(
+ 'b',
+ null,
+ 'View:'
+ ),
+ ' edit'
+ ),
' ',
_react2.default.createElement(_DownloadContentButton2.default, { flow: flow, message: message }),
' ',
!readonly && _react2.default.createElement(_UploadContentButton2.default, { uploadContent: uploadContent }),
' ',
- _react2.default.createElement(
+ readonly && _react2.default.createElement(
'span',
null,
contentViewDescription
@@ -1010,34 +1019,25 @@ var _react2 = _interopRequireDefault(_react);
var _reactRedux = require('react-redux');
-var _ContentViews = require('./ContentViews');
-
-var ContentViews = _interopRequireWildcard(_ContentViews);
-
var _flow = require('../../ducks/ui/flow');
var _Dropdown = require('../common/Dropdown');
var _Dropdown2 = _interopRequireDefault(_Dropdown);
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
ViewSelector.propTypes = {
contentViews: _react.PropTypes.array.isRequired,
activeView: _react.PropTypes.string.isRequired,
- isEdit: _react.PropTypes.bool.isRequired,
setContentView: _react.PropTypes.func.isRequired
};
function ViewSelector(_ref) {
var contentViews = _ref.contentViews;
var activeView = _ref.activeView;
- var isEdit = _ref.isEdit;
var setContentView = _ref.setContentView;
- var edit = ContentViews.Edit.displayName;
var inner = _react2.default.createElement(
'span',
null,
@@ -1048,7 +1048,7 @@ function ViewSelector(_ref) {
'View:'
),
' ',
- activeView,
+ activeView.toLowerCase(),
' ',
_react2.default.createElement('span', { className: 'caret' }),
' '
@@ -1065,28 +1065,20 @@ function ViewSelector(_ref) {
} },
name.toLowerCase().replace('_', ' ')
);
- }),
- isEdit && _react2.default.createElement(
- 'a',
- { href: '#', onClick: function onClick(e) {
- e.preventDefault();setContentView(edit);
- } },
- edit.toLowerCase()
- )
+ })
);
}
exports.default = (0, _reactRedux.connect)(function (state) {
return {
contentViews: state.settings.contentViews,
- activeView: state.ui.flow.contentView,
- isEdit: !!state.ui.flow.modifiedFlow
+ activeView: state.ui.flow.contentView
};
}, {
setContentView: _flow.setContentView
})(ViewSelector);
-},{"../../ducks/ui/flow":52,"../common/Dropdown":42,"./ContentViews":8,"react":"react","react-redux":"react-redux"}],14:[function(require,module,exports){
+},{"../../ducks/ui/flow":52,"../common/Dropdown":42,"react":"react","react-redux":"react-redux"}],14:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
@@ -1969,7 +1961,6 @@ var FlowView = function (_Component) {
}(_react.Component);
FlowView.allTabs = { Request: _Messages.Request, Response: _Messages.Response, Error: _Messages.ErrorView, Details: _Details2.default };
-exports.default = FlowView;
exports.default = (0, _reactRedux.connect)(function (state) {
return {
promptOpen: state.ui.promptOpen,
@@ -2977,6 +2968,7 @@ function Footer(_ref) {
var stream_large_bodies = settings.stream_large_bodies;
var listen_host = settings.listen_host;
var listen_port = settings.listen_port;
+ var version = settings.version;
return _react2.default.createElement(
'footer',
@@ -3008,10 +3000,10 @@ function Footer(_ref) {
{ className: 'label label-success' },
'raw-tcp'
),
- http2 && _react2.default.createElement(
+ !http2 && _react2.default.createElement(
'span',
{ className: 'label label-success' },
- 'http2'
+ 'no-http2'
),
!websocket && _react2.default.createElement(
'span',
@@ -3052,11 +3044,15 @@ function Footer(_ref) {
_react2.default.createElement(
'span',
{ className: 'label label-primary', title: 'HTTP Proxy Server Address' },
- '[',
listen_host || "*",
':',
- listen_port,
- ']'
+ listen_port
+ ),
+ _react2.default.createElement(
+ 'span',
+ { className: 'label label-info', title: 'Mitmproxy Version' },
+ 'v',
+ version
)
)
);
@@ -5775,7 +5771,7 @@ function reducer() {
return _extends({}, state, {
tab: action.tab ? action.tab : 'request',
displayLarge: false,
- showFullContent: false
+ showFullContent: state.contentView == 'Edit'
});
case SET_CONTENT_VIEW:
@@ -6420,35 +6416,35 @@ module.exports = function () {
peg$c22 = function peg$c22(expr) {
return binding(expr);
},
- peg$c23 = "~a",
- peg$c24 = { type: "literal", value: "~a", description: "\"~a\"" },
+ peg$c23 = "true",
+ peg$c24 = { type: "literal", value: "true", description: "\"true\"" },
peg$c25 = function peg$c25() {
- return assetFilter;
+ return trueFilter;
},
- peg$c26 = "~e",
- peg$c27 = { type: "literal", value: "~e", description: "\"~e\"" },
+ peg$c26 = "false",
+ peg$c27 = { type: "literal", value: "false", description: "\"false\"" },
peg$c28 = function peg$c28() {
- return errorFilter;
+ return falseFilter;
},
- peg$c29 = "~q",
- peg$c30 = { type: "literal", value: "~q", description: "\"~q\"" },
+ peg$c29 = "~a",
+ peg$c30 = { type: "literal", value: "~a", description: "\"~a\"" },
peg$c31 = function peg$c31() {
- return noResponseFilter;
+ return assetFilter;
},
- peg$c32 = "~s",
- peg$c33 = { type: "literal", value: "~s", description: "\"~s\"" },
- peg$c34 = function peg$c34() {
- return responseFilter;
+ peg$c32 = "~b",
+ peg$c33 = { type: "literal", value: "~b", description: "\"~b\"" },
+ peg$c34 = function peg$c34(s) {
+ return body(s);
},
- peg$c35 = "true",
- peg$c36 = { type: "literal", value: "true", description: "\"true\"" },
- peg$c37 = function peg$c37() {
- return trueFilter;
+ peg$c35 = "~bq",
+ peg$c36 = { type: "literal", value: "~bq", description: "\"~bq\"" },
+ peg$c37 = function peg$c37(s) {
+ return requestBody(s);
},
- peg$c38 = "false",
- peg$c39 = { type: "literal", value: "false", description: "\"false\"" },
- peg$c40 = function peg$c40() {
- return falseFilter;
+ peg$c38 = "~bs",
+ peg$c39 = { type: "literal", value: "~bs", description: "\"~bs\"" },
+ peg$c40 = function peg$c40(s) {
+ return responseBody(s);
},
peg$c41 = "~c",
peg$c42 = { type: "literal", value: "~c", description: "\"~c\"" },
@@ -6460,87 +6456,127 @@ module.exports = function () {
peg$c46 = function peg$c46(s) {
return domain(s);
},
- peg$c47 = "~h",
- peg$c48 = { type: "literal", value: "~h", description: "\"~h\"" },
+ peg$c47 = "~dst",
+ peg$c48 = { type: "literal", value: "~dst", description: "\"~dst\"" },
peg$c49 = function peg$c49(s) {
+ return destination(s);
+ },
+ peg$c50 = "~e",
+ peg$c51 = { type: "literal", value: "~e", description: "\"~e\"" },
+ peg$c52 = function peg$c52() {
+ return errorFilter;
+ },
+ peg$c53 = "~h",
+ peg$c54 = { type: "literal", value: "~h", description: "\"~h\"" },
+ peg$c55 = function peg$c55(s) {
return header(s);
},
- peg$c50 = "~hq",
- peg$c51 = { type: "literal", value: "~hq", description: "\"~hq\"" },
- peg$c52 = function peg$c52(s) {
+ peg$c56 = "~hq",
+ peg$c57 = { type: "literal", value: "~hq", description: "\"~hq\"" },
+ peg$c58 = function peg$c58(s) {
return requestHeader(s);
},
- peg$c53 = "~hs",
- peg$c54 = { type: "literal", value: "~hs", description: "\"~hs\"" },
- peg$c55 = function peg$c55(s) {
+ peg$c59 = "~hs",
+ peg$c60 = { type: "literal", value: "~hs", description: "\"~hs\"" },
+ peg$c61 = function peg$c61(s) {
return responseHeader(s);
},
- peg$c56 = "~m",
- peg$c57 = { type: "literal", value: "~m", description: "\"~m\"" },
- peg$c58 = function peg$c58(s) {
+ peg$c62 = "~http",
+ peg$c63 = { type: "literal", value: "~http", description: "\"~http\"" },
+ peg$c64 = function peg$c64() {
+ return httpFilter;
+ },
+ peg$c65 = "~m",
+ peg$c66 = { type: "literal", value: "~m", description: "\"~m\"" },
+ peg$c67 = function peg$c67(s) {
return method(s);
},
- peg$c59 = "~t",
- peg$c60 = { type: "literal", value: "~t", description: "\"~t\"" },
- peg$c61 = function peg$c61(s) {
+ peg$c68 = "~marked",
+ peg$c69 = { type: "literal", value: "~marked", description: "\"~marked\"" },
+ peg$c70 = function peg$c70() {
+ return markedFilter;
+ },
+ peg$c71 = "~q",
+ peg$c72 = { type: "literal", value: "~q", description: "\"~q\"" },
+ peg$c73 = function peg$c73() {
+ return noResponseFilter;
+ },
+ peg$c74 = "~src",
+ peg$c75 = { type: "literal", value: "~src", description: "\"~src\"" },
+ peg$c76 = function peg$c76(s) {
+ return source(s);
+ },
+ peg$c77 = "~s",
+ peg$c78 = { type: "literal", value: "~s", description: "\"~s\"" },
+ peg$c79 = function peg$c79() {
+ return responseFilter;
+ },
+ peg$c80 = "~t",
+ peg$c81 = { type: "literal", value: "~t", description: "\"~t\"" },
+ peg$c82 = function peg$c82(s) {
return contentType(s);
},
- peg$c62 = "~tq",
- peg$c63 = { type: "literal", value: "~tq", description: "\"~tq\"" },
- peg$c64 = function peg$c64(s) {
+ peg$c83 = "~tcp",
+ peg$c84 = { type: "literal", value: "~tcp", description: "\"~tcp\"" },
+ peg$c85 = function peg$c85() {
+ return tcpFilter;
+ },
+ peg$c86 = "~tq",
+ peg$c87 = { type: "literal", value: "~tq", description: "\"~tq\"" },
+ peg$c88 = function peg$c88(s) {
return requestContentType(s);
},
- peg$c65 = "~ts",
- peg$c66 = { type: "literal", value: "~ts", description: "\"~ts\"" },
- peg$c67 = function peg$c67(s) {
+ peg$c89 = "~ts",
+ peg$c90 = { type: "literal", value: "~ts", description: "\"~ts\"" },
+ peg$c91 = function peg$c91(s) {
return responseContentType(s);
},
- peg$c68 = "~u",
- peg$c69 = { type: "literal", value: "~u", description: "\"~u\"" },
- peg$c70 = function peg$c70(s) {
+ peg$c92 = "~u",
+ peg$c93 = { type: "literal", value: "~u", description: "\"~u\"" },
+ peg$c94 = function peg$c94(s) {
return url(s);
},
- peg$c71 = { type: "other", description: "integer" },
- peg$c72 = /^['"]/,
- peg$c73 = { type: "class", value: "['\"]", description: "['\"]" },
- peg$c74 = /^[0-9]/,
- peg$c75 = { type: "class", value: "[0-9]", description: "[0-9]" },
- peg$c76 = function peg$c76(digits) {
+ peg$c95 = { type: "other", description: "integer" },
+ peg$c96 = /^['"]/,
+ peg$c97 = { type: "class", value: "['\"]", description: "['\"]" },
+ peg$c98 = /^[0-9]/,
+ peg$c99 = { type: "class", value: "[0-9]", description: "[0-9]" },
+ peg$c100 = function peg$c100(digits) {
return parseInt(digits.join(""), 10);
},
- peg$c77 = { type: "other", description: "string" },
- peg$c78 = "\"",
- peg$c79 = { type: "literal", value: "\"", description: "\"\\\"\"" },
- peg$c80 = function peg$c80(chars) {
+ peg$c101 = { type: "other", description: "string" },
+ peg$c102 = "\"",
+ peg$c103 = { type: "literal", value: "\"", description: "\"\\\"\"" },
+ peg$c104 = function peg$c104(chars) {
return chars.join("");
},
- peg$c81 = "'",
- peg$c82 = { type: "literal", value: "'", description: "\"'\"" },
- peg$c83 = /^["\\]/,
- peg$c84 = { type: "class", value: "[\"\\\\]", description: "[\"\\\\]" },
- peg$c85 = { type: "any", description: "any character" },
- peg$c86 = function peg$c86(char) {
+ peg$c105 = "'",
+ peg$c106 = { type: "literal", value: "'", description: "\"'\"" },
+ peg$c107 = /^["\\]/,
+ peg$c108 = { type: "class", value: "[\"\\\\]", description: "[\"\\\\]" },
+ peg$c109 = { type: "any", description: "any character" },
+ peg$c110 = function peg$c110(char) {
return char;
},
- peg$c87 = "\\",
- peg$c88 = { type: "literal", value: "\\", description: "\"\\\\\"" },
- peg$c89 = /^['\\]/,
- peg$c90 = { type: "class", value: "['\\\\]", description: "['\\\\]" },
- peg$c91 = /^['"\\]/,
- peg$c92 = { type: "class", value: "['\"\\\\]", description: "['\"\\\\]" },
- peg$c93 = "n",
- peg$c94 = { type: "literal", value: "n", description: "\"n\"" },
- peg$c95 = function peg$c95() {
+ peg$c111 = "\\",
+ peg$c112 = { type: "literal", value: "\\", description: "\"\\\\\"" },
+ peg$c113 = /^['\\]/,
+ peg$c114 = { type: "class", value: "['\\\\]", description: "['\\\\]" },
+ peg$c115 = /^['"\\]/,
+ peg$c116 = { type: "class", value: "['\"\\\\]", description: "['\"\\\\]" },
+ peg$c117 = "n",
+ peg$c118 = { type: "literal", value: "n", description: "\"n\"" },
+ peg$c119 = function peg$c119() {
return "\n";
},
- peg$c96 = "r",
- peg$c97 = { type: "literal", value: "r", description: "\"r\"" },
- peg$c98 = function peg$c98() {
+ peg$c120 = "r",
+ peg$c121 = { type: "literal", value: "r", description: "\"r\"" },
+ peg$c122 = function peg$c122() {
return "\r";
},
- peg$c99 = "t",
- peg$c100 = { type: "literal", value: "t", description: "\"t\"" },
- peg$c101 = function peg$c101() {
+ peg$c123 = "t",
+ peg$c124 = { type: "literal", value: "t", description: "\"t\"" },
+ peg$c125 = function peg$c125() {
return "\t";
},
peg$currPos = 0,
@@ -7058,262 +7094,64 @@ module.exports = function () {
}
function peg$parseExpr() {
- var s0;
-
- s0 = peg$parseNullaryExpr();
- if (s0 === peg$FAILED) {
- s0 = peg$parseUnaryExpr();
- }
-
- return s0;
- }
-
- function peg$parseNullaryExpr() {
- var s0, s1;
-
- s0 = peg$parseBooleanLiteral();
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c23) {
- s1 = peg$c23;
- peg$currPos += 2;
- } else {
- s1 = peg$FAILED;
- if (peg$silentFails === 0) {
- peg$fail(peg$c24);
- }
- }
- if (s1 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c25();
- }
- s0 = s1;
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c26) {
- s1 = peg$c26;
- peg$currPos += 2;
- } else {
- s1 = peg$FAILED;
- if (peg$silentFails === 0) {
- peg$fail(peg$c27);
- }
- }
- if (s1 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c28();
- }
- s0 = s1;
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c29) {
- s1 = peg$c29;
- peg$currPos += 2;
- } else {
- s1 = peg$FAILED;
- if (peg$silentFails === 0) {
- peg$fail(peg$c30);
- }
- }
- if (s1 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c31();
- }
- s0 = s1;
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c32) {
- s1 = peg$c32;
- peg$currPos += 2;
- } else {
- s1 = peg$FAILED;
- if (peg$silentFails === 0) {
- peg$fail(peg$c33);
- }
- }
- if (s1 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c34();
- }
- s0 = s1;
- }
- }
- }
- }
-
- return s0;
- }
-
- function peg$parseBooleanLiteral() {
- var s0, s1;
+ var s0, s1, s2, s3;
s0 = peg$currPos;
- if (input.substr(peg$currPos, 4) === peg$c35) {
- s1 = peg$c35;
+ if (input.substr(peg$currPos, 4) === peg$c23) {
+ s1 = peg$c23;
peg$currPos += 4;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c36);
+ peg$fail(peg$c24);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c37();
+ s1 = peg$c25();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 5) === peg$c38) {
- s1 = peg$c38;
+ if (input.substr(peg$currPos, 5) === peg$c26) {
+ s1 = peg$c26;
peg$currPos += 5;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c39);
+ peg$fail(peg$c27);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c40();
+ s1 = peg$c28();
}
s0 = s1;
- }
-
- return s0;
- }
-
- function peg$parseUnaryExpr() {
- var s0, s1, s2, s3;
-
- s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c41) {
- s1 = peg$c41;
- peg$currPos += 2;
- } else {
- s1 = peg$FAILED;
- if (peg$silentFails === 0) {
- peg$fail(peg$c42);
- }
- }
- if (s1 !== peg$FAILED) {
- s2 = [];
- s3 = peg$parsews();
- if (s3 !== peg$FAILED) {
- while (s3 !== peg$FAILED) {
- s2.push(s3);
- s3 = peg$parsews();
- }
- } else {
- s2 = peg$FAILED;
- }
- if (s2 !== peg$FAILED) {
- s3 = peg$parseIntegerLiteral();
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c43(s3);
- s0 = s1;
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c44) {
- s1 = peg$c44;
- peg$currPos += 2;
- } else {
- s1 = peg$FAILED;
- if (peg$silentFails === 0) {
- peg$fail(peg$c45);
- }
- }
- if (s1 !== peg$FAILED) {
- s2 = [];
- s3 = peg$parsews();
- if (s3 !== peg$FAILED) {
- while (s3 !== peg$FAILED) {
- s2.push(s3);
- s3 = peg$parsews();
- }
- } else {
- s2 = peg$FAILED;
- }
- if (s2 !== peg$FAILED) {
- s3 = peg$parseStringLiteral();
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c46(s3);
- s0 = s1;
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c47) {
- s1 = peg$c47;
+ if (input.substr(peg$currPos, 2) === peg$c29) {
+ s1 = peg$c29;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c48);
+ peg$fail(peg$c30);
}
}
if (s1 !== peg$FAILED) {
- s2 = [];
- s3 = peg$parsews();
- if (s3 !== peg$FAILED) {
- while (s3 !== peg$FAILED) {
- s2.push(s3);
- s3 = peg$parsews();
- }
- } else {
- s2 = peg$FAILED;
- }
- if (s2 !== peg$FAILED) {
- s3 = peg$parseStringLiteral();
- if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c49(s3);
- s0 = s1;
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
+ peg$savedPos = s0;
+ s1 = peg$c31();
}
+ s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 3) === peg$c50) {
- s1 = peg$c50;
- peg$currPos += 3;
+ if (input.substr(peg$currPos, 2) === peg$c32) {
+ s1 = peg$c32;
+ peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c51);
+ peg$fail(peg$c33);
}
}
if (s1 !== peg$FAILED) {
@@ -7331,7 +7169,7 @@ module.exports = function () {
s3 = peg$parseStringLiteral();
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c52(s3);
+ s1 = peg$c34(s3);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7347,13 +7185,13 @@ module.exports = function () {
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 3) === peg$c53) {
- s1 = peg$c53;
+ if (input.substr(peg$currPos, 3) === peg$c35) {
+ s1 = peg$c35;
peg$currPos += 3;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c54);
+ peg$fail(peg$c36);
}
}
if (s1 !== peg$FAILED) {
@@ -7371,7 +7209,7 @@ module.exports = function () {
s3 = peg$parseStringLiteral();
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c55(s3);
+ s1 = peg$c37(s3);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7387,13 +7225,13 @@ module.exports = function () {
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c56) {
- s1 = peg$c56;
- peg$currPos += 2;
+ if (input.substr(peg$currPos, 3) === peg$c38) {
+ s1 = peg$c38;
+ peg$currPos += 3;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c57);
+ peg$fail(peg$c39);
}
}
if (s1 !== peg$FAILED) {
@@ -7411,7 +7249,7 @@ module.exports = function () {
s3 = peg$parseStringLiteral();
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c58(s3);
+ s1 = peg$c40(s3);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7427,13 +7265,13 @@ module.exports = function () {
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c59) {
- s1 = peg$c59;
+ if (input.substr(peg$currPos, 2) === peg$c41) {
+ s1 = peg$c41;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c60);
+ peg$fail(peg$c42);
}
}
if (s1 !== peg$FAILED) {
@@ -7448,10 +7286,10 @@ module.exports = function () {
s2 = peg$FAILED;
}
if (s2 !== peg$FAILED) {
- s3 = peg$parseStringLiteral();
+ s3 = peg$parseIntegerLiteral();
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c61(s3);
+ s1 = peg$c43(s3);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7467,13 +7305,13 @@ module.exports = function () {
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 3) === peg$c62) {
- s1 = peg$c62;
- peg$currPos += 3;
+ if (input.substr(peg$currPos, 2) === peg$c44) {
+ s1 = peg$c44;
+ peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c63);
+ peg$fail(peg$c45);
}
}
if (s1 !== peg$FAILED) {
@@ -7491,7 +7329,7 @@ module.exports = function () {
s3 = peg$parseStringLiteral();
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c64(s3);
+ s1 = peg$c46(s3);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7507,13 +7345,13 @@ module.exports = function () {
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 3) === peg$c65) {
- s1 = peg$c65;
- peg$currPos += 3;
+ if (input.substr(peg$currPos, 4) === peg$c47) {
+ s1 = peg$c47;
+ peg$currPos += 4;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c66);
+ peg$fail(peg$c48);
}
}
if (s1 !== peg$FAILED) {
@@ -7531,7 +7369,7 @@ module.exports = function () {
s3 = peg$parseStringLiteral();
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c67(s3);
+ s1 = peg$c49(s3);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7547,32 +7385,52 @@ module.exports = function () {
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
- if (input.substr(peg$currPos, 2) === peg$c68) {
- s1 = peg$c68;
+ if (input.substr(peg$currPos, 2) === peg$c50) {
+ s1 = peg$c50;
peg$currPos += 2;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c69);
+ peg$fail(peg$c51);
}
}
if (s1 !== peg$FAILED) {
- s2 = [];
- s3 = peg$parsews();
- if (s3 !== peg$FAILED) {
- while (s3 !== peg$FAILED) {
- s2.push(s3);
- s3 = peg$parsews();
- }
+ peg$savedPos = s0;
+ s1 = peg$c52();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c53) {
+ s1 = peg$c53;
+ peg$currPos += 2;
} else {
- s2 = peg$FAILED;
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c54);
+ }
}
- if (s2 !== peg$FAILED) {
- s3 = peg$parseStringLiteral();
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
if (s3 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c70(s3);
- s0 = s1;
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c55(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
} else {
peg$currPos = s0;
s0 = peg$FAILED;
@@ -7581,18 +7439,428 @@ module.exports = function () {
peg$currPos = s0;
s0 = peg$FAILED;
}
- } else {
- peg$currPos = s0;
- s0 = peg$FAILED;
- }
- if (s0 === peg$FAILED) {
- s0 = peg$currPos;
- s1 = peg$parseStringLiteral();
- if (s1 !== peg$FAILED) {
- peg$savedPos = s0;
- s1 = peg$c70(s1);
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 3) === peg$c56) {
+ s1 = peg$c56;
+ peg$currPos += 3;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c57);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c58(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 3) === peg$c59) {
+ s1 = peg$c59;
+ peg$currPos += 3;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c60);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c61(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 5) === peg$c62) {
+ s1 = peg$c62;
+ peg$currPos += 5;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c63);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c64();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c65) {
+ s1 = peg$c65;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c66);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c67(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 7) === peg$c68) {
+ s1 = peg$c68;
+ peg$currPos += 7;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c69);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c70();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c71) {
+ s1 = peg$c71;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c72);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c73();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 4) === peg$c74) {
+ s1 = peg$c74;
+ peg$currPos += 4;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c75);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c76(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c77) {
+ s1 = peg$c77;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c78);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c79();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c80) {
+ s1 = peg$c80;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c81);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c82(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 4) === peg$c83) {
+ s1 = peg$c83;
+ peg$currPos += 4;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c84);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c85();
+ }
+ s0 = s1;
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 3) === peg$c86) {
+ s1 = peg$c86;
+ peg$currPos += 3;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c87);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c88(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 3) === peg$c89) {
+ s1 = peg$c89;
+ peg$currPos += 3;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c90);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c91(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ if (input.substr(peg$currPos, 2) === peg$c92) {
+ s1 = peg$c92;
+ peg$currPos += 2;
+ } else {
+ s1 = peg$FAILED;
+ if (peg$silentFails === 0) {
+ peg$fail(peg$c93);
+ }
+ }
+ if (s1 !== peg$FAILED) {
+ s2 = [];
+ s3 = peg$parsews();
+ if (s3 !== peg$FAILED) {
+ while (s3 !== peg$FAILED) {
+ s2.push(s3);
+ s3 = peg$parsews();
+ }
+ } else {
+ s2 = peg$FAILED;
+ }
+ if (s2 !== peg$FAILED) {
+ s3 = peg$parseStringLiteral();
+ if (s3 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c94(s3);
+ s0 = s1;
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ } else {
+ peg$currPos = s0;
+ s0 = peg$FAILED;
+ }
+ if (s0 === peg$FAILED) {
+ s0 = peg$currPos;
+ s1 = peg$parseStringLiteral();
+ if (s1 !== peg$FAILED) {
+ peg$savedPos = s0;
+ s1 = peg$c94(s1);
+ }
+ s0 = s1;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
- s0 = s1;
}
}
}
@@ -7612,13 +7880,13 @@ module.exports = function () {
peg$silentFails++;
s0 = peg$currPos;
- if (peg$c72.test(input.charAt(peg$currPos))) {
+ if (peg$c96.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c73);
+ peg$fail(peg$c97);
}
}
if (s1 === peg$FAILED) {
@@ -7626,25 +7894,25 @@ module.exports = function () {
}
if (s1 !== peg$FAILED) {
s2 = [];
- if (peg$c74.test(input.charAt(peg$currPos))) {
+ if (peg$c98.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c75);
+ peg$fail(peg$c99);
}
}
if (s3 !== peg$FAILED) {
while (s3 !== peg$FAILED) {
s2.push(s3);
- if (peg$c74.test(input.charAt(peg$currPos))) {
+ if (peg$c98.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c75);
+ peg$fail(peg$c99);
}
}
}
@@ -7652,13 +7920,13 @@ module.exports = function () {
s2 = peg$FAILED;
}
if (s2 !== peg$FAILED) {
- if (peg$c72.test(input.charAt(peg$currPos))) {
+ if (peg$c96.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c73);
+ peg$fail(peg$c97);
}
}
if (s3 === peg$FAILED) {
@@ -7666,7 +7934,7 @@ module.exports = function () {
}
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c76(s2);
+ s1 = peg$c100(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7684,7 +7952,7 @@ module.exports = function () {
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c71);
+ peg$fail(peg$c95);
}
}
@@ -7697,12 +7965,12 @@ module.exports = function () {
peg$silentFails++;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 34) {
- s1 = peg$c78;
+ s1 = peg$c102;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c79);
+ peg$fail(peg$c103);
}
}
if (s1 !== peg$FAILED) {
@@ -7714,17 +7982,17 @@ module.exports = function () {
}
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 34) {
- s3 = peg$c78;
+ s3 = peg$c102;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c79);
+ peg$fail(peg$c103);
}
}
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c80(s2);
+ s1 = peg$c104(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7741,12 +8009,12 @@ module.exports = function () {
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 39) {
- s1 = peg$c81;
+ s1 = peg$c105;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c82);
+ peg$fail(peg$c106);
}
}
if (s1 !== peg$FAILED) {
@@ -7758,17 +8026,17 @@ module.exports = function () {
}
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 39) {
- s3 = peg$c81;
+ s3 = peg$c105;
peg$currPos++;
} else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c82);
+ peg$fail(peg$c106);
}
}
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c80(s2);
+ s1 = peg$c104(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7807,7 +8075,7 @@ module.exports = function () {
}
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c80(s2);
+ s1 = peg$c104(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7823,7 +8091,7 @@ module.exports = function () {
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c77);
+ peg$fail(peg$c101);
}
}
@@ -7836,13 +8104,13 @@ module.exports = function () {
s0 = peg$currPos;
s1 = peg$currPos;
peg$silentFails++;
- if (peg$c83.test(input.charAt(peg$currPos))) {
+ if (peg$c107.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c84);
+ peg$fail(peg$c108);
}
}
peg$silentFails--;
@@ -7859,12 +8127,12 @@ module.exports = function () {
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c85);
+ peg$fail(peg$c109);
}
}
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c86(s2);
+ s1 = peg$c110(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7877,19 +8145,19 @@ module.exports = function () {
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 92) {
- s1 = peg$c87;
+ s1 = peg$c111;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c88);
+ peg$fail(peg$c112);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parseEscapeSequence();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c86(s2);
+ s1 = peg$c110(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7910,13 +8178,13 @@ module.exports = function () {
s0 = peg$currPos;
s1 = peg$currPos;
peg$silentFails++;
- if (peg$c89.test(input.charAt(peg$currPos))) {
+ if (peg$c113.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c90);
+ peg$fail(peg$c114);
}
}
peg$silentFails--;
@@ -7933,12 +8201,12 @@ module.exports = function () {
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c85);
+ peg$fail(peg$c109);
}
}
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c86(s2);
+ s1 = peg$c110(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7951,19 +8219,19 @@ module.exports = function () {
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 92) {
- s1 = peg$c87;
+ s1 = peg$c111;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c88);
+ peg$fail(peg$c112);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parseEscapeSequence();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c86(s2);
+ s1 = peg$c110(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -7999,12 +8267,12 @@ module.exports = function () {
} else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c85);
+ peg$fail(peg$c109);
}
}
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c86(s2);
+ s1 = peg$c110(s2);
s0 = s1;
} else {
peg$currPos = s0;
@@ -8021,61 +8289,61 @@ module.exports = function () {
function peg$parseEscapeSequence() {
var s0, s1;
- if (peg$c91.test(input.charAt(peg$currPos))) {
+ if (peg$c115.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
} else {
s0 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c92);
+ peg$fail(peg$c116);
}
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 110) {
- s1 = peg$c93;
+ s1 = peg$c117;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c94);
+ peg$fail(peg$c118);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c95();
+ s1 = peg$c119();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 114) {
- s1 = peg$c96;
+ s1 = peg$c120;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c97);
+ peg$fail(peg$c121);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c98();
+ s1 = peg$c122();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 116) {
- s1 = peg$c99;
+ s1 = peg$c123;
peg$currPos++;
} else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
- peg$fail(peg$c100);
+ peg$fail(peg$c124);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
- s1 = peg$c101();
+ s1 = peg$c125();
}
s0 = s1;
}
@@ -8146,6 +8414,30 @@ module.exports = function () {
responseCodeFilter.desc = "resp. code is " + code;
return responseCodeFilter;
}
+ function body(regex) {
+ regex = new RegExp(regex, "i");
+ function bodyFilter(flow) {
+ return True;
+ }
+ bodyFilter.desc = "body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10";
+ return bodyFilter;
+ }
+ function requestBody(regex) {
+ regex = new RegExp(regex, "i");
+ function requestBodyFilter(flow) {
+ return True;
+ }
+ requestBodyFilter.desc = "body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10";
+ return requestBodyFilter;
+ }
+ function responseBody(regex) {
+ regex = new RegExp(regex, "i");
+ function responseBodyFilter(flow) {
+ return True;
+ }
+ responseBodyFilter.desc = "body filters are not implemented yet, see https://github.com/mitmproxy/mitmweb/issues/10";
+ return responseBodyFilter;
+ }
function domain(regex) {
regex = new RegExp(regex, "i");
function domainFilter(flow) {
@@ -8154,6 +8446,14 @@ module.exports = function () {
domainFilter.desc = "domain matches " + regex;
return domainFilter;
}
+ function destination(regex) {
+ regex = new RegExp(regex, "i");
+ function destinationFilter(flow) {
+ return !!flow.server_conn.address && regex.test(flow.server_conn.address.address[0] + ":" + flow.server_conn.address.address[1]);
+ }
+ destinationFilter.desc = "destination address matches " + regex;
+ return destinationFilter;
+ }
function errorFilter(flow) {
return !!flow.error;
}
@@ -8182,6 +8482,10 @@ module.exports = function () {
responseHeaderFilter.desc = "resp. header matches " + regex;
return responseHeaderFilter;
}
+ function httpFilter(flow) {
+ return flow.type === "http";
+ }
+ httpFilter.desc = "is an HTTP Flow";
function method(regex) {
regex = new RegExp(regex, "i");
function methodFilter(flow) {
@@ -8190,6 +8494,10 @@ module.exports = function () {
methodFilter.desc = "method matches " + regex;
return methodFilter;
}
+ function markedFilter(flow) {
+ return flow.marked;
+ }
+ markedFilter.desc = "is marked";
function noResponseFilter(flow) {
return flow.request && !flow.response;
}
@@ -8198,7 +8506,14 @@ module.exports = function () {
return !!flow.response;
}
responseFilter.desc = "has response";
-
+ function source(regex) {
+ regex = new RegExp(regex, "i");
+ function sourceFilter(flow) {
+ return !!flow.client_conn.address && regex.test(flow.client_conn.address.address[0] + ":" + flow.client_conn.address.address[1]);
+ }
+ sourceFilter.desc = "source address matches " + regex;
+ return sourceFilter;
+ }
function contentType(regex) {
regex = new RegExp(regex, "i");
function contentTypeFilter(flow) {
@@ -8207,6 +8522,10 @@ module.exports = function () {
contentTypeFilter.desc = "content type matches " + regex;
return contentTypeFilter;
}
+ function tcpFilter(flow) {
+ return flow.type === "tcp";
+ }
+ tcpFilter.desc = "is a TCP Flow";
function requestContentType(regex) {
regex = new RegExp(regex, "i");
function requestContentTypeFilter(flow) {
diff --git a/web/src/js/components/Footer.jsx b/web/src/js/components/Footer.jsx
index fd4d4479..58dd0dcb 100644
--- a/web/src/js/components/Footer.jsx
+++ b/web/src/js/components/Footer.jsx
@@ -49,10 +49,10 @@ function Footer({ settings }) {
)}
<div className="pull-right">
<span className="label label-primary" title="HTTP Proxy Server Address">
- [{listen_host || "*"}:{listen_port}]
+ {listen_host || "*"}:{listen_port}
</span>
- <span className="label label-info" title="Version">
- [version:{version}]
+ <span className="label label-info" title="Mitmproxy Version">
+ v{version}
</span>
</div>
</footer>