GAP-Burp-Extension icon indicating copy to clipboard operation
GAP-Burp-Extension copied to clipboard

Edit features : current version is unable to indentify keys that are not enclosed between ' or "

Open mohammadx0098 opened this issue 1 year ago • 2 comments

for example : pageName

        dataLayer.push({
            environment: 'prod',
            industryCategory: '###',
            pageName: '####',
            pageTitle: '#####',
            notifications: {
              bokadirekt: false,
              reviews: false,
            },
        })

to fix this I try adding this code to line 3350 ... and it worked for me. there are some false positive but it was ok for me.


  # Find keys without " or ' in json object
  try:
      js_keys = re.finditer(
          r"(?<!;)\s([\w\d]+)(?:\:\s*)(?=\"|\')?[\w\s-]*(?=\"|\')?(?!;)",
          body,
          re.IGNORECASE,
      )
      for key in js_keys:
          if key is not None and key.group() != "":
              self.addParameter(key.group().strip().split(':')[0],responseUrl)
  except Exception as e:
      pass
 

mohammadx0098 avatar Jul 07 '23 22:07 mohammadx0098