HavocFramework / Havoc

The Havoc Framework.
GNU General Public License v3.0
6.31k stars 903 forks source link

Fix font issue in Kali #422

Closed daniruiz closed 8 months ago

daniruiz commented 8 months ago

Kali uses qt5ct to configure themes and fonts for qt apps. The font set has priority by the one set in havoc's code. If you override the variable QT_QPA_PLATFORMTHEME and run havoc client by the command QT_QPA_PLATFORMTHEME= havoc client the issue isn't pressent.

I found that by setting the font in Havoc.qss this is respected by qtct

The package in Kali already provides a patch to fix this for now https://gitlab.com/kalilinux/packages/havoc/-/blob/kali/master/debian/patches/fix-monospace-font.patch?ref_type=heads

S4ntiagoP commented 8 months ago

hey there, can you target the dev branch?

daniruiz commented 8 months ago

hey there, can you target the dev branch?

Done, sorry I didn't realize I did it against main branch

daniruiz commented 8 months ago

At the same time, there are other small patches in Kali to make it work with the packaging https://gitlab.com/kalilinux/packages/havoc/-/tree/kali/master/debian/patches?ref_type=heads

Not all of them have to be copied to upstream, but just in case they help. The most important ones are the patches that move the data folder paths to the user's home directory, in order to be able to write files into it, as the tool is installed under /usr/share/ by the package.

daniruiz commented 8 months ago

I just saw the changes in Havoc.cpp in the dev branch and seems this is already fixed. I'm testing it in Kali and the Monaco font is being applied. So I'm closing this MR, sorry for all the noise :sweat_smile:

S4ntiagoP commented 8 months ago

I actually like your solution better, given that it doesn't rely on timers, please feel free to replace the current approach with your own

daniruiz commented 8 months ago

I've created another MR with a better solution https://github.com/HavocFramework/Havoc/pull/425