Skip to content

Commit

Permalink
Avoid incorrect assumption that Burp version always has minor release…
Browse files Browse the repository at this point in the history
… number
  • Loading branch information
execveat committed Jun 14, 2023
1 parent d72e9a5 commit 6d6700b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 7 additions & 4 deletions kotlin/BurpExtender.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ class BurpExtender: IBurpExtender, IExtensionStateListener, BurpExtension {
val version_array = callbacks.getBurpVersion()

// show helpful error message if version is below 2023.1.2 (version_array[1] is year, version_array[2] is major and minor style like '1.2')
// split version_array[2] before comparing
val year = version_array[1].toInt()
val major = version_array[2].split(".")[0].toInt()
val minor = version_array[2].split(".")[1].toInt()

// split version_array[2] and check if it has major and minor
val versionParts = version_array[2].split(".")
val major = versionParts[0].toInt()
// if minor version is not present, consider it as '0'
val minor = if (versionParts.size > 1) versionParts[1].toInt() else 0

if ((year < 2023) or ((year == 2023) and (major == 1) and (minor < 2))) {
val stdout = PrintWriter(callbacks.stdout, true)

stdout.println("InQL v5 relies on the Montoya API, which is only supported in Burp versions 2023.1.2 or higher.")
stdout.println("Unfortunately, your current Burp version (${version_array[1]}.${version_array[2]}) is outdated and incompatible.")
stdout.println("")
Expand Down
4 changes: 1 addition & 3 deletions python/inql/extender.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
from .utils.decorators import unroll_exceptions
from .utils.pyswing import panel

DEBUG = True


class MainTab(ITab):
"""Main InQL interface - a Burp tab, that includes multiple subtabs."""
Expand Down Expand Up @@ -75,7 +73,7 @@ def __init__(self, burp_callbacks, upstream_montoya):
config.delete('ScannerPanel', 'global')

# Dump configs (at the INFO level)
config.debug_contents()
#config.debug_contents()

# creating temp dir
self._tmpdir = tempfile.mkdtemp()
Expand Down

0 comments on commit 6d6700b

Please sign in to comment.