mastermind icon indicating copy to clipboard operation
mastermind copied to clipboard

CLI interaction

Open Ashraf-Ali-aa opened this issue 8 years ago • 9 comments

It would be nice to have a way interact with mastermind while it is running an example of this would be the able to pause mastermind without having to close the session, the reason being some websites do not work while mastermind is running and having to constantly close the mastermind session is painful.

Others:

  • the ability to quit the app cleanly i.e pressing "x" with stop mastermind and disable the proxy

Ashraf-Ali-aa avatar May 06 '16 11:05 Ashraf-Ali-aa

Both great ideas but they require an important change in architecture so it will take a while before we get there. I'll keep this open as a reminder.

arnau avatar May 06 '16 15:05 arnau

@Ashraf-Ali-aa as a poor workaround you can add a command after all your tests run with something like sudo killall -9 mastermind && sudo proxyswitch --disable which will kill off mastermind and turn off your host proxy. You'd probably have to add this to your visudo file though

concertman avatar May 06 '16 16:05 concertman

I've been thinking about this. An option would be making mastermind be a multiprocess system so the "master" process would deal with keyboard signaling and then it would delegate to the subprocess(es) (i.e. mitmproxy). Given it changes the approach substantially I would suggest we schedule it for milestone 1.1 (we're still finishing 1.0). Thoughts?

arnau avatar May 19 '16 09:05 arnau

@arnau it's worth investigating. I think it might be good to do a spike.

concertman avatar May 19 '16 09:05 concertman

@Ashraf-Ali-aa I just clicked with the obvious solution. You don't need to stop mastermind every time you want to stop proxying all connections. You only need to disable the OS proxy settings:

sudo proxyswitch --disable

After that mastermind will not receive any connections. To enable it again:

sudo proxyswitch --enable

arnau avatar May 20 '16 08:05 arnau

@arnau I like the idea of multiprocess system, also I did create a quick ruby client to make it easier to interact with mastermind in driver-mode, it would be nice to have a similar feature build into mastermind.

The following example loads a bad config ./mclient.rb BadConfig

https://gist.github.com/Ashraf-Ali-aa/b1a8bec3a756de35e055ee71e96c084c

Ashraf-Ali-aa avatar May 22 '16 12:05 Ashraf-Ali-aa

@Ashraf-Ali-aa are you asking for a command line interface that mimics the proxapp HTTP interface?

arnau avatar May 24 '16 08:05 arnau

@arnau yes, this would make it easier to intercept network requests when manually testing on devices.

Ashraf-Ali-aa avatar May 24 '16 11:05 Ashraf-Ali-aa

We can definitely explore this, do you wanna take a shot and define how it should work? Feel free to open a dedicated issue for that.

arnau avatar May 24 '16 11:05 arnau