There's a book I read about a year ago that was absolutely amazing and I've recently been looking with all that I can remember about the book. The books in a dystopian universe where the main character gets captured, tortured by a machine that also slowly erases the main characters' memories.
The machine also removes all the hair and nails from the characters body and feeds them through a tube in his stomach, then the character communicates with a rebel organization who releases them from control of the computer. That's most all of what I can remember, if anyone can help me you'd be my savior.
Also if you have anymore questions about the plot I would be more than happy to tell you all I can remember