Rovango / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Example of loading browser contents from virtual in-memory filesystem (eg. zip file, possibly AES encrypted) #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It is required to implement CefSchemeHandler to be able to load content from 
custom scheme.

Next step is to implement AES encryption/decryption using custom key, a tool 
for encryption would be useful. For an example of AES encryption analyze  
Asterclick WBEA sources: http://asterclick.drclue.net/WBEA.html

See this post on CEF forum where I explained how it works:
http://magpcss.org/ceforum/viewtopic.php?f=6&t=3564#p7179

Original issue reported on code.google.com by czarek.t...@gmail.com on 27 Sep 2012 at 7:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
When "RequestHandler.OnBeforeResourceLoad" is implemented, I can use Python's 
ZipFile.read() to get the bytes of the requested file.  That should produce a 
usable stream.  If not the results would need to be converted to a compatible 
stream.

Original comment by rich...@gmail.com on 30 Nov 2012 at 3:57

GoogleCodeExporter commented 8 years ago
Here's an example of zip file extraction.  Not a stream as will be needed for 
the callback, but a start.  
It only works with ZipCrypto encryption and not AES-256.  I have not yet 
figured out how to encrypt(save) with a password.

Original comment by rich...@gmail.com on 1 Dec 2012 at 3:50

Attachments:

GoogleCodeExporter commented 8 years ago
We already have a ready code in c++, so don't bother unless you can do the same 
in Python (AES encryption, decryption with password).

AES c++ library, very small only 2 files, easy to implement:
http://www.lomont.org/Software/Misc/AES/AES.php

An example code of how to use it can be found in WBEA, see also CEF forum link, 
code snippets are over there.

Original comment by czarek.t...@gmail.com on 1 Dec 2012 at 3:56

GoogleCodeExporter commented 8 years ago
With Cython we can use C++ libraries easily, so that's not a big problem, but 
of course if you could do the same in Python then that would be great, as with 
c++ we have to compile a static library for each of the operating systems 
(currently only windows, but linux and mac are coming).

Original comment by czarek.t...@gmail.com on 1 Dec 2012 at 3:58

GoogleCodeExporter commented 8 years ago
There are other libs in Python for encryption, and the built-in module ZLIB 
should be able to handle AES.  I'll look further into it and report back.

Original comment by rich...@gmail.com on 3 Dec 2012 at 5:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
In CEF 3 the ResourceHandler API can be used instead of CefSchemeHandler.

Original comment by czarek.t...@gmail.com on 19 Jan 2015 at 6:20

GoogleCodeExporter commented 8 years ago
Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/17

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:25