Detection of evanescent waves using disordered nanowires