Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions src/mallory.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,18 @@
try:
# These protocols have dependencies and may not be safe to import
from protocol import sslproto, http, ssh, https
from plugin_managers import http_plugin_manager
except ImportError:
print "ImportError: Trouble importing protocols with dependencies. " \
except ImportError, e:
print 'ImportError : "%s"' % e
print "Trouble importing protocols with dependencies. " \
"Proceeding with minimal protocol support."
print "For support verify PIL (python-imaging) is installed"

try:
from plugin_managers import http_plugin_manager
except ImportError, e:
print 'ImportError : "%s"' % e
print "Could not import http_plugin_manager. " \
"Proceeding without support support."

# Config object is global. Buyer beware.
config = config.Config()
Expand Down Expand Up @@ -509,8 +516,9 @@ def main(self):
opts = CmdLineOpts()
mallory = Mallory(opts)


mallory.add_plugin_manager(http_plugin_manager.HttpPluginManager())
if 'http_plugin_manager' in dir():
print "http_plugin_manager did not load, ignoring..."
mallory.add_plugin_manager(http_plugin_manager.HttpPluginManager())

# Pull in the protocol configured on the command line for use with the
# no-transparent option when the proxy is not being used transparently
Expand Down