While it becomes clear that the Riddler didn't actually know Batman's identity, he certainly came closer than anyone else to cracking the mystery. The clues to uncover Batman's secret were right in front of him. The Riddler sends a package to Wayne Manor with the expectation that Bruce will open it.