You must be doing SQLi as your question suggests, well SELECT DB_NAME() should give you the current database. OR you can use sqlmap to know the current database with --current-db command. Sqlmap also has another powerful command "--os-shell" that can take over the server. Hope this might help and Best of luck.
215 questions
219 answers
402 comments
60,870 users