This repository has been archived by the owner on May 24, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix release process by fixing setuptools to 19.2
- Loading branch information
Arnau Siches
committed
Aug 25, 2016
1 parent
313dc4e
commit 86a77a5
Showing
5 changed files
with
50 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/usr/bin/env python | ||
|
||
from __future__ import (absolute_import, print_function, division) | ||
|
||
from mastermind import main | ||
|
||
if __name__ == '__main__': | ||
main() | ||
main.main() |
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,38 +1 @@ | ||
from __future__ import (absolute_import, print_function, division) | ||
from itertools import repeat | ||
from mitmproxy.main import mitmdump | ||
import os | ||
|
||
from . import (cli, proxyswitch, say) | ||
|
||
def main(): | ||
parser = cli.args() | ||
args, extra_args = parser.parse_known_args() | ||
|
||
try: | ||
config = cli.config(args) | ||
except IOError as err: | ||
parser.error(err) | ||
except toml.core.TomlError as err: | ||
parser.error("Errors found in the config file:\n\n", err) | ||
|
||
mitm_args = cli.mitm_args(config) | ||
is_sudo = os.getuid() == 0 | ||
|
||
if type(mitm_args) == Exception: | ||
parser.error(mitm_args.message) | ||
|
||
say.level(config["core"]["verbose"]) | ||
|
||
try: | ||
if config["os"]["proxy-settings"]: | ||
if not is_sudo: | ||
parser.error("proxy-settings is enabled, please provide sudo in order to change the OSX proxy configuration.") | ||
|
||
proxyswitch.enable(config["core"]["host"], | ||
str(config["core"]["port"])) | ||
|
||
mitmdump(mitm_args + extra_args) | ||
finally: | ||
if config["os"]["proxy-settings"] and is_sudo: | ||
proxyswitch.disable() |
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,38 @@ | ||
from __future__ import (absolute_import, print_function, division) | ||
from itertools import repeat | ||
from mitmproxy.main import mitmdump | ||
import os | ||
|
||
from . import (cli, proxyswitch, say) | ||
|
||
def main(): | ||
parser = cli.args() | ||
args, extra_args = parser.parse_known_args() | ||
|
||
try: | ||
config = cli.config(args) | ||
except IOError as err: | ||
parser.error(err) | ||
except toml.core.TomlError as err: | ||
parser.error("Errors found in the config file:\n\n", err) | ||
|
||
mitm_args = cli.mitm_args(config) | ||
is_sudo = os.getuid() == 0 | ||
|
||
if type(mitm_args) == Exception: | ||
parser.error(mitm_args.message) | ||
|
||
say.level(config["core"]["verbose"]) | ||
|
||
try: | ||
if config["os"]["proxy-settings"]: | ||
if not is_sudo: | ||
parser.error("proxy-settings is enabled, please provide sudo in order to change the OSX proxy configuration.") | ||
|
||
proxyswitch.enable(config["core"]["host"], | ||
str(config["core"]["port"])) | ||
|
||
mitmdump(mitm_args + extra_args) | ||
finally: | ||
if config["os"]["proxy-settings"] and is_sudo: | ||
proxyswitch.disable() |