aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc-src/scripts.html5
-rw-r--r--libmproxy/cmdline.py15
-rw-r--r--libmproxy/console/common.py15
-rw-r--r--libmproxy/console/flowlist.py15
-rw-r--r--libmproxy/console/flowview.py15
-rw-r--r--libmproxy/console/help.py15
-rw-r--r--libmproxy/console/kveditor.py15
-rw-r--r--libmproxy/console/palettes.py15
-rw-r--r--libmproxy/dump.py15
-rw-r--r--libmproxy/encoding.py15
-rw-r--r--libmproxy/flow.py17
-rw-r--r--libmproxy/proxy.py15
-rw-r--r--libmproxy/script.py15
13 files changed, 185 insertions, 2 deletions
diff --git a/doc-src/scripts.html b/doc-src/scripts.html
index bea8a103..3fa79a6c 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:
</tr>
<tr>
<th>libmproxy.flow.ScriptContext</th>
- <td>A handle for interacting with mitmproxy's global state.</td>
+
+
+ <td> A handle for interacting with mitmproxy's from within scripts. </td>
+
</tr>
</table>
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py
index 0e2ecbe5..ee4f3b08 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 <http://www.gnu.org/licenses/>.
+
import proxy
import optparse
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py
index 45152c32..22d9e51d 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 <http://www.gnu.org/licenses/>.
+
import urwid
import urwid.util
from .. import utils
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py
index d8fbe613..c7673ca2 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 <http://www.gnu.org/licenses/>.
+
import urwid
import common
diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py
index dc63c067..2ac92ee0 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 <http://www.gnu.org/licenses/>.
+
import os, re
import urwid
import common
diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py
index 224c6ab7..9509386b 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 <http://www.gnu.org/licenses/>.
+
import urwid
import common
from .. import filt
diff --git a/libmproxy/console/kveditor.py b/libmproxy/console/kveditor.py
index 2997cf7f..ef8ff7e9 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 <http://www.gnu.org/licenses/>.
+
import copy
import urwid
import common
diff --git a/libmproxy/console/palettes.py b/libmproxy/console/palettes.py
index 1710786f..d9d1aeaf 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 <http://www.gnu.org/licenses/>.
+
dark = [
('body', 'black', 'dark cyan'),
diff --git a/libmproxy/dump.py b/libmproxy/dump.py
index d71aed42..4520ad82 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 <http://www.gnu.org/licenses/>.
+
import sys, os
import flow, filt, utils
diff --git a/libmproxy/encoding.py b/libmproxy/encoding.py
index 6886fb0b..9f8acbe9 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 <http://www.gnu.org/licenses/>.
+
"""
Utility functions for decoding response bodies.
"""
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index 4cde7bc9..b40daefd 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 <http://www.gnu.org/licenses/>.
+
"""
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 583e533b..3a7f807e 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 <http://www.gnu.org/licenses/>.
+
"""
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 bec07343..144d0dd8 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 <http://www.gnu.org/licenses/>.
+
import os, traceback
class ScriptError(Exception):