Medieval scribes wrote book curses in the "colophon" at the end of the book; here are two favorites:
Whoever steals this book let him die the death; let him be frizzled in a pan; may the falling sickness rage within him; may he be broken on the wheel and be hanged.
For him that stealeth, or borroweth and returneth not,
— San Pedro monastery, Barcelona
... and one a bit older (from Asurbanipal's library in Assyria 650 BCE):
Clay tablet of Ashurbanipal, King of the World, King of Assyria, who trusts in Ashur and Ninlil. Your lordship is without equal, Ashur, King of the Gods! Whoever removes [this tablet], writes his name in place of my name, may Ashur and Ninlil, angered and grim, cast him down, erase his name, his seed, in the land.
It's time to boot, do your boot ROMs know where your disk controllers are?