Pirates of the RAG: Adaptively Attacking LLMs to Leak Knowledge Bases