IIRC that's exactly what a character did in either Person of Interest or Mr. Robot
(I have a very hard time to distinguish both in my memory since they were so similar in their themes)