Skip to content

Commit

Permalink
disable corectl display-http-requests on https
Browse files Browse the repository at this point in the history
current implementation raises a reursion error on https
targets, so it had been disabled before finding a proper way
to handle it.
  • Loading branch information
nil0x42 committed Dec 19, 2015
1 parent 420e3f7 commit c52634a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/core/tunnel/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,18 @@ def send(self, s):
global_raw_requests.append(s)
super().send(s)

class CustomHTTPSConnection(http.client.HTTPSConnection):
def send(self, s):
global global_raw_request
global_raw_requests.append(s)
super().send(s)
# TODO: intercept trafic on HTTPS requests too
# class CustomHTTPSConnection(http.client.HTTPSConnection):
# def send(self, s):
# global global_raw_request
# global_raw_requests.append(s)
# super().send(s)

http.client.__HTTPConnection__ = http.client.HTTPConnection
http.client.__HTTPSConnection__ = http.client.HTTPSConnection
# http.client.__HTTPSConnection__ = http.client.HTTPSConnection

http.client.HTTPConnection = CustomHTTPConnection
http.client.HTTPSConnection = CustomHTTPSConnection
# http.client.HTTPSConnection = CustomHTTPSConnection

##############################################################################

Expand Down
1 change: 1 addition & 0 deletions src/ui/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def do_corectl(self, argv):
remote command execution.
NOTE: http requests are NOT saved in session files
WARNING: don't works with HTTPS requests (see issue #29 on github)
"""
argv.append('')

Expand Down

0 comments on commit c52634a

Please sign in to comment.