forked from mitmproxy/mitmproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mitmproxy#3045 from mhils/3.0.x
Bump to 3.0.4
- Loading branch information
Showing
26 changed files
with
206 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
generated/ | ||
src/public | ||
node_modules | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
for script in scripts/* ; do | ||
echo "Generating output for $script ..." | ||
output="${script##*/}" | ||
"$script" > "src/generated/${output%.*}.html" | ||
done | ||
|
||
cd src | ||
hugo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env python | ||
#!/usr/bin/env python3 | ||
|
||
from mitmproxy import flowfilter | ||
|
||
|
||
print("<table class=\"table filtertable\"><tbody>") | ||
for i in flowfilter.help: | ||
print("<tr><th>%s</th><td>%s</td></tr>" % i) | ||
print("</tbody></table>") | ||
print("</tbody></table>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from mitmproxy import options, optmanager | ||
from mitmproxy.tools import dump, console, web | ||
|
||
masters = { | ||
"mitmproxy": console.master.ConsoleMaster, | ||
"mitmdump": dump.DumpMaster, | ||
"mitmweb": web.master.WebMaster | ||
} | ||
|
||
unified_options = {} | ||
|
||
for tool_name, master in masters.items(): | ||
opts = options.Options() | ||
inst = master(opts) | ||
for key, option in optmanager.dump_dicts(opts).items(): | ||
if key in unified_options: | ||
unified_options[key]['tools'].append(tool_name) | ||
else: | ||
unified_options[key] = option | ||
unified_options[key]['tools'] = [tool_name] | ||
|
||
print(""" | ||
<table class=\"table optiontable\"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Type</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
""".strip()) | ||
for key, option in sorted(unified_options.items(), key=lambda t: t[0]): | ||
print(""" | ||
<tr> | ||
<th>{}<br/>{}</th> | ||
<td>{}</td> | ||
<td>{}<br/> | ||
Default: {} | ||
{} | ||
</td> | ||
</tr> | ||
""".strip().format( | ||
key, | ||
' '.join(["<span class='badge'>{}</span>".format(t) for t in option['tools']]), | ||
option['type'], | ||
option['help'], | ||
option['default'], | ||
"<br/>Choices: {}".format(', '.join(option['choices'])) if option['choices'] else "", | ||
)) | ||
print("</tbody></table>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{$file := .Get "file"}} | ||
{{- if eq (.Get "markdown") "true" -}} | ||
{{- $file | readFile | markdownify -}} | ||
{{- else -}} | ||
{{ $file | readFile | safeHTML }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.badge { | ||
color: #fff; | ||
background-color: #6c757d; | ||
display: inline-block; | ||
padding: .25em .4em; | ||
font-size: 75%; | ||
font-weight: 1; | ||
line-height: 1; | ||
text-align: center; | ||
white-space: nowrap; | ||
vertical-align: baseline; | ||
border-radius: 0.25rem; | ||
|
||
// Empty badges collapse automatically | ||
&:empty { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@import "./syntax"; | ||
@import "./badge"; | ||
|
||
$primary: #C93312; | ||
$warning-invert: #FFFFFF; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.