The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

How can I get current burp theme using jython?

Alperen | Last updated: Sep 02, 2024 11:05PM UTC

Is there any way to get current theme of burpsuite using jython? I tried following method and I got some erros. def currentTheme(self): theme = self.callbacks.getUiPreferences().getTheme() print("Current Theme: {}".format(theme)) return theme Erros: Error: 'burp.Zkw1' object has no attribute 'getUiPreferences' Error: 'burp.Zkw1' object has no attribute 'getUiPreferences'

Alperen | Last updated: Sep 02, 2024 11:54PM UTC

**UPDATE** Fixed with using following def function from javax.swing import UIManager . . . def currentTheme(self): # Attempt to get system theme as a workaround look_and_feel = UIManager.getLookAndFeel().getName() is_dark_theme = "dark" in look_and_feel.lower() # Check for "dark" in the name print("Current Theme (DEBUG): {}".format(look_and_feel)) return is_dark_theme . . .

Hannah, PortSwigger Agent | Last updated: Sep 03, 2024 04:22PM UTC