Commit Graph

307 Commits

Author SHA1 Message Date
Thomas Kriechbaumer
53cb5bf40f bump deps 2019-09-28 17:37:43 +02:00
Thomas Kriechbaumer
a54954ee1e fix linting 2019-09-28 12:29:16 +02:00
Maximilian Hils
e97a804e89
make dict comprehension more readable 2019-09-05 22:13:49 +02:00
RamiBerm
4ce5e1386c
Updated har_dump,py timings dictionary function
the HAR file spec (http://www.softwareishard.com/blog/har-12-spec/#timings) states that timings that do not apply for a certain requests should be set to -1, this example may set -1000 as a timings value for certain requests.
This ends up producing invalid HAR files in many cases.

My proposed fix is to assign -1 into the dic and only multiply by 1000 for other values
2019-09-03 17:19:50 +03:00
Maximilian Hils
82bc8c7ca2
Merge pull request #3444 from BoboTiG/fix-resource-leaks
Fix ResourceWarning: unclosed file, prevent resource leaks
2019-01-06 17:43:47 +01:00
Mickaël Schoentgen
c03b07930c Fix ResourceWarning: unclosed file, prevent resource leaks
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-06 15:06:30 +01:00
Mickaël Schoentgen
3a2d7bb119 Fix several DeprecationWarning: invalid escape sequence
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-05 23:37:48 +01:00
Alex Lauerman
93cb73e2cd
Corrected keep_host_header usage option
I tested this locally to verify this change is correct.
2018-10-25 16:15:55 -05:00
jbrule
57868ef5fa Added link_expander.py example to simple examples (#3348) 2018-10-12 21:56:58 +02:00
Thomas Kriechbaumer
13e1f8b421 add websocket example 2018-10-09 18:34:57 +02:00
David Kremer
e46e064df3 [examples/xss_scanner] replace relative import
test_xss_scanner.py was utterly failing because of a trouble (bug?)
with the `monkeypatch` fixture failing to replace `gethostbyname`
with the correct mock function.

Indeed, when stepping through the code, the `gethostbyname` presumably
mocked was reported as a builtin python function. The problem could
then come from the fact that it is hard to monkeypatch builtin function
in python.

Using absolute imports seems to resolve the problem.
2018-08-15 19:47:55 +02:00
Aldo Cortesi
9829fe150e
Merge pull request #3186 from andersonvom/master
Add scripting example to intercept & change requests
2018-07-11 10:24:52 +12:00
Pierre Cavan
2326f973df
Update CLI usage instructions 2018-06-26 13:09:45 +02:00
madt1m
773c953514 View API slightly extended; codebase cleaned in some points 2018-06-13 11:56:14 +02:00
Anderson Mesquita
4fdc3d9e15 Rename scripting file
In order to add the more scripting examples, it makes sense to rename
this file and avoid confusion.
2018-06-08 08:04:53 +02:00
Miroslav
06e12f56e2 typo 2018-05-27 19:40:26 +03:00
Thomas Kriechbaumer
976ab0c466 websocket: inject messages via flow 2018-05-16 21:50:15 +02:00
Aldo Cortesi
2db223decb docs: console key binding docs and example 2018-05-15 10:34:55 +12:00
Joaquin
f4a6153f2e Fixing Typos 2018-05-13 17:31:20 -05:00
Thomas Kriechbaumer
e305a320a2 fix tcp example 2018-05-11 11:58:01 +02:00
Maximilian Hils
0c101a4bcc
Merge pull request #3106 from cortesi/noprint
Ditch the addon stdout wrapper
2018-05-08 15:24:02 +02:00
0xHJK
a46a317dca har_dump example cmdline invocation 2018-05-08 16:27:56 +08:00
Aldo Cortesi
af1a4ffdcd Ditch the addon stdout wrapper
This results in a 30% improvement in our core request throughput.

Fixes #3102
2018-05-08 14:26:41 +12:00
Aldo Cortesi
76a7883c8b events: document behaviour of done() more fully 2018-05-08 11:09:10 +12:00
Aldo Cortesi
9e283b2779
Merge pull request #3097 from cortesi/examp
Revamp dup_and_replay example
2018-05-05 10:05:43 +12:00
Aldo Cortesi
f5dc0aace1 Revamp dup_and_replay example
- Exposes view.add as a command
- Copes with cases where a view addon isn't present
- Avoids infinite loop caused by replaying replays

Fixes #3096
2018-05-05 09:34:22 +12:00
Aldo Cortesi
f380a77dee Remove the tick event
Mitmproxy: the tickless wonder.
2018-05-02 14:29:15 +12:00
oscure76
0e984e1442 fix Python 3.6 variable type annotations #3053 2018-04-14 16:24:41 -07:00
Thomas Kriechbaumer
fe699e555f fix example filename 2018-04-13 09:09:24 +02:00
Barry Lee
b35311441f
Typo fix 2018-03-10 23:24:56 +08:00
Aldo Cortesi
ded9423764
Merge pull request #2922 from kajojify/new_example
Replaces upsidedown with mirror reflection
2018-02-26 08:48:52 +13:00
Miroslav
3b134df77f Replace upsidedown with mirror reflection 2018-02-25 21:17:08 +02:00
luz.paz
afbb7f117b Misc. typos
Found via `codespell -q 3 -I ../mitmproxy-word-whitelist.txt`
Where whitelist contains:
```
cas
doubleclick
nd
ot
seeked
statics
te
thru
```
2018-02-24 21:45:11 -05:00
Aldo Cortesi
982508d30f All new documentation
This patch does a lot.

- Ditch sphinx in favor of hugo. This gives us complete control of the layout
and presentation of our docs. Henceforth, docs will be hosted on our website
rather than ReadTheDocs.
- Create a simple, clean doc layout and theme.
- Remove large parts of the documentaion. I've ditched anything that was a)
woefully out of date, b) too detailed, or c) too hard to maintain in the long
term.
- Huge updates to the docs themselves: completely rewrite addons documentation,
add docs for core concepts like commands and options, and revise and tweak a
lot of the existing docs.

With this patch, we're also changing the way we publish and maintain the docs.
From now on, we don't publish docs for every release. Instead, the website will
contain ONE set of docs for each major release. The online docs will be updated
if needed as minor releases are made. Docs are free to improve during minor
releases, but anything that changes behaviour sufficiently to require a doc
change warrants a new major release. This also leaves us free to progressively
update and improve docs out of step with our release cadence.

With this new scheme, I feel CI over the docs is less important. I've removed
it for now, but won't object if someone wants to add it back in.
2018-02-22 18:07:58 +13:00
Maximilian Hils
95c160ac13
Merge pull request #2884 from kajojify/hotkeys-cleanup
Hotkeys cleanup. #2877
2018-02-20 21:45:48 +01:00
Maximilian Hils
3934dbb5ad
update log_events example documentation 2018-02-20 17:15:35 +01:00
Maximilian Hils
29ef663aa1
add documentation for custom_option.py 2018-02-20 17:14:21 +01:00
Miroslav
aea6fd28c8 Hotkeys cleanup 2018-02-20 16:25:39 +02:00
Arushit Mudgal
91834f98cc Extend mypy checking, fix #2194 (#2819) 2018-02-03 21:37:33 +01:00
Aniket Panjwani
71494c6a06 Fix mistakes in examples/simple/Readme.md.
1. Delete row for script_arguments.py.
2. Add row for custom_option.py, using script_arguments.py's Description.
2018-01-29 12:06:38 -06:00
Thomas Kriechbaumer
9aae3213b9 rename TLS/SSL-related attributes
SSL is an outdated protocol superseeded by TLS. Although the commonly
used library is called OpenSSL, it is no reason to still use outdated
language for attributes.
2018-01-06 10:43:47 +01:00
David Dworken
04a06eb6b5 Added scanning for CSS injection and iframe injection 2017-10-17 23:39:33 -04:00
Suraj Tripathi
781369a326 fix #2477 (#2556) 2017-09-01 23:08:34 +02:00
Ujjwal Verma
6367dcab8e update streaming docs 2017-07-04 10:53:23 +02:00
Maximilian Hils
eb5f37a7d1 fix mypy annotations 2017-05-26 16:14:20 +02:00
harsh vijay
e24b4cc1b6 Extend Mypy checking to pathod
* mypy checking pathod

* initial commit , fixed errors

* tox: mypy checking to pathod

* Fixed mypy test failed

* issue was with args in custom_contentview.py

* tox: mypy checking to #2221

* follow-import=skip since we cant provide args to custom_contentview.py during mypy testing

* Lint , Typo Fixed

* code style: module import
2017-05-02 05:19:25 +05:30
harsh vijay
789fbd00d2 Fixed lint error 2017-04-29 03:54:00 +05:30
harsh vijay
6e03231d25 lint error fixed 2017-04-29 03:49:08 +05:30
harsh vijay
36118973d9 extend mypy example/simple 2017-04-29 03:26:14 +05:30
Aldo Cortesi
2a46f3851a Merge pull request #2265 from cortesi/addons
Addons and addon testing
2017-04-27 07:40:14 +12:00