From 554047da85d9ff767077f3ba0126937980daedb9 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 23 Feb 2012 15:52:01 +1300 Subject: [PATCH] License notifications, minor docs. --- doc-src/scripts.html | 5 ++++- libmproxy/cmdline.py | 15 +++++++++++++++ libmproxy/console/common.py | 15 +++++++++++++++ libmproxy/console/flowlist.py | 15 +++++++++++++++ libmproxy/console/flowview.py | 15 +++++++++++++++ libmproxy/console/help.py | 15 +++++++++++++++ libmproxy/console/kveditor.py | 15 +++++++++++++++ libmproxy/console/palettes.py | 15 +++++++++++++++ libmproxy/dump.py | 15 +++++++++++++++ libmproxy/encoding.py | 15 +++++++++++++++ libmproxy/flow.py | 17 ++++++++++++++++- libmproxy/proxy.py | 15 +++++++++++++++ libmproxy/script.py | 15 +++++++++++++++ 13 files changed, 185 insertions(+), 2 deletions(-) diff --git a/doc-src/scripts.html b/doc-src/scripts.html index bea8a1038..3fa79a6c6 100644 --- a/doc-src/scripts.html +++ b/doc-src/scripts.html @@ -99,7 +99,10 @@ The main classes you will deal with in writing mitmproxy scripts are: libmproxy.flow.ScriptContext - A handle for interacting with mitmproxy's global state. + + + A handle for interacting with mitmproxy's from within scripts. + diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 0e2ecbe55..ee4f3b086 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import proxy import optparse diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 45152c323..22d9e51dc 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import urwid import urwid.util from .. import utils diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py index d8fbe6139..c7673ca28 100644 --- a/libmproxy/console/flowlist.py +++ b/libmproxy/console/flowlist.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import urwid import common diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py index dc63c0678..2ac92ee05 100644 --- a/libmproxy/console/flowview.py +++ b/libmproxy/console/flowview.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import os, re import urwid import common diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py index 224c6ab74..9509386b4 100644 --- a/libmproxy/console/help.py +++ b/libmproxy/console/help.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import urwid import common from .. import filt diff --git a/libmproxy/console/kveditor.py b/libmproxy/console/kveditor.py index 2997cf7f8..ef8ff7e90 100644 --- a/libmproxy/console/kveditor.py +++ b/libmproxy/console/kveditor.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import copy import urwid import common diff --git a/libmproxy/console/palettes.py b/libmproxy/console/palettes.py index 1710786f0..d9d1aeaf2 100644 --- a/libmproxy/console/palettes.py +++ b/libmproxy/console/palettes.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + dark = [ ('body', 'black', 'dark cyan'), diff --git a/libmproxy/dump.py b/libmproxy/dump.py index d71aed42b..4520ad82a 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import sys, os import flow, filt, utils diff --git a/libmproxy/encoding.py b/libmproxy/encoding.py index 6886fb0b4..9f8acbe98 100644 --- a/libmproxy/encoding.py +++ b/libmproxy/encoding.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + """ Utility functions for decoding response bodies. """ diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 4cde7bc9d..b40daefd1 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + """ This module provides more sophisticated flow tracking. These match requests with their responses, and provide filtering and interception facilities. @@ -97,7 +112,7 @@ class ODict: def __delitem__(self, k): """ - Delete all items matching k. + Delete all items matching k. """ self.lst = self._filter_lst(k, self.lst) diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 583e533b2..3a7f807e6 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + """ A simple proxy server implementation, which always reads all of a server response into memory, performs some transformation, and then writes it back diff --git a/libmproxy/script.py b/libmproxy/script.py index bec07343c..144d0dd8b 100644 --- a/libmproxy/script.py +++ b/libmproxy/script.py @@ -1,3 +1,18 @@ +# Copyright (C) 2012 Aldo Cortesi +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import os, traceback class ScriptError(Exception):