New approach to Android backup files. Changed version number to 6.3.1

This commit is contained in:
apprenticeharper
2015-08-02 11:09:35 +01:00
parent f5e66d42a1
commit aa822de138
24 changed files with 158 additions and 105 deletions

View File

@@ -42,6 +42,7 @@ __docformat__ = 'restructuredtext en'
# 6.2.1 - Fix for non-ascii Windows user names
# 6.2.2 - Added URL method for B&N/nook books
# 6.3.0 - Added in Kindle for Android serial number solution
# 6.3.1 - Version number bump for clarity
"""
@@ -49,7 +50,7 @@ Decrypt DRMed ebooks.
"""
PLUGIN_NAME = u"DeDRM"
PLUGIN_VERSION_TUPLE = (6, 3, 0)
PLUGIN_VERSION_TUPLE = (6, 3, 1)
PLUGIN_VERSION = u".".join([unicode(str(x)) for x in PLUGIN_VERSION_TUPLE])
# Include an html helpfile in the plugin's zipfile with the following name.
RESOURCE_NAME = PLUGIN_NAME + '_Help.htm'

View File

@@ -30,7 +30,7 @@ Fetch Barnes & Noble EPUB user key from B&N servers using email and password
"""
__license__ = 'GPL v3'
__version__ = "1.0"
__version__ = "1.1"
import sys
import os
@@ -101,23 +101,23 @@ class IGNOBLEError(Exception):
pass
def fetch_key(email, password):
# change name and CC numbers to utf-8 if unicode
# change email and password to utf-8 if unicode
if type(email)==unicode:
email = email.encode('utf-8')
if type(password)==unicode:
password = password.encode('utf-8')
import random
random = "%030x" % random.randrange(16**30)
import urllib, urllib2, re
# try the URL from nook for PC
fetch_url = "https://cart4.barnesandnoble.com/services/service.aspx?Version=2&acctPassword="
fetch_url += urllib.quote(password,'')+"&devID=PC_BN_2.5.6.9575_"+random+"&emailAddress="
fetch_url += urllib.quote(email,"")+"&outFormat=5&schema=1&service=1&stage=deviceHashB"
#print fetch_url
found = ''
try:
req = urllib2.Request(fetch_url)
@@ -133,13 +133,13 @@ def fetch_key(email, password):
fetch_url += urllib.quote(password,'')+"&devID=hobbes_9.3.50818_"+random+"&emailAddress="
fetch_url += urllib.quote(email,"")+"&outFormat=5&schema=1&service=1&stage=deviceHashB"
#print fetch_url
found = ''
try:
req = urllib2.Request(fetch_url)
response = urllib2.urlopen(req)
the_page = response.read()
#print the_page
#print the_page
found = re.search('ccHash>(.+?)</ccHash', the_page).group(1)
except:
found = ''
@@ -169,6 +169,7 @@ def cli_main():
def gui_main():
try:
import Tkinter
import tkFileDialog
import Tkconstants
import tkMessageBox
import traceback

View File

@@ -33,13 +33,14 @@ from __future__ import with_statement
# 2.5 - Additional improvement for unicode and plugin support
# 2.6 - moved unicode_argv call inside main for Windows DeDRM compatibility
# 2.7 - Work if TkInter is missing
# 2.8 - Fix bug in stand-alone use (import tkFileDialog)
"""
Generate Barnes & Noble EPUB user key from name and credit card number.
"""
__license__ = 'GPL v3'
__version__ = "2.7"
__version__ = "2.8"
import sys
import os
@@ -240,6 +241,7 @@ def gui_main():
import Tkinter
import Tkconstants
import tkMessageBox
import tkFileDialog
import traceback
except:
return cli_main()

View File

@@ -323,8 +323,8 @@ def cli_main():
serials = a.split(',')
if o == '-a':
if a == None:
continue
androidFiles.apprend(a)
raise DrmException("Invalid parameter for -a")
androidFiles.append(a)
# try with built in Kindle Info files if not on Linux
k4 = not sys.platform.startswith('linux')