You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: Struts_S2-052_pwn_core.rb
    path of file: ./repos/BHR_Labs/ch15
    
    the code of the file until where you have to start completion: #!/usr/bin/env ruby
# ========================================================= #
# This file is a part of { Black Hat Ruby } book lab files. #
# ========================================================= #
#
# Author:
#   Sabri Hassanyah | @KINGSABRI
# Description:
#   Burp extension to actively and passively scan Struts-S2-052 (CVE-2017-9805)
# Requirements:
#   jruby | jruby-code-xxx-complete.jar
#   Burp Suite
#
require 'java'

java_import 'burp.IBurpExtender'
java_import 'burp.IScannerCheck'
java_import 'burp.IScanIssue'
java_import 'burp.IRequestInfo'

class BurpExtender
  include IBurpExtender, IScannerCheck, IScanIssue

  def registerExtenderCallbacks(callbacks)
    @callbacks = callbacks
    @helpers = callbacks.getHelpers
    @callbacks.setExtensionName("Struts2 Scanner")
    @callbacks.registerScannerCheck(self)

  rescue Exception => e
    pp e.full_message
  end

  # doPassiveScan is a method for IS
    
  def doActiveScan(base_req_res, insertion_point)
    issues       = []
    analyzed_req = @helpers.analyzeRequest(base_req_res)

    if analyzed_req.getMethod == 'POST'
      headers      = analyzed_req.getHeaders.to_a
      cti          = headers.find_index {|h| h.include?('Content-Type')}
      headers[cti] = 'Content-type: application/xml'

      evil_payload  = Strust2.payload.bytes
      evil_http_msg = @helpers.buildHttpMessage(headers, evil_payload)
      evil_req_res  = @callbacks.makeHttpRequest(base_req_res.getHttpService, evil_http_msg)

      return nil unless Strust2.vulnerable?(evil_req_res, @helpers)

      # get the offsets of the payload within the request, for in-UI highlighting
      # req_markers = [insertion_point.getPayloadOffsets(Strust2.payload.bytes)]
      # res_markers = find_matches(evil_req_res.getResponse, Strust2.payload.bytes)
      strust2 = Strust2.new(evil_req_res, @helpers)
      strust2.name       = 'Active Scan'
      strust2.confidence = 'Certain'
      issues.push(strust2.to_java(IScanIssue))
    end