Commit Graph

673 Commits

Author SHA1 Message Date
Maximilian Hils
41ebb24414 update mitmweb assets 2022-03-19 17:20:32 +01:00
Maximilian Hils
a0e04a7833 web: display WS/WSS as method 2022-03-19 14:44:02 +01:00
Maximilian Hils
628d6201ae web: fix ~websocket filter 2022-03-19 14:37:06 +01:00
Maximilian Hils
148429c0b3
lowercase user-added HTTP/2 headers, fix #4746 (#5186) 2022-03-16 10:59:30 +01:00
ian klatzco
1abb8f6921
add keyboard shortcut n to mitmweb (by using runCommand inside the kb shortcut handler) (#5061)
* add keyboard shortcut n to mitmweb (by creating /flows/create route)

* add keyboard shortcut n to mitmweb (simplified, by using runCommand instead of a new route)
2022-01-16 15:34:07 +01:00
ian klatzco
33e58e2c2b
Clarify web frontend docs (#5055) 2022-01-14 13:00:47 +01:00
Shubhangi Choudhary
9b75f52073
migrated the files to tsx (#4972)
* migrated the files to tsx

* reverted unecessary changes

* reverted unecessary changes to app.css

* fixed the fails

* fixed the fails
2021-12-21 13:05:55 +00:00
Marius
1c93a93696
Add font types to asset filter (~a) (#4928)
* Add font types to asset filter (~a)

* Add PR number to changelog

* remove flash mention

* restore asset test

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-11-21 15:47:09 +01:00
Maximilian Hils
0ad4a5983e web: update timestamp column style, fix #4092 2021-10-18 15:12:35 +02:00
mame82
480052f58b
Grpc contentview (#4851)
* Partial gRPC contentview prototype, not linted, no tests, not as add-on

* Linted (flake8)

* Save dev state

* Rewrote of protobuf parser, use decoding strategy, reduced rendered data. Parser uses  generators

* minor cleanup

* fix: preferred encoding was provided as function instead of value

* flake8: line length

* Backlinked message tree objects, temporary debug out

* Partial implementation of gRPC definitions. Save state to fix a cras (data invalidate in edit mode)

* hack: deal with missing exception handling for generator based content views

* gRPC/Protoparser descriptions (with test code)

* replaced manual gzip decoding with mitmproxy.net.encoding.decode

* Refactored typing imports

* Reafctoring

* distinguish request vs response definitions, separate view config from parser config

* Code cleaning, moved customized protobuf definitions to example addon

* final cleanup

* changelog

* Stubs for tests

* Fixed render_riority of addon example

* Started adding tests

* Work on tests

* mypy

* Added pseudo encoder to tests, to cover special decodings

* Example addon test added

* finalized tests, no 100 percent coverage possible, see comments un uncovered code

* minor adjustments

* fixup tests

* Typos

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-10-12 13:32:56 +02:00
Maximilian Hils
aad92c9d5a
Merge pull request #4847 from mhils/flowfilter
Flowfilter Improvements
2021-10-09 18:38:56 +02:00
Vinh Quang Tran
0b48fdfc29
Prevent connection lost in mitmweb when pressing Download button. (#4849) 2021-10-09 18:32:07 +02:00
Maximilian Hils
25bdf2f9d8 web: update filters 2021-10-08 18:39:22 +02:00
Maximilian Hils
c2d8674a7b web: minor fixes 2021-10-08 18:39:22 +02:00
Maximilian Hils
c43a2ef8dc improve flowfilter api: raise on invalid input, add ~all 2021-10-08 17:45:47 +02:00
Maximilian Hils
adfccb90a5 minor fixes 2021-10-08 17:36:16 +02:00
Matthew Hughes
d9cac6fbcd
Make Cert.not{before,after} timezone aware (#4805)
I noticed when running tests the output of
`web/src/js/__tests__/ducks/_tflow.ts` would change depending on how I
set my timezone, e.g.

    $ TZ=America/Los_Angeles pytest --quiet \
        test/mitmproxy/tools/web/test_app.py >/dev/null \
        && grep --extended-regexp 'not(after|before)' web/src/js/__tests__/ducks/_tflow.ts
                "notafter": 2235132207,
                "notbefore": 1604415807,
    $ TZ=Asia/Tokyo pytest --quiet \
        test/mitmproxy/tools/web/test_app.py >/dev/null \
        && grep --extended-regexp 'not(after|before)'  web/src/js/__tests__/ducks/_tflow.ts
                "notafter": 2235074607,
                "notbefore": 1604354607

It looks like this is because the `cert_to_json` function simply calls
`timestamp` the `datetime` object from
`x509.Certificate.not_valid_before`, however, this `datetime` object is
not timestamp aware, from the docs [1]:

> A naïve datetime representing the beginning of the validity period for
the certificate in UTC

So when serializing to JSON, first convert the `datetime` to UTC then
call `timestamp`.

A test was added by inspecting one of the test certs with:

    $ openssl x509 -in test/mitmproxy/net/data/text_cert_2 -text

Extracting the date and asserting on that.

The corresponding test has also been re-run so that `_tflow.ts` was
regenerated with it's correct value. Snapshots were also updated via:

    $(npm bin)/jest --updateSnapshot

[1] https://cryptography.io/en/latest/x509/reference/#cryptography.x509.Certificate.not_valid_after
2021-09-16 10:53:36 +02:00
Maximilian Hils
0437d2935e make flake8 happy 2021-09-04 00:23:45 +02:00
Maximilian Hils
c0fd6cfc09
Merge pull request #4779 from mhils/mitmweb-tcp
web: add support for viewing tcp flows
2021-08-25 13:35:37 +02:00
Maximilian Hils
89beb31c8e web: make icon column sortable 2021-08-23 18:59:38 +02:00
Maximilian Hils
e483aa544f force less variable calculation 2021-08-23 14:58:56 +02:00
Maximilian Hils
d55aa7ea42 tests++ 2021-08-23 11:48:27 +02:00
Maximilian Hils
3589ec2f58 web: convert everything to TypeScript 2021-08-23 11:01:43 +02:00
Maximilian Hils
c5e3e3d636 web: add backend tests 2021-08-23 09:35:47 +02:00
Maximilian Hils
1f6015d72a web: update dependencies 2021-08-20 18:47:34 +02:00
Maximilian Hils
46cd40f493 web: test coverage++, adjust commandbar 2021-08-20 18:38:22 +02:00
Maximilian Hils
2945ba925b please the coverage gods 2021-08-20 15:10:14 +02:00
Maximilian Hils
3ad4949c0e fix web tests 2021-08-19 19:15:51 +02:00
Maximilian Hils
65aa0a6ef5 major mitmweb upgrades 2021-08-18 17:38:22 +02:00
Maximilian Hils
94172594b3 [web] update fontawesome 2021-08-12 10:16:43 +02:00
zokutyou2@gmail.com
4f5c615818 applied requested changes 2021-07-21 16:53:52 +09:00
zokutyou2@gmail.com
29997bca4b convert components in FlowView, Header, Modal, ValueEditor into typescript 2021-07-19 15:47:30 +09:00
zokutyou2@gmail.com
e0b8a48392 bind "this" to functions in CodeMirror 2021-07-18 16:29:16 +09:00
zokutyou2@gmail.com
5dd2ae7937 make formatTimeStamp function return UTC time when updating snapshot in jest 2021-07-17 16:23:13 +09:00
zokutyou2@gmail.com
ac66678b4d fix bug of not dispatching when type in the field in FilterInput component 2021-07-17 15:59:56 +09:00
zokutyou2@gmail.com
6def195743 convert components in common and ContentView folder into typescript, and modified test 2021-07-17 12:29:11 +09:00
zokutyou2@gmail.com
7ff97d6e08 change CommandBar component into typescript, autoscroll overflowed result to bottom 2021-07-15 22:19:46 +09:00
zokutyou2@gmail.com
4ab49c5239 fix bug related to tab completion 2021-07-15 19:56:49 +09:00
zokutyou2@gmail.com
689fde87a2 move available commands popover to command help 2021-07-15 19:30:21 +09:00
zokutyou2@gmail.com
eec3c35cb1 change command history into mitmproxy's one 2021-07-14 22:03:49 +09:00
zokutyou2@gmail.com
79f4cdd25c display help, description and add tab autocompletion 2021-07-14 21:35:44 +09:00
zokutyou2@gmail.com
9513a6d12c update obsolete snapshot 2021-07-13 22:16:10 +09:00
zokutyou2@gmail.com
91772456df update test 2021-07-13 22:13:07 +09:00
zokutyou2@gmail.com
f0b88833c2 add response to fetchMock 2021-07-13 21:54:55 +09:00
zokutyou2@gmail.com
6670dc0666 include package-lock.json 2021-07-13 21:48:22 +09:00
zokutyou2@gmail.com
a689cbe0b0 fix lintings issue and test 2021-07-13 21:43:28 +09:00
zokutyou2@gmail.com
fc7455b914 transfer the argument suggestion into popup, show available commands, highlight currently typing argument 2021-07-13 20:02:31 +09:00
zokutyou2@gmail.com
5b229c2dcd fix optionsSpec.js 2021-06-26 10:17:58 +09:00
zokutyou2@gmail.com
b9254379a2 include command.js to commit 2021-06-26 09:44:30 +09:00
zokutyou2@gmail.com
22e5989783 fix web test failure 2021-06-26 09:41:19 +09:00