From cf0859565d0e72b315965803ffdf510cf708d4ee Mon Sep 17 00:00:00 2001 From: Bipin <87369440+bipinkrish@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:38:10 +0530 Subject: [PATCH] Add files via upload --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ main.py | 36 ++++++++++++++++++++++++++++++++++++ requirements.txt | 2 ++ 3 files changed, 77 insertions(+) create mode 100644 README.md create mode 100644 main.py create mode 100644 requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..d067823 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# DeGourou (DeDRM + libgourou) + +### Automate the process of getting decrypted book from [InternetArchive](https://archive.org/) without the need for [Adobe Digital Editions](https://www.adobe.com/in/solutions/ebook/digital-editions/download.html) and [Calibre](https://calibre-ebook.com/) with DeDRM Plugins. + +--- + +## Things you need + +1. Adobe Account (dummy account recommended) +2. Internet Archive Account +3. ACSM file from the book page you borrowded from Internet Archive +4. Python v3.x.x Installed with pip + +--- + +## Guide + +1. Clone the repositary or Downlaod zip file and extract it +2. Install requirements using pip +3. Run "main" file + + +``` +git clone https://github.com/bipinkrish/DeGourou.git +cd DeGourou +pip install -r requirements.txt +python main.py +``` + +--- + +## Credits + +This project is highly inspired from these projects, thanks to them + +1. [DeDrm](https://github.com/apprenticeharper/DeDRM_tools) tools for ebooks +2. [Standalone Version of DeDrm Tools](https://github.com/noDRM/DeDRM_tools) +3. [libgourou](https://indefero.soutade.fr//p/libgourou/) is a free implementation of Adobe's ADEPT protocol] +4. [ACSM Input plugin + standalone](https://github.com/Leseratte10/acsm-calibre-plugin) \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..0368608 --- /dev/null +++ b/main.py @@ -0,0 +1,36 @@ +from setup.login_account import loginAndGetKey +from setup.fulfill import downloadFile + +from decrypt.decodePDF import decryptPDF +from decrypt.decodeEPUB import decryptEPUB + +# setting up the account and keys +loginAndGetKey() + +# acsm file +acsmFile = input("Enter ACSM file (press enter if the file name is URLLink.acsm): ") +if acsmFile == "": + from os.path import exists + if exists("URLLink.acsm"): + acsmFile = "URLLink.acsm" + else: + print("URLLink.acsm file does not exists") + print() + exit(1) + +# downlaod +enrcyptedFile = downloadFile(acsmFile) +print(enrcyptedFile) +print() + +# decrypt +if enrcyptedFile.endswith(".pdf"): + decryptedFile = decryptPDF(enrcyptedFile) +elif enrcyptedFile.endswith(".epub"): + decryptedFile = decryptEPUB(enrcyptedFile) +else: + print("Not in supported file formats") + print() + exit(1) +print(decryptedFile) +print() \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f922ae1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pycryptodomex +oscrypto \ No newline at end of file