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.
217 questions
220 answers
402 comments
154,975 users