Commit Graph

9663 Commits

Author SHA1 Message Date
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
Maximilian Hils
efd2980b8a catch OpenSSL SysCallError, refs #4985 2021-12-20 22:23:23 +01:00
Maximilian Hils
96f77453cc
fix change_upstream_proxy.py example, fix #4981 (#5007) 2021-12-20 21:10:06 +00:00
Maximilian Hils
c74806feac
fix tests 2021-12-20 21:06:14 +01:00
Maximilian Hils
ca646ebd40
fix #4957 2021-12-20 20:36:40 +01:00
James Yale
ace07e7e3c
Example specified incorrect header (#4997)
* Example specified incorrect header

* Add CHANGELOG entry reference the documentation update

* fixup! Add CHANGELOG entry reference the documentation update
2021-12-20 20:18:00 +01:00
Maximilian Hils
6997129bc0
make sure that running() is only invoked once on startup. (#4964)
fix #3584
2021-11-27 13:11:23 +00:00
Maximilian Hils
3a2c87432c
[requires.io] dependency update (#4961)
Co-authored-by: requires.io <support@requires.io>
2021-11-26 23:14:19 +01:00
Brad Dixon
b1d0887db4
Add deepcopy to allow view.flows.resolve (issue #4916) (#4952)
* Add deepcopy to allow view.flows.resolve (issue #4916)

* try to simplify deepcopy implementation

* remove leftover check

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-11-26 23:14:06 +01:00
Felix Ingram
b1c1cd3f2f
Fixes AttributeError in transparent mode (#4951)
If we haven't connected to the upstream host in transparent mode, then the call to `write` on line 74 will raise an `AttributeError` as we haven't initialised `self.wfile`.

If we add `AttributeError` to the `except` line, then we'll catch the exception and call `_connect`, which will in turn initialise `wfile`.
2021-11-24 16:49:47 +01:00
Maximilian Hils
27e69651f6
[requires.io] dependency update (#4946)
Co-authored-by: requires.io <support@requires.io>
2021-11-23 21:12:32 +01:00
Maximilian Hils
2dd845ed95 catch malformed cert warning in tests
we may need to catch this properly in `get_cert` at some point,
let's see if this ever turns out to be an issue.
2021-11-22 12:55:17 +01:00
Maximilian Hils
9803c90341 make it possible to disable exit on SIGUSR1 2021-11-22 12:54:02 +01:00
Maximilian Hils
68bce90754 require cryptography 36+
3.3+ should mostly work fine, but our tests cover v36-specific behavior
2021-11-22 12:52:37 +01:00
Maximilian Hils
57ae779b15
Merge pull request #4944 from mitmproxy/requires-io-main
[requires.io] dependency update on main branch
2021-11-22 11:20:23 +01:00
Maximilian Hils
95089486ca cryptography now accepts some more invalid attrs - remove dead code paths 2021-11-22 11:14:15 +01:00
Maximilian Hils
9249c0ddd3 adjust lower version bounds 2021-11-22 11:09:04 +01:00
requires.io
dae098cd33 [requires.io] dependency update 2021-11-22 10:50:48 +01:00
requires.io
eea24bc22d [requires.io] dependency update 2021-11-22 10:50:47 +01:00
Maximilian Hils
a969739875
Merge pull request #4790 from mhils/ignore-after-clienthello
TLS: add `tls_handshake` hook, ignore-after-clienthello
2021-11-22 10:29:47 +01:00
Maximilian Hils
3cb87f5a2f split tls_handshake hook into client/server and success/fail variants 2021-11-22 10:23:21 +01:00
Maximilian Hils
a72f61ef57 Merge remote-tracking branch 'origin/main' into ignore-after-clienthello 2021-11-22 09:54:08 +01:00
Maximilian Hils
6398dc308a
WebSockets: don't assert that server is connected upon initialization (#4932)
there may already have been a disconnect, which is still in the processing queue.

fix #4931
2021-11-22 07:41:33 +01: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
Anthony Sottile
3847842f73
add runtime dependency on setuptools (#4919)
resolves #4918

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-11-21 14:14:47 +00:00
shindexro
9a469806eb
quote argument of view.flows.resolve (#4910)
* Fix #4902

* Update type signature

* Switch to None check

* Fix spacing

* Quote view.flows.resolve argument

* Switch to call_strings
2021-11-19 13:04:20 +01:00
Maximilian Hils
7be646f44a add note that spoof_source_address is unavailable, refs #4914 2021-11-18 15:39:23 +01:00
Maximilian Hils
0904cc3f5f
console: add error message for older Windows versions (#4911) 2021-11-18 07:45:28 +00:00
shindexro
888ce66f90
Correct flow-detail documentation (#4909)
* Fix #4902

* Update type signature

* Switch to None check

* Fix spacing

* Skip URL shortening when flow-detail is 0

* Sync docs with implementation

* Update URL shortening test
2021-11-18 08:26:05 +01:00
shindexro
39fa242e25
fix crash when invoking replay.server.count from console (#4905)
fix #4902
2021-11-17 16:53:43 +00:00
Maximilian Hils
83f05897ce fixup Windows transparent mode, fix #3876 and #3438 2021-11-16 21:12:09 +01:00
Christian Zenker
eb43ae4709
Use the slim base image for container (#4889) 2021-11-16 12:49:12 +01:00
Marius
301f8cf79d
Create search.py (#4900)
* Create search.py

* Address linter findings

* Address linter findings
2021-11-16 12:47:34 +01:00
Maximilian Hils
4f47612548 StackOverflow -> GitHub Discussions (part 2) 2021-11-16 11:02:57 +01:00
Maximilian Hils
9571491e50
StackOverflow -> GitHub Discussions 2021-11-16 10:26:38 +01:00
Karl Parkinson
df32d61086
Remove pyopenssl cruft (#4897)
* remove old pyopenssl cruft

* bump minimum version of pyopenssl

* add extra spaces to conform to style guide

* update changelog

* replace getattr with direct SSL method calls

* put version check back in but remove setdefault method calls

* tweak changelog wording

* bumb tox.ini pyOpenSSL dependency version

Co-authored-by: Karl Parkinson <karlparkinson@Karls-MBP.hitronhub.home>
2021-11-11 09:37:00 +01:00
Maximilian Hils
fd5caf40c7
server replay: improve option help (#4894) 2021-11-05 17:48:12 +00:00
Peter Hoffmann
260fc68211
Fix #4876 Don't do CONNECT on plaintext HTTP replays via upstream (#4882)
* Replays via upstream also need to comply with upstream handling

* Adjusted test for HTTP upstream replay which should NOT do a CONNECT

* Added Changelog

* Test for replay https pver upstream with CONNECT

* Proxy requests use full URL with host & port

* Finally remove some prints

* lint!

Co-authored-by: Maximilian Hils <github@maximilianhils.com>
2021-10-31 20:23:04 +00:00
Thomas Kriechbaumer
1c10abef00
Merge pull request #4875 from Kriechi/bump-ci
bump CI steps and dependencies
2021-10-21 22:10:22 +02:00
Thomas Kriechbaumer
8d1135d66a bump CI steps and dependencies
not bumping codecov action due to dependency and security concerns
2021-10-21 22:03:33 +02:00
mame82
3a884ceb8f
gRPC packed repeated encoding (#4872)
* Replaced Kaitai protobuf parser with custom implementation, to prepare packed data handling

* Clamp varint size for bool conversion to 64bit, to satify tests

* moved WireParser into ProtoParser

* preserve work state

* Full packed support

* noc changes to example addon

* Adjusted test regex for ValueError

* Do not try to unpack fields twice
2021-10-21 13:20:13 +02:00
Thomas Kriechbaumer
eea48c6c27
Merge pull request #4850 from Kriechi/bump-docker
bump docker
2021-10-20 20:02:10 +02:00
Thomas Kriechbaumer
fffed0cb3a bump docker
closes #4846
2021-10-20 19:57:21 +02:00
Maximilian Hils
79f464bc78
ignore superfluous newlines after HTTP CONNECT, fix #4870 (#4871) 2021-10-19 11:25:22 +00:00
Maximilian Hils
0ad4a5983e web: update timestamp column style, fix #4092 2021-10-18 15:12:35 +02:00
mame82
8b6345e4a7
gRPC view: Adjusted parsing strategy for deprecated protobuf fields (#4858)
* Adjusted parsing strategy for deprecated protobuf fields

* Added test comment

* adjusted comment to reflect correct field IDs
2021-10-13 13:16:49 +02:00
Brad Dixon
77cf2ab4ee
fix for #4852 (#4857)
* fix for #4852

* changelog
2021-10-13 13:15:21 +02:00
Maximilian Hils
d6ba6777eb
enable live-reloading for contentviews (#4856) 2021-10-12 23:07:14 +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
aa2ec224c7
Body Editing Fixes (#4853)
* clarify that `IS_WINDOWS` includes WSL

* windows: fix file editing

tornado's asnycio patch does not take nonexisting file descriptors very well,
so we need to catch errors here.

* body editing: better editor guessing, fix #4798
2021-10-12 00:23:35 +02:00