Coder Social home page Coder Social logo

navossoc / keepass-yet-another-favicon-downloader Goto Github PK

View Code? Open in Web Editor NEW
533.0 23.0 29.0 552 KB

Yet Another Favicon Downloader for KeePass 2.x

License: MIT License

C# 97.24% Batchfile 2.76%
keepass plugin favicon icons plugins favicon-downloader

keepass-yet-another-favicon-downloader's People

Contributors

4-floss-free-libre-open-source-software avatar henri-j-norden avatar huseyint avatar hypervisorx avatar navossoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keepass-yet-another-favicon-downloader's Issues

Debian 9 + Mono 4.6.2 not work

I try open KeePass 2.39.1 but I see error:

The following plugin is incompatible with the current KeePass version:
/usr/lib/keepass2/Plugins/YetAnotherFaviconDownloader.plgx

Have a look at the plugin'swebsite for an appropriate version.

Fail to find favicon for arran.com

Hi,

YAFD is failing to find the favicon for https://www.arran.com. I believe it should be finding an icon based on the following lines in the <head> block of the site homepage:

<link  rel="icon" type="image/x-icon" href="https://www.arran.com/pub/media/favicon/stores/1/Arran.gif" />
<link  rel="shortcut icon" type="image/x-icon" href="https://www.arran.com/pub/media/favicon/stores/1/Arran.gif" />

Downloading Icons for already downloaded sites?

Hello,

Does this addon download icons for websites where I already have icons for?
Imagine refreshing your whole database.. does this try to download every icon or just the ones where no icon is placed?

What about icon that I placed with another addon from an exe for example? I dont want it to replace them.

This plugin changes Last Modification Time even for entries which it does not modify

Title says it all.

Reproduction:

  1. Create or find an entry with no URL (or which would otherwise fail to provide a favicon)
  2. Right-click -> Download Favicons
  3. YAFD reports "Error" (or "Not Found"), and the entry will not be modified but the entry's Last Modification Time will be updated to the current time.

Expected behavior: the Last Modification Time should not be updated whenever the icon is not updated, i.e. in any of the following situations:

  • Could not find a URL
  • The website has no favicon
  • The website has a favicon, but it hasn't changed since the last time this plugin was used (compare the newly downloaded icon with the existing icon)

Sites with favicons that the plugin doesn't catch

List of sites that are not working currently, but when viewed in a browser (Firefox Nightly current), definitely have a favicon in the tab:

https://www.linuxquestions.org/

http://www.tigerdirect.com/

https://www.classmates.com/

https://www.tirerack.com/

https://www.ghostrecon.net/

I'm not complaining, that's a whole 3 out of several hundred. I'm providing sites in hopes that you can figure out why it is not working and possibly tweak your code to get these sites (and others like them) working :)

Incompatibility with KeePass 2.35

Hi,

I just tried installing the plugin on my KeePass, and here is the message I got on startup :

The following plugin is incompatible with the current KeePass Version: /usr/lib/keepass2/Plugins/YetAnotherFaviconDownloader.plgz
Have a look at the plugin's website for an appropriate version.

Are there any plans to make it work on this version ?

I use Debian Stretch with Mono 4.6.2, and KeePass 2.35 obviously.

Thanks :)

Error report

As suggested on issue #1 by @sergeevabc

Dear Rafael,
is some kind of error report planned (to see how many records and why were failed to get favicon)?

That is a good idea, but, my UX skills are pretty bad ๐Ÿ˜›
I'm accepting suggestions...

[]'s

YAFD force quits Keepass when trying to fetch favicons.

Hello, I'm facing a rather problematic issue:

Steps to reproduce:

If I activate the option to use both Automatic prefix URLs with http:// and Use title field if URL field is empty in the order below:

20181104144920-

20181104142648-

I then mark all items in a specific group (notice the visible columns):

20181104145054-d__passmap kdbx - keepass

and select the option to download:

20181104145327-

Result:

Keepass will suddenly behave as if the entire list is deleted, then the app quit unexpectedly. Luckily, I didn't make any changes to the database during this run, but any unsaved changes is confirmed to be lost if these repro-steps are preformed on an unsaved db.

I'm using it with the following plugins on KeePass 2.40:

plugin Version
KeeChallenge 1.5.0.0
QuickConnectPlugin 0.4.4.0
ExeIconPicker 1.0.2.0
HIBPOflineCheck 1.3.1.0
KeeAnywhere 1.5.1.0
KeePassHttp 1.8.4.2
KeeTrayTOTP 0.9.5.0
PasswordChangeAssistant 1.1.0.0
QualityColumn 1.2.0.0
QuickConnectPlugin 0.4.4.0
YetAnother Favicon Downloader 1.2.0.0

Not working with the latest KeePass

Hello!

I'm using Keepass 2.44 with the Yet-Another-Favicon-Downloader v1.2.4.0.

After placing the file in plugins folder of the KeePass, an error during startup appears.
error

Is there a way to resolve this issue?

Thanks.

Error Log

I have several sites (https://gitlab.com/ffes is one of them) that increase the error counter when I try to download the favicon. But there is no log file for the normal user. Looking at the code I see that Utils.Log() only does something in a DEBUG build.

What would be the easiest way to find out what went wrong while trying to download the favicon from those sites?

Support Icons behind a Basic Auth Flow

Some websites have a Basic Auth implementation that prevents YAFD from grabbing an icon that would be in the HTML after being authenticated. The username and password are already there, so there is no reason not to automatically authenticate when trying to grab the icon.

For obvious security and privacy reasons, this should be behind an option that is disabled to default.

TireRack DOT com

Browser tab shows a favicon, but I CANNOT find it in the source code. I suspect it is loading via JS or some other manner.

Info:

Windows 10 20H2 (19042.804)
KeePass v2.47 x64
YAFD v1.2.4.0

Not working at some sites

Most of the time this plugin works. However, it fails to get favicon from some websites. For example, it hangs on www.bestbuy.com for long time before reporting "Error". During the hang, the cancel button does not interrupt the wait. www.hertz.com does not work with the same symptom. And if I load the page with Firefox, I can clearly see the <rel type="icon"> or <rel type="short icon"> nodes.

Some other sites fail with their login subdomain, but succeeds with the "www" domain. For example, reg.usps.com fails, but www.usps.com is OK. Further, https://www.amazon.com/ap/signin fails, but https://www.amazon.com/ is OK.

[Feature Request] Download favicon from Edit Entry Dialog

It would smooth my workflow if the tools menu in the Edit Entry dialog had a Download favicon option.

Even better would be a button next to the icon selector

Perhaps better would be an automatic update when the URL is entered or changed

Failed to retrieve icon from FlightRadar24

The web site doesn't respond to the usual /favicon.ico but it lists several icons available:

<link rel="apple-touch-icon" sizes="57x57" href="https://www.flightradar24.com/static/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://www.flightradar24.com/static/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://www.flightradar24.com/static/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://www.flightradar24.com/static/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://www.flightradar24.com/static/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://www.flightradar24.com/static/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://www.flightradar24.com/static/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://www.flightradar24.com/static/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://www.flightradar24.com/static/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/svg+xml" href="https://www.flightradar24.com/static/favicons/favicon.svg"/>
<link rel="alternate icon" type="image/png" sizes="192x192" href="https://www.flightradar24.com/static/favicons/android-icon-192x192.png">
<link rel="alternate icon" type="image/png" sizes="32x32" href="https://www.flightradar24.com/static/favicons/favicon-32x32.png">
<link rel="alternate icon" type="image/png" sizes="96x96" href="https://www.flightradar24.com/static/favicons/favicon-96x96.png">
<link rel="alternate icon" type="image/png" sizes="16x16" href="https://www.flightradar24.com/static/favicons/favicon-16x16.png">
<link rel="manifest" href="https://www.flightradar24.com/static/favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="https://www.flightradar24.com/static/favicons/ms-icon-144x144.png">

I'm wondering if YAFD could use one of the options listed.

Direct/Alternate icon field on entries?

Right now I have gamersgate, where I know that https://www.gamersgate.com/favicon.ico exists but the program won't pick it up for some reason. It'd be great if I could add a custom field called FaviconSource to the entry and have it just attempt to download the file there.

Another custom field named something like FaviconSite could be used for when you have a situation where you want the site url to be 'accounts.blah.com' but you want it to take the favicon from 'blah.net' or wherever, just substitute the url and otherwise do the normal thing

recursive download

Feature request: support recursive download, i.e. download Favicons for sites in nested folders.

Stated another way, download icons for entries when "Download Favicons" is selected on a folder containing their parent folders.

Icon not found for iTouchless.com

Entry URL: https://itouchless.com/account/login

Relevant code in the webpage:

  <!-- Favicons
================================================== -->

  <link rel="shortcut icon" href="//cdn.shopify.com/s/files/1/0399/5942/9281/t/4/assets/favicon.png?v=15106769190101230059">

The icon is actually a WebP image, which KeePass does not natively support. When manually importing, I had to convert it to a PNG as a workaround.

Translations?

Is it possible to make this plugin translatable? KeePass offers language files for itself, but does this also work with plugins? Do plugins have to implement their own translation handling?

[Enhancement] release Releases on Repository of Chocolatey packages

Hello, this is not an issue in itself. Just an suggestion. Would be nice to have a auto update feature for this primary security applications plugin from trusted source. The sha256 hash of PLRGX can be verified by installation automatically optionally if specified. For the lazy ones :) and to fix incompatibility issue with future of keepass version updates with plugin by getting all in one place for example.

I don't know if you have the spare time to maintain in parallel the "packages". Which basically would contains a script to URL of github latest release asset.

If you may want to take a look here if you don't know already:
keepass plugins packages
(There are many plugins and packages count is growing. )

Context menu hotkey

Hi, I love your alternate favicon DL plugin - it works really well on my database, and I'm using it to replace all the icons for my myriad of PWs in my database.

To make this a bit easier, I'd like to put in a RFF for allowing the plugin to claim the context menu hotkey of F (from _F_avicon) in order to make the process of updating favicons of a lot of entries a lot easier.

TLS 1.2 with .Net 2.0 possible

If you still want to support .Net 2.0 and use TLS 1.2, you can use this code.
I'm using it in my own KeePass Favicon Downloader.

// Only available from .Net 4.5+ // System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12;

const System.Security.Authentication.SslProtocols _Tls12 = (System.Security.Authentication.SslProtocols)0x00000C00; const System.Net.SecurityProtocolType Tls12 = (System.Net.SecurityProtocolType)_Tls12; System.Net.ServicePointManager.SecurityProtocol = Tls12;

You can close this bug anytime.

Check for update results in an error

The "Check for update" function in KeePass returns an error for this plugin. In the Update check dialog it lists current version ok, but for available version is says "Update check failed. Version information file cannot be downloaded".

[Feature Request] Option to download icons only of a specific size (16x16px, 32x32px, etc.)

Current Situation
When downloading favicons with the YAFD-Plugin, some downloaded icons have a size of 16x16 pixels, some have 48x48 pixels, some even have 256x256 pixels. However, KeePass displays icons only at the size of 16x16 pixels (or 32x32px if users have a 4k display). This makes the database file increase dramatically in size without any benefit. Most websites offer a great variety of favicon sizes to download in their HTML source code, so there's no need for YAFD to always download the largest one.

Requested feature
Give users the option (via a customizable setting/dropdown-list somewhere in the YAFD configuration section) to download only favicons of a specific size. Users should be able to choose between the following sizes: 16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 192x192, 256x256, 512x512, 1024x1024.

Benefits
Users would be able to download only the specific icon sizes that fit best for their display resolution (2k standard resolution, 4k, 5k, 8k etc.). Also, the database file would stay at a reasonable small file size, because unnecessary large icons (like 256x256) would not be downloaded if the user chose to download only 32x32px favicons.

Thanks!

Neverware Zendesk site

Neverware (now owned by Google) has a ZenDesk site for FAQs and questions about their Neverware CloudReady Chrome OS for home, education and enterprise users. URL: https://neverware.zendesk.com/hc/en-us (English). YAFD cannot find favicon seen in browser tab, but source search finds it:

"//theme.zdassets.com/theme_assets/187734/df7ad117882f0a0b8d3b4b06b43b09bb29ada9e3.png"

Info:

Windows 10 20H2 (19042.804)
KeePass v2.47 x64
YAFD v1.2.4.0

Support Additional Plugins

It would be nice to see support for other plugins that handle "urls".

For example, KeePassRPC allows storing additional URLs in a json encoded string on the entry, which allows you to have multiple urls for a single entry.

Additional, the Keepass2Android application uses KP2A_URL and KP2A_URL_# (When KP2A_URL is already used) fields on the entry to store additional urls.

This could be handled with a "First in, First Out" approach, in the sense that once an icon has been found you can ignore the remaining urls.

Version 2

Well, I was postponing this moment, but the time has come ๐Ÿฅณ

We have a bunch of issues open right now and I'm not happy with that.
@JohnLGalt you have your share of blame ๐Ÿคฃ

My goal now is to discuss a few ideas/suggestions/changes for a major rewrite of this plugin.

I'll try to sum up the major points of the rewrite on this issue:

  • TLS 1.3 support
  • HTTP/2, HTTP/3 or whatever it is coming...
  • Certification Authorities (ca-certificates)
  • .NET/Mono issues (slow rolling updates/depends of the OS)

Why you want to do this?
First of all, a little bit of history:
The plugin I was using (Favicon Downloader) to download favicons was starting to show some incompatibility problems, like the ones we are seeing here today (can't connect to the site, can't find the favicon, etc).

So I decided to create this plugin as a hobby project since I wanted to learn how KeePass plugins worked (why not? ๐Ÿ˜•).

Then I targeted a very low version of .NET to make it as much compatible as possible, but it didn't go well, since to communicate with some sites, we need newer versions to get access to newer versions of protocols/ciphers.

And despite my best efforts, we kind of came to a halt.
The web continues to evolve, but .NET / mono has not kept pace with that evolution.

My goal
My plan for this version is to remove the "favicon finder logic" from the plugin itself, so we will no longer be so much dependent on .NET to connect to unknown websites.
We will have a simple service that given a certain URL, it will return us a list of possible favicons.

Of course, it would still be possible to try to do all of this within .NET with C#, but it would be necessary to go after external libraries and test in multiple environments to ensure that it would work as expected.

From my little experience with .NET/Mono, I saw that there are actually some incompatibilities that are somewhat difficult to get around as they depend on a number of external factors (like update installed on the operational system).

Therefore, I intend to defend the idea of separating the favicon search service in an external process that can be updated with greater speed and that does not interfere with the KeePass plugin.

This would also bring more benefits such as greater security, since the processing of the pages / images would be done in an external process.
We can also start thinking on internationalization (translations), newer features, etc...

Also, if you have a better idea, let me know! I'll be glad to hear.

I will start working on this new version in my spare time starting on March 27th.

So if you feel like, you can jump on this discord channel I've created to say hi and share your thoughts ๐Ÿ˜„

Of course, you can interact here as well, but on discord things normally moves faster.

[]'s

Custom Icons with Names >=KDBX 4.1 KeePass 2.48

With KeePass 2.48 a new database format version was introduced, that supports icon names.

It would be nice to have support for this.
I could think of using the domain name, the favicon was fetched from, for the icons name. So that you can prevent duplicate redundancy icon storage in db for multiple entry or account of same domains. Or if you start favicon download, to fallback to lookup for existing icons that match Name to the domain part if LastModificationTime is not too old.

Error downloading any icons

I would love to give you debug output, but I have not been able to find ANY documentation pointing as to where keepass2 places logs.
I'm running Keepass 2.38 with YAFD v1.2.2.0 on Linux Mint 19.2 x64
Latest mono dev and certificates installed and confirmed.
All https urls are failing. http and https
If you can point me in the direction of logs, I can add that here.

Latest Release Missing .plgx file?

I downloaded the latest release, but unless I'm missing something, it doesn't contain the YetAnotherFaviconDownloader.plgx file.

Am I looking in the wrong place, or did something change?

Some favicon are not downloaded

Hello,

Thank you for your plugin, it helps me very well.
I used it for all entries of my keepass database. I use Linux.
However some favicon was not downloaded.
Are you interested of a web site list where it does not work ?

Regards.

Add http://

Almost all urls in my database added without "http://" or "https://" at the beggining
The plugin should be able to handle it of course without any modification to the url entries in the database

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.