View Single Post
Old 01-14-2017, 05:37 PM   #11
kido.resuri
Groupie
kido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura aboutkido.resuri has a spectacular aura about
 
Posts: 172
Karma: 4282
Join Date: Dec 2016
Location: Hungary
Device: Kobo Aura H2O
I made some early progress with this, I was able to get data from kobostore, the respond for initialization request is the following (formatted to be more readable, it is really one line):
Code:
{
"Resources":
{
"user_profile":"https://storeapi.kobo.com/v1/user/profile",
"checkout_borrowed_book":"https://storeapi.kobo.com/v1/library/borrow",
"library_sync":"https://storeapi.kobo.com/v1/library/sync",
"library_items":"https://storeapi.kobo.com/v1/user/library",
"add_entitlement":"https://storeapi.kobo.com/v1/library/{RevisionIds}",
"delete_entitlement":"https://storeapi.kobo.com/v1/library/{Ids}",
"tags":"https://storeapi.kobo.com/v1/library/tags",
"autocomplete":"https://storeapi.kobo.com/v1/products/autocomplete",
"user_reviews":"https://storeapi.kobo.com/v1/user/reviews",
"user_ratings":"https://storeapi.kobo.com/v1/user/ratings",
"user_recommendations":"https://storeapi.kobo.com/v1/user/recommendations",
"taste_profile":"https://storeapi.kobo.com/v1/products/tasteprofile",
"fte_feedback":"https://storeapi.kobo.com/v1/products/ftefeedback",
"featured_lists":"https://storeapi.kobo.com/v1/products/featured",
"category":"https://storeapi.kobo.com/v1/categories/{CategoryId}",
"exchange_auth":"https://storeapi.kobo.com/v1/auth/exchange",
"device_auth":"https://storeapi.kobo.com/v1/auth/device",
"device_refresh":"https://storeapi.kobo.com/v1/auth/refresh",
"post_analytics_event":"https://storeapi.kobo.com/v1/analytics/event",
"user_loyalty_benefits":"https://storeapi.kobo.com/v1/user/loyalty/benefits",
"reading_state":"https://storeapi.kobo.com/v1/library/{Ids}/state",
"library_metadata":"https://storeapi.kobo.com/v1/library/{Ids}/metadata",
"update_accessibility_to_preview":"https://storeapi.kobo.com/v1/library/{EntitlementIds}/preview",
"rename_tag":"https://storeapi.kobo.com/v1/library/tags/{TagId}",
"delete_tag":"https://storeapi.kobo.com/v1/library/tags/{TagId}",
"quickbuy_create":"https://storeapi.kobo.com/v1/store/quickbuy/purchase",
"product_reviews":"https://storeapi.kobo.com/v1/products/{ProductIds}/reviews",
"review":"https://storeapi.kobo.com/v1/products/reviews/{ReviewId}",
"product_recommendations":"https://storeapi.kobo.com/v1/products/{ProductId}/recommendations",
"product_nextread":"https://storeapi.kobo.com/v1/products/{ProductIds}/nextread",
"product_prices":"https://storeapi.kobo.com/v1/products/{ProductIds}/prices",
"book":"https://storeapi.kobo.com/v1/products/books/{ProductId}",
"book_subscription":"https://storeapi.kobo.com/v1/products/books/subscriptions",
"featured_list":"https://storeapi.kobo.com/v1/products/featured/{FeaturedListId}",
"category_featured_lists":"https://storeapi.kobo.com/v1/categories/{CategoryId}/featured",
"category_products":"https://storeapi.kobo.com/v1/categories/{CategoryId}/products",
"library_prices":"https://storeapi.kobo.com/v1/user/library/previews/prices",
"library_book":"https://storeapi.kobo.com/v1/user/library/books/{LibraryItemId}",
"library_stack":"https://storeapi.kobo.com/v1/user/library/stacks/{LibraryItemId}",
"tag_items":"https://storeapi.kobo.com/v1/library/tags/{TagId}/Items",
"quickbuy_checkout":"https://storeapi.kobo.com/v1/store/quickbuy/{PurchaseId}/checkout",
"rating":"https://storeapi.kobo.com/v1/products/{ProductId}/rating/{Rating}",
"authorproduct_recommendations":"https://storeapi.kobo.com/v1/products/books/authors/recommendations",
"external_book":"https://storeapi.kobo.com/v1/products/books/external/{Ids}",
"remaining_book_series":"https://storeapi.kobo.com/v1/products/books/series/{SeriesId}",
"content_access_book":"https://storeapi.kobo.com/v1/products/books/{ProductId}/access",
"delete_tag_items":"https://storeapi.kobo.com/v1/library/tags/{TagId}/items/delete",
"review_sentiment":"https://storeapi.kobo.com/v1/products/reviews/{ReviewId}/sentiment/{Sentiment}",
"products":"https://storeapi.kobo.com/v1/products",
"categories":"https://storeapi.kobo.com/v1/categories",
"image_host":"//kbimages1-a.akamaihd.net/",
"store_host":"store.kobobooks.com",
"store_home":"store.kobobooks.com/{language}-{region}",
"social_authorization_host":"https://social.kobobooks.com:8443",
"social_host":"https://social.kobobooks.com",
"discovery_host":"https://discovery.kobobooks.com",
"eula_page":"https://www.kobo.com/termsofuse?style=onestore",
"password_retrieval_page":"https://www.kobobooks.com/passwordretrieval.html",
"sign_in_page":"https://secure.kobobooks.com/auth/login?redirectUrl=https://store.kobobooks.com/",
"facebook_sso_page":"https://secure.kobobooks.com/auth/Facebook/sso",
"store_search":"https://store.kobobooks.com/{culture}/Search?Query={query}",
"store_top50":"https://store.kobobooks.com/{culture}/ebooks/Top",
"store_newreleases":"https://store.kobobooks.com/{culture}/List/new-releases/961XUjtsU0qxkFItWOutGA",
"registration_page":"https://secure.kobobooks.com/auth/register?redirectUrl=https://store.kobobooks.com/",
"privacy_page":"https://www.kobo.com/privacypolicy?style=onestore",
"stacks_host_productId":"https://store.kobobooks.com/collections/byproductid/",
"book_detail_page":"https://store.kobobooks.com/{culture}/ebook/{slug}",
"book_detail_page_rakuten":"http://books.rakuten.co.jp/rk/{crossrevisionid}",
"book_landing_page":"https://store.kobobooks.com/ebooks",
"magazine_landing_page":"https://store.kobobooks.com/emagazines",
"purchase_buy":"https://store.kobobooks.com/purchase/buy/",
"purchase_buy_templated":"https://store.kobobooks.com/{culture}/purchase/buy/{ProductId}",
"love_points_redemption_page":"https://store.kobobooks.com/{culture}/KoboSuperPointsRedemption?productId={ProductId}",
"categories_page":"https://store.kobobooks.com/ebooks/categories",
"redeem_interstitial_page":"https://store.kobobooks.com",
"love_dashboard_page":"https://store.kobobooks.com/{culture}/kobosuperpoints",
"help_page":"http://www.kobo.com/help",
"image_url_template":"https://kbimages1-a.akamaihd.net/{ImageId}/{Width}/{Height}/false/image.jpg",
"image_url_quality_template":"https://kbimages1-a.akamaihd.net/{ImageId}/{Width}/{Height}/{Quality}/{IsGreyscale}/image.jpg",
"customer_care_live_chat":"https://kobo.frontlinesvc.com/app/chat/chat_landing/email/{UserEmail}",
"free_books_page":
{
"EN":"https://store.kobobooks.com/{culture}/p/free-ebooks",
"FR":"https://store.kobobooks.com/{culture}/p/livres-gratuits",
"IT":"https://store.kobobooks.com/{culture}/p/libri-gratuiti",
"NL":"https://store.kobobooks.com/{culture}/p/gratis-boeken",
"PT":"https://store.kobobooks.com/{culture}/p/livros-gratis",
"ES":"https://store.kobobooks.com/{culture}/p/libros-gratis",
"DE":"https://store.kobobooks.com/{culture}/p/kostenlose-ebooks",
"TR":"https://store.kobobooks.com/{culture}/p/ucretsiz-kitap"
},
"use_one_store":"False",
"kobo_superpoints_enabled":"False",
"kobo_onestorelibrary_enabled":"False"
}
}
Looking at the above, it is very similar to the links in the Kobo config file, but a bit more.
The response for the library_sync is (again, formatted):
Code:
[
{
"NewEntitlement":
{
"BookEntitlement":
{
"ActivePeriod":
{"From":"2016-12-27T00:43:44.0000000Z"},
"IsRemoved":false,
"Status":"Active",
"Accessibility":"Full",
"CrossRevisionId":"<there was some id here>",
"RevisionId":"<there was some id here>",
"IsHiddenFromArchive":false,
"Id":"<there was some id here>",
"Created":"2016-12-27T00:43:44.0000000Z",
"LastModified":"2016-12-27T00:43:44.0000000Z",
"IsLocked":false,"OriginCategory":"Free"},
"ReadingState":{"EntitlementId":"<there was some id here>",
"Created":"2016-12-27T00:43:44.0000000Z",
"LastModified":"2016-12-27T00:43:44.0000000Z",
"StatusInfo":{"LastModified":"2016-12-27T00:43:44.0000000Z",
"Status":"Undefined",
"TimesStartedReading":0},
"Statistics":
{"LastModified":"2016-12-27T00:43:44.0000000Z"},
"CurrentBookmark":{"LastModified":"2016-12-27T00:43:44.0000000Z"},
"PriorityTimestamp":"2016-12-27T00:43:44.0000000Z"},
"BookMetadata":
{"CrossRevisionId":"<there was some id here>",
"RevisionId":"<there was some id here>",
"Publisher":{"Name":"","Imprint":""},
"Language":"en",
"Isbn":"1990001706406",
"Slug":"english-hungarian-dictionary-angol-magyar-szotar",
"CoverImageId":"c0ffee00-0000-0000-0000-000000000000",
"IsSocialEnabled":true,
"WorkId":"<there was some id here>",
"ExternalIds":[],"IsPreOrder":false,
"EntitlementId":"<there was some id here>",
"Title":"English-Hungarian Dictionary: Angol-magyar szĂłtĂĄr",
"Description":"",
"Categories":[],
"DownloadUrls":
[
{
"DrmType":"None",
"Format":"PDF",
"Url":"http://storedownloads.kobo.com/download?downloadToken=eyJ0eXAiOjIsInZlciI6IjEiLCJwdHlwIjoiQ2xpZW50QVBJRG93bmxvYWRUb2tlbiJ9.WpgGHsQlcKMKpr6j3cd1xw.nXBd4aYCRCrzO2yqbXOB6fckaJN8WMGEUyVH_G9-WGLIv7qUy3jOyASHthHfHtzYg1lLxnaY3WZ18PEU9tf2M0CWts7XIFuEK_U5WRiJPyL2r0epJKnQHXiYMw0eL9cGue8j5j4KPosOQF19pSLbYHSBESNRDna34WaPr1M40g-Hdxom2B4wIpdmEi5gGNVpApU6My1TZPqWZ9yQs_jhtaiMVLCl-N0lRZNKOhoEal5diHbRPdbt7CfOiuVeGnircKL_CSyrd18bHQcUQkPH1GglQQ54LW7b7jl50wjVZGLNUkup988YFo6ToTbCznz74zroFEkby3uehAJgkqe2csdKsJLw-ndKfvBE-o2cnVjlCKBBRn63fWTmMLhfTaRkVB7G3VYlhZFxbdmgG0n8iMbzFK-8aOkj_w5dEIgYEg57GvR1euuyhF4VpSyGUDE9NH9hdoWVk2e42A1Flbe0l-vkSQyjTKxpMYM5kPyBCIMirxQ3fuTjU5evMrj35mTFhUwdJTI7vv64pEcwA2bC8A",
"Platform":"Generic","Size":0},
{
"DrmType":"None",
"Format":"EPUB",
"Url":"http://storedownloads.kobo.com/download?downloadToken=eyJ0eXAiOjIsInZlciI6IjEiLCJwdHlwIjoiQ2xpZW50QVBJRG93bmxvYWRUb2tlbiJ9.tvqUq_oRftclStLFqMWODg.Xfl-s8oUIns9kKTmKnYbXHwtEv9Dq5PLbKQo2XMLx3ruCMgHwwZ-PKo8p4JAnK5U8q6n0OY6YKdIfoiFKg_HWkuOa3n0Y7Slk884_LPDtI2PqDtfuFxES8mrc_JNDNxL3ornuxBj0FOHBeTQ3ItV3x5lFhlFfFQW1oQkqLAKXJOg8-lwn5Atc9iZQ4q2XwRhYG0QnHBCdDT9hQTt76kmRc-tfAaE3crfIxNsc3eJSkTURPEALC6UQv0BQMLDJ9YEqfM5XqkLMqPqWQhuXNjicB_j9QwmeTR4kmmAARfQAt8ZRsPlGmBirNBSRhFNTeDs06u0fNCn1he5qeOSWt4Ln3nmmTwJ8HUg39MMx02OI7Pbg0QomsB7jKxNUFzAjmghqdriQEnYyUbYNp6V4ldfUfyfr7ySMgB1ZA2N5L9_oawldJepQD5SnkzeEo98aqCG9xM0V3rLW_CYLMNQ0FK2mPhSnGJLTqebjV3fUNbNg8DrEO_gkbb-IL7EzCjDSELNwCJQkqZUtB4reil3CWedUQ",
"Platform":"Generic",
"Size":0
}
],
"Contributors":["Ferencz Bizonfy"],
"Series":{},
"CurrentDisplayPrice":
{
"TotalAmount":0,
"CurrencyCode":""
},
"CurrentLoveDisplayPrice":
{"TotalAmount":0},
"IsEligibleForKoboLove":false,
"PhoneticPronunciations":{}}}}
]
As you can see from the above, there is the actual download link for the book (don't worry, this is a free, DRM-free e-book from the kobo bookstore). I'm expecting this to be hijacked by a custom webserver, pretty easily maybe.

Now, the Kobo starts the sync with some https request to some url not shown in the config, but is somewhere in the kobobooks.com domain, this is what i'm reverse engineering now, without this, it won't ask for the init.

More updates to come later...
kido.resuri is offline   Reply With Quote