Access data from sqlite db in Google chrome Extension - c++

I am creating a Google chrome Extension in this extension I want to access(query) data from "SqliteDb".The SqliteDb placed in Temp folder.
How will i do this.please suggest me.if have any need of using plugins then provide me link.
Thanks

I'm rather confused; to me this seems pretty obvious. If you want to access sqlite from a NPAPI plugin (which you can then use from inside a chrome extension) you need to embed the sqlite libary.
There should be no reason that you can't use normal C (or C++) libraries for database access from within your plugin.

Related

Upload Edge extension to web store with existing extension ID

We are porting our Chrome extension to Edge and our extension already has an extension ID that our native messaging applications rely on.
In Chrome you have control over the id of the newly created extension by including the "key.pem" file in the first upload of the extension package. But that is not working in the Edge Store, it seems to always create a new extension ID.
Is there a way to force the store to use our existing extension ID?
Is your native message application rely on chrome.runtime.connectNative application?
If yes, I suggest you set allowedorigins to "extension://[Microsoft-Catalog-extensionID]" in your native messaging host manifest file.
So I think you have to use Microsoft-Catalog-extensionID and you can't use that existing extension Id.
I go this information in the documentation.
If your Extension exchanges messages with a native application using
chrome.runtime.connectNative API, ensure that you set allowedorigins
to "extension://[Microsoft-Catalog-extensionID]" in your native
messaging host manifest file. This enables the app to identify the
Extension.
Reference:
Port Chrome Extension To Microsoft (Chromium) Edge

Where are Postman collections saved?

Where does the standalone Postman client for Windows save collections when working offline?
To clarify, I want to find where Postman saves collection files to by default when online syncing is disabled. I am not trying to export my collection as a JSON file.
I've looked in %LocalAppData%, My Documents, and Program Files, but I don't see where Postman saves its collection data.
It looks like Postman uses LevelDB. On Windows, I found my Postman DB located at:
%HOMEPATH%\AppData\Roaming\Postman\IndexedDB\
ps: %HOMEPATH% is path for C:\Users\xxxx\
also worth mentioning: %APPDATA% is a shortcut for C:\Users\xxxx\AppData\Roaming\
According to Piere F, macOS users can find it under:
~/Library/Application Support/Postman/IndexedDB
ps: Note ~ is path for /Users/userAccount/
According to David, Ubuntu users can find it under:
~/.config/Postman/IndexedDB
Postman is using Chromium offline storage capabilities because at the end it's a SPA running inside Chromium (Electron technology).
From Postman's top menubar:
Select View → Show Dev Tools
Select the Application tab
In the sidebar, open Storage → IndexedDB → postman - file:// → collection_requests
In windows, postman v9.6.2 I was able to restore collections by pasting the IndexedDB folder in the following path:
\AppData\Roaming\Postman\Partitions\<GUID>\
On Mac: The json files were automatically backed up (/Users//Library/Application Support/Postman/backup-YYYY-MM-DDTHH:mm:ss.SSSZ.json) but it is not documented anywhere.
You just have to reimport them
This support documentation helped me recover my collections after the postman application stopped working.
https://support.postman.com/hc/en-us/articles/360035071313-How-to-recover-my-data-
If you weren't logged in to the app and using it offline or in the
Scratch Pad mode then your data won't get synced to our servers and
stays local to your instance. In this case, try following the steps
below:
Look for the backup files under the following folder:
%appdata%\Postman\​for Windows ~/Library/Application
Support/Postman​for macOS ~/.config/Postman​ for Linux
Backup file names will be similar to
backup-2020-02-26T23-13-43.082Z.json (date or time will be different
for you).
Alternatively, if you just want to look at the collection, you can export it into json format from the collection menu.
We work offline. So for Postman Scratchpad (official offline usage):
On Windows: %HOMEPATH%\AppData\Roaming\Postman\Partitions\
On Mac: ~/Library/Application Support/Postman/Partitions/
Simply backup or share the entire directory when you want to synch.
For the version Postman from Google Chrome extension, you need copy all files from path:
"%LOCALAPPDATA%\Google\Chrome\User Data\Default\Storage\ext\fhbjgbiflinjbdggehcddcbncdddomop\def\IndexedDB\chrome-extension_..."
The files inside path above contains all history and collections from Postman
Linux Chrome or Chromium Postman extension storage path Location
/home/{USER}/.config/chromium/Default/Storage/ext/fhbjgbiflinjbdggehcddcbncdddomop/
Thanks.
If you are using a snapped Postman on Linux, let me save you some time.
Copy all the content from your source snapped Postman UNDER (as the target GUID can be different)
/home/username/snap/postman/<id>/.config/Postman/Partitions/<standalone GUID>
to your target snapped Postman UNDER
/home/username/snap/postman/<a different id>/.config/Postman/Partitions/<a different standalone GUID>
Make sure you respect the target postman id and partition GUID.
Win10:
You have to back up your old Postman
C:\Users%user%\AppData\Roaming\Postman\IndexedDB
Then copy it to the same location of the new Postman installation.
This will recover all your collections.
In Debian-like systems, using Postman v7, I found a backup of all the collections and environments saved as JSON in ~/.config/Postman with the prefix backup-.
eg: ~/.config/Postman/backup-timestamp.json
Also, found a recent support article in Postman documentation:
How to recover my data
Windows 10, I copy these folder to another and worked.
C:\Users<username>\AppData\Local\Google\Chrome\User Data\Default\IndexedDB\chrome-extension_coohjcphdfgbiolnekdpbcijmhambjff_0.indexeddb.leveldb

download and run exe from chrome browser using c++ plugin

I have a webpage where when I click a button, it should download an exe from a url and the exe should get automatically invoked without user intervention.
In Internet Explorer I achieved this through activex control ( .ocx ) deployed as a .cab file.
I am planning to extend this to chrome and firefox platform too. ( atleast chrome for the first step ).
I don't want to use Java applet ( need to remove java dependency ). I know I could achieve this through Firebreath plugin but clearly this is not a good time to dive into NPAPI plugin ( since NPAPI is already being fading out. Chrome has begun phasing out NPAPI ).
When I looked into alternative Plugin technologies to NPAPI, I stumbled upon Google Native Client. On further reading I got to know Nacl too won't fit my needs since os calls api will not work in nacl ( I hope URLDownloadToFile api or createprocess or shellexecute wouldn't work. Correct me if I am wrong ).
Should I go for Native Messaging? Is there anyother alternative technology am missing ? Guide me Please .
NPAPI until it goes away will let you do what you want; other than that Native Messaging is the only option.
As others have mentioned, this is a Really Bad Idea(tm).
Thanks all the people . I finally settled with Launch Application Using Custom Protocol Handler . http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx . This fitted my needs .
As suggested above, Chrome's native messaging appears to be the way to go - on Chrome.
First, have a look here: This blog entry shows that native messaging can be used to launch "calc.exe". I've yet to try it myself - but it looks promising:
https://plus.google.com/+FrancoisBeaufort/posts/jdTrmmZL9Xh
One thing to keep in mind is that the Native Messaging technique will only work from a Chrome Extension, which opens up an entire set of related questions.
(1) Can Chrome extensions be installed for all users using group policy? or via the registry?
-Yes, according to http://www.chromium.org/administrators/pre-installed-extensions
Later edit: only "published" extensions can be added via the registry. see - https://developer.chrome.com/extensions/external_extensions
(2) Can you detect whether an extension is already installed?
-Yes, Chrome Extension: How to detect if an extension is installed using Content Scripts
So maybe its possible to have a two-phase process:
-Your users will head to the web page, which will test for the extension (using #1 above)
-If its not there, have the users download and install the .exe (this will require interaction).
-The .exe will deploy the extension files and register it for Chrome (using #2 above)
-On subsequent visits, the already-installed extension can be used to launch/communicate with the now-already-installed .exe (using Native Messaging)

Download URL history of IE9 and IE10

I want to know where does the Internet Explorer stores the history for the downloads (urls).
Does it keep it in some DB files like Firefox and Chrome? Or does it store it in Registry?
The use of the term "Downloads" is a bit ambiguous-- do you mean "File downloads" or "All content downloaded by the browser including images, CSS, JS, etc)?
Internet Explorer stores virtually all of its records in databases (IE9 and below use memory-mapped files named index.dat, while IE10+ use a proper database engine).
You should not attempt to manually interact with index.dat or the database; instead, you should use the appropriate APIs (e.g. the WinINET cache APIs or the IE History APIs) to collect data as needed.

Using box.net, dropbox, (OR ANY cloud storage) with a C++ application

How do you use cloud storage such as Dropbox in your C++ Apllication ? I've checked out their API and they only have Java, Python, and Ruby options. If you cant use dropbox with a c++ app, is therte any cloud storage provider that has an API for C++.
The drop box APIs seem to be wrappers for a http interface.
So if you want to hit them up from C++ you can use a http supporting library like libcurl to access stuff using the REST api
Droper is an open source C++/Qt Dropbox client that I have recently wrote. It can be compiled for Windows and Linux, but the GUI is optimized for Symbian mobile phones. Check it out.
I've found several differnet APIs on their website, righ under the place you propably found the ruby / pathon stuff..
http://sharpbox.codeplex.com/
http://github.com/dkarzon/DropNet
Not sure if this is, wha you were looking for..