andresriancho/pico-wavsep

Automate the creation of derby db and mysql connection

Closed this issue ยท 8 comments

After starting pico-wavsep the user needs to browse to:

And configure the mysql database. I would like this to be more automated, and work as following:

$ ./start.py
No "db" directory found. Please start using --mysql-user , --mysql-pass , --mysql-host , --mysql-port to configure.
$ ./start.py --mysql-user=root --mysql-pass=foo --mysql-host=localhost --mysql-port=3306
Configuring WAVSEP...
Done!
Listening at 127.0.0.1:8080
...
$ ./start.py
Listening at 127.0.0.1:8080

The first time won't work because there is no configuration. The second call creates the derbydb with the configuration for mysql. The third one works without any issues because derby already exists.

I might try to implement this as part of working on https://code.google.com/p/zaproxy/issues/detail?id=1009. I would like to take advantage of winstone for this, as you have suggested in the past.

pull requests are welcome ๐Ÿ‘

I've started to work on this in my fork, by converting the shell script to Python, and adding some help text that I find useful for now. I plan to using urllib2 to do the needed form request to wavsep giving the MySQL credentials.

Since https://github.com/andresriancho/pico-wavsep/blob/master/start.sh ended up as a bash script instead of a python script, it might make more sense to just use curl

As you can see from the above referenced commit, I had already been attacking this from the Python angle. For my purposes right now, (OWASP ZAP issue 1009) the existing Python script I wrote will do the job, and is a bit more "cross-platform" than a bash script (which, AFAIK, would require Cygwin for Windows users). I am willing to revisit this, and write a (mostly equivalent) bash script utilizing curl.

Please try out my fork though, and tell me what you think. ๐Ÿ˜ƒ

If it's done, it's done ๐Ÿ‘

I'll look into this in a couple of days, could you send a pull-request?

OK. I think I've addressed your concerns in my pull request.

w0w, almost 1 year to close a PR, sorry!