From c470aa82a605a365e57b060776fd88e45462eb29 Mon Sep 17 00:00:00 2001 From: m0nst3r Date: Tue, 30 Jun 2020 13:58:01 +0800 Subject: [PATCH] dynamic function support --- README.md | 70 +++++- pom.xml | 2 +- res/burpyServicePyro3.py | 135 ++++++++++ src/main/java/burp/BurpExtender.java | 357 ++++----------------------- 4 files changed, 248 insertions(+), 316 deletions(-) create mode 100644 res/burpyServicePyro3.py diff --git a/README.md b/README.md index 92acd4b..cfc942c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ m0nst3r(Song Xinlei) @ CFCA # TODO - [x] to python3, from version `1.3` -- [ ] `dynamic` function transform +- [x] `dynamic` function transform # Changelog - change to use class instead of pure function, so that we can init webdriver+selenium when loading without init it per call @@ -21,8 +21,74 @@ m0nst3r(Song Xinlei) @ CFCA - add payload processor - add auto enc/dec. encrypt function automatically called when you click GO in burp, and decrypt function automatically called when receive response - changed default pyro4 port, avoiding brida conflicts +- migration to python3 +- dynamic context menu items extracted from your python script -# Usage +# Usage (`=v2.0`) +> NOTE: MAKE SURE YOU HAVE ALL DEPENDENCIES INSTALLED, INCLUDING THE DEPENDENCIES NEEDED FOR YOUR PYTHON SCRIPT + +1. install PyRO, version 4 is used. +2. configure python and pyro settings +3. configure the python file you wanna run +4. click "Start server", burpy will read your python script file and get all functions to generate the context menu +5. use context memu item to invoke your script's regarding function +6. write own payload processor, especially usefull with enc/dec + +> Install editor plugin example: mvn install:install-file -DgroupId=com.fifesoft -DartifactId=rsyntaxtextarea -Dversion=2.6.1.edited -Dpackaging=jar -Dfile=/home/m0nst3r/study/java/rsyntaxtextarea-2.6.1.edited.jar + +# the python script sample +Just write your own logic to modify the header/body as your need, and return the header/body, just that simple! + +All functions will be extracted to generate context menu, except thos with `_`, `__`, `main` prefix! + +```python +class Burpy: + ''' + header is dict + body is string + ''' + def __init__(self): + ''' + here goes some code that will be kept since "start server" clicked, for example, webdriver, which usually takes long time to init + ''' + pass + + def main(self, header, body): + return header, body + + def _test(self, param): + ''' + function with `_`, `__`, `main` as starting letter will be ignored for context menu + + ''' + # param = magic(param) + return param + + def encrypt(self, header, body): + ''' + Auto Enc/Dec feature require this function + ''' + header["Cookie"] = "admin=1" + return header, body + + def decrypt(self, header, body): + ''' + Auto Enc/Dec feature require this function + + ''' + # header = magic(header) + # body = magic(body) + return header, body + + def processor(self, payload): + ''' + Enable Processor feature require this function + payload processor function + ''' + return payload+"123" +``` + +# Usage (` check the examples for scripts > NOTE: MAKE SURE YOU HAVE ALL DEPENDENCIES INSTALLED, INCLUDING THE DEPENDENCIES NEEDED FOR YOUR PYTHON SCRIPT diff --git a/pom.xml b/pom.xml index 47d42cf..43d6468 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 me.m0nst3r burpy - 1.3-SNAPSHOT + 2.0-SNAPSHOT burpy burp plugin to run custom python diff --git a/res/burpyServicePyro3.py b/res/burpyServicePyro3.py new file mode 100644 index 0000000..07b3ccf --- /dev/null +++ b/res/burpyServicePyro3.py @@ -0,0 +1,135 @@ +#coding:utf-8 +import Pyro4 +import sys + +m_module = sys.argv[-1] + +import importlib.util +module_name = m_module.split("/")[-1][:-2] +spec = importlib.util.spec_from_file_location('{}.Burpy'.format(module_name),m_module) +b = importlib.util.module_from_spec(spec) +spec.loader.exec_module(b) + +from base64 import b64decode as b64d + +class http: + ''' + accept data string + ''' + + def __init__(self,data): + self.data = data + self.first_line, self.headers, self.body = self.parse_headers_and_body(data) + + def parse_headers(self, s): + headers = s.split("\r\n") + headers_found = {} + for header_line in headers: + try: + key, value = header_line.split(':', 1) + except: + continue + headers_found[key] = value.strip() + return headers_found + + def parse_headers_and_body(self,s): + try: + crlfcrlf = b"\x0d\x0a\x0d\x0a" + crlfcrlfIndex = s.find(crlfcrlf) + headers = s[:crlfcrlfIndex + len(crlfcrlf)].decode("utf-8") + body = s[crlfcrlfIndex + len(crlfcrlf):] + except: + headers = s + body = '' + first_line, headers = headers.split("\r\n", 1) + return first_line.strip(), self.parse_headers(headers), str(body,encoding="utf-8") + + # def build(self, isRequest): + def build(self): + ''' + convert self to strings + ''' + # if(isRequest): + # get headers as dict + newhttp = list() + newhttp.append(self.first_line) + for k in self.headers.keys(): + newhttp.append("{}: {}".format(k,self.headers[k])) + + newhttp.append("") + newhttp.append(self.body) + newhttp = map(lambda l: l if isinstance(l, bytes) else l.encode('utf-8'), newhttp) + + http_str = b'\r\n'.join(newhttp) + return str(http_str,encoding="utf-8") + + # else: + # return "response" + # return p + +class Unbuffered(object): + def __init__(self, stream): + self.stream = stream + def write(self, data): + self.stream.write(data) + self.stream.flush() + def writelines(self, datas): + self.stream.writelines(datas) + self.stream.flush() + def __getattr__(self, attr): + return getattr(self.stream, attr) + +@Pyro4.expose +class BridaServicePyro: + def __init__(self, daemon): + self.daemon = daemon + self.burpy = b.Burpy() + self.method_list = [func for func in dir(b.Burpy) if callable(getattr(b.Burpy, func)) and not func.startswith("__") and not func.startswith("_")] + + def get_methods(self): + return self.method_list + + def invoke_method(self,method_name, data): + data = http(b64d(data)) + + func = getattr(self.burpy, method_name) + if data is None: + return "Parse HTTP data failed" + try: + # headers is dict, body is str + if func.__name__ != "processor": + data.headers, data.body = func(data.headers, data.body) + ret_val = data.build() + else: + ret_val = func(data) + except Exception as e: + print( e ) + ret_val = "{} in BurpyService failed".format(method_name) + return ret_val + + + + @Pyro4.oneway + def shutdown(self): + print('shutting down...') + try: + # self.burpy.down() + del self.burpy + except Exception: + print("burpy.down() method not found, skipped.") + self.daemon.shutdown() + +# Disable python buffering (cause issues when communicating with Java...) +sys.stdout = Unbuffered(sys.stdout) +sys.stderr = Unbuffered(sys.stderr) + +host = sys.argv[1] +port = int(sys.argv[2]) +daemon = Pyro4.Daemon(host=host,port=port) + +#daemon = Pyro4.Daemon(host='127.0.0.1',port=9999) +bs = BridaServicePyro(daemon) +uri = daemon.register(bs,objectId='BurpyServicePyro') + +print("Ready.") +daemon.requestLoop() diff --git a/src/main/java/burp/BurpExtender.java b/src/main/java/burp/BurpExtender.java index 493ecf5..0056e73 100644 --- a/src/main/java/burp/BurpExtender.java +++ b/src/main/java/burp/BurpExtender.java @@ -19,7 +19,6 @@ import java.util.regex.Pattern; import javax.swing.*; -import javax.swing.JCheckBox; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.text.BadLocationException; @@ -61,22 +60,13 @@ public class BurpExtender implements IBurpExtender, ITab, ActionListener, IConte private JTextPane serverStatus; private JTextField burpyPath; - private JCheckBox chckbxNewCheckBox; - private JCheckBox chckbxEnc; - private JCheckBox chckbxDec; - private JCheckBox chckbxSign; private JCheckBox chckbxPro; private JCheckBox chckbxAuto; public JMenuItem itemEnc; public JMenuItem itemDec; - public Boolean isAutoMain = false; - public Boolean should_cus = false; - public Boolean should_enc = false; - public Boolean should_dec = false; - public Boolean should_sign = false; public Boolean should_pro = false; public Boolean should_auto = false; @@ -92,11 +82,9 @@ public class BurpExtender implements IBurpExtender, ITab, ActionListener, IConte private boolean serverStarted; - private boolean applicationSpawned; + private IContextMenuInvocation currentInvocation; - private ITextEditor currentTextEditor; - private ITextEditor stubTextEditor; private JButton loadPyFileButton; @@ -113,11 +101,12 @@ public class BurpExtender implements IBurpExtender, ITab, ActionListener, IConte private Thread stderrThread; - private JTree tree; private boolean lastPrintIsJS; + public List burpyMethods; + public void registerExtenderCallbacks(IBurpExtenderCallbacks c) { // Keep a reference to our callbacks object @@ -151,8 +140,7 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks c) { lastPrintIsJS = false; try { - InputStream inputStream = getClass().getClassLoader().getResourceAsStream("res/burpyServicePyro2.py"); - printSuccessMessage("got inputStream"); + InputStream inputStream = getClass().getClassLoader().getResourceAsStream("res/burpyServicePyro3.py"); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream )); File outputFile = new File(System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + "burpyServicePyro2.py"); @@ -314,49 +302,8 @@ public void run() { pyroPortPanel.add(labelPyroPort); pyroPortPanel.add(pyroPort); - // enc function - chckbxEnc = new JCheckBox("Enable Encryption"); - chckbxEnc.setEnabled(true); - chckbxEnc.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - if (chckbxEnc.isSelected()){ - should_enc = true; - }else { - should_enc = false; - } - } - }); - - // dec functioin - chckbxDec = new JCheckBox("Enable Decryption"); - chckbxDec.setEnabled(true); - chckbxDec.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - if (chckbxDec.isSelected()){ - should_dec = true; - }else { - should_dec = false; - } - } - }); - - // sign function - chckbxSign = new JCheckBox("Enable Sign"); - chckbxSign.setEnabled(true); - chckbxSign.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - if (chckbxSign.isSelected()){ - should_sign = true; - }else { - should_sign = false; - } - } - }); - - chckbxPro = new JCheckBox("Enable Processor"); + + chckbxPro = new JCheckBox("Enable Processor (require processor function)"); chckbxPro.setEnabled(true); chckbxPro.addActionListener(new ActionListener() { @Override @@ -369,7 +316,7 @@ public void actionPerformed(ActionEvent e) { } }); - chckbxAuto = new JCheckBox("Enable Auto Enc/Dec"); + chckbxAuto = new JCheckBox("Enable Auto Enc/Dec (require encrypt and decrypt function)"); chckbxAuto.setEnabled(true); chckbxAuto.addActionListener(new ActionListener() { @Override @@ -389,23 +336,6 @@ public void actionPerformed(ActionEvent actionEvent) { autoSignBox.gridx = 1; autoSignBox.gridy = 3; - GridBagConstraints shouldEncBox = new GridBagConstraints(); - shouldEncBox.fill = GridBagConstraints.HORIZONTAL; - shouldEncBox.insets = new Insets(0, 0, 5, 0); - shouldEncBox.gridx = 1; - shouldEncBox.gridy = 3; - - GridBagConstraints shouldDecBox = new GridBagConstraints(); - shouldDecBox.fill = GridBagConstraints.HORIZONTAL; - shouldDecBox.insets = new Insets(0, 0, 5, 0); - shouldDecBox.gridx = 1; - shouldDecBox.gridy = 3; - - GridBagConstraints shouldSignBox = new GridBagConstraints(); - shouldSignBox.fill = GridBagConstraints.HORIZONTAL; - shouldSignBox.insets = new Insets(0, 0, 5, 0); - shouldSignBox.gridx = 1; - shouldSignBox.gridy = 3; GridBagConstraints shouldProBox = new GridBagConstraints(); shouldProBox.fill = GridBagConstraints.HORIZONTAL; @@ -426,9 +356,7 @@ public void actionPerformed(ActionEvent actionEvent) { configurationConfPanel.add(pyroPortPanel); configurationConfPanel.add(burpyPathPanel); // configurationConfPanel.add(chckbxNewCheckBox, autoSignBox); - configurationConfPanel.add(chckbxEnc, shouldEncBox); - configurationConfPanel.add(chckbxDec,shouldDecBox); - configurationConfPanel.add(chckbxSign,shouldSignBox); + configurationConfPanel.add(chckbxPro,shouldProBox); configurationConfPanel.add(chckbxAuto, shouldAutoBox); @@ -483,9 +411,7 @@ public void actionPerformed(ActionEvent actionEvent) { killServer.setActionCommand("killServer"); killServer.addActionListener(BurpExtender.this); - JButton spawnApplication = new JButton("Spawn"); - spawnApplication.setActionCommand("spawnApplication"); - spawnApplication.addActionListener(BurpExtender.this); + clearConsoleButton = new JButton("Clear console"); clearConsoleButton.setActionCommand("clearConsole"); @@ -510,8 +436,7 @@ public void actionPerformed(ActionEvent actionEvent) { rightSplitPane.add(serverStatusButtons,gbc); rightSplitPane.add(startServer,gbc); rightSplitPane.add(killServer,gbc); - // TODO - rightSplitPane.add(spawnApplication,gbc); + rightSplitPane.add(clearConsoleButton,gbc); @@ -591,6 +516,21 @@ public void run() { } } + + @SuppressWarnings("unchecked") + public void getMethods() { + + try { + this.burpyMethods = (List) (pyroBurpyService.call("get_methods")); + } catch (Exception e) { + stderr.println(e.toString()); + StackTraceElement[] exceptionElements = e.getStackTrace(); + for (int i = 0; i < exceptionElements.length; i++) { + stderr.println(exceptionElements[i].toString()); + } + } + + } private void launchPyroServer(String pythonPath, String pyroServicePath) { @@ -644,7 +584,9 @@ public void run() { printSuccessMessage("Pyro server started correctly"); printSuccessMessage("Better use \"Kill Server\" after finished!"); - + + printSuccessMessage("Analyzing scripts"); + getMethods(); // Standard line } else { @@ -722,36 +664,7 @@ public void actionPerformed(ActionEvent event) { String command = event.getActionCommand(); - - if(command.equals("spawnApplication") && serverStarted) { - - try { - - final String s = (String)(pyroBurpyService.call("hello_spawn")); - applicationSpawned = true; - - SwingUtilities.invokeLater(new Runnable() { - - @Override - public void run() { - - - printJSMessage("*** Output " + ":"); - printJSMessage(s); - - } - }); - - - } catch (final Exception e) { - - printException(e,"Exception with spawn application"); - - } - - - - } else if(command.equals("killServer") && serverStarted) { + if(command.equals("killServer") && serverStarted) { stdoutThread.stop(); stderrThread.stop(); @@ -796,7 +709,7 @@ public void run() { savePersistentSettings(); try { - + launchPyroServer(pythonPath.getText().trim(), pythonScript); } catch (final Exception e) { @@ -840,49 +753,7 @@ public void run() { printException(e,"Error saving PY file"); } - } else if(command.equals("contextcustom1")) { - - IHttpRequestResponse[] selectedItems = currentInvocation.getSelectedMessages(); - byte selectedInvocationContext = currentInvocation.getInvocationContext(); - - try { - // pass directly the bytes of http - byte[] selectedRequestOrResponse = null; - if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { - selectedRequestOrResponse = selectedItems[0].getRequest(); - } else { - selectedRequestOrResponse = selectedItems[0].getResponse(); - } - - String ret_str = (String) pyroBurpyService.call("hello", helpers.base64Encode(selectedRequestOrResponse)); - - if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { - selectedItems[0].setRequest(ret_str.getBytes()); - } else { - - final String msg = ret_str.substring(ret_str.indexOf("\r\n\r\n")+4); - SwingUtilities.invokeLater(new Runnable() { - - @Override - public void run() { - JTextArea ta = new JTextArea(10, 30); - ta.setText(msg); - ta.setLineWrap(true); - ta.setWrapStyleWord(true); - ta.setCaretPosition(0); - ta.setEditable(false); - - JOptionPane.showMessageDialog(null, new JScrollPane(ta), "Burpy Enc", JOptionPane.INFORMATION_MESSAGE); - } - }); - } - - } catch (Exception e) { - - printException(e, "Exception with custom context application"); - - } - }else if (command.equals("encrypt")) { + } else if (burpyMethods.contains(command)) { IHttpRequestResponse[] selectedItems = currentInvocation.getSelectedMessages(); byte selectedInvocationContext = currentInvocation.getInvocationContext(); @@ -895,7 +766,7 @@ public void run() { selectedRequestOrResponse = selectedItems[0].getResponse(); } - String ret_str = (String) pyroBurpyService.call("encrypt", helpers.base64Encode(selectedRequestOrResponse)); + String ret_str = (String) pyroBurpyService.call("invoke_method", command, helpers.base64Encode(selectedRequestOrResponse)); if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { selectedItems[0].setRequest(ret_str.getBytes()); @@ -913,7 +784,7 @@ public void run() { ta.setCaretPosition(0); ta.setEditable(false); - JOptionPane.showMessageDialog(null, new JScrollPane(ta), "Burpy Enc", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(null, new JScrollPane(ta), "Burpy "+command, JOptionPane.INFORMATION_MESSAGE); } }); } @@ -923,91 +794,6 @@ public void run() { printException(e, "Exception with custom context application"); } - }else if (command.equals("decrypt")) { - - IHttpRequestResponse[] selectedItems = currentInvocation.getSelectedMessages(); - byte selectedInvocationContext = currentInvocation.getInvocationContext(); - - try { - // pass directly the bytes of http - byte[] selectedRequestOrResponse = null; - if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { - selectedRequestOrResponse = selectedItems[0].getRequest(); - } else { - selectedRequestOrResponse = selectedItems[0].getResponse(); - } - - String ret_str = (String) pyroBurpyService.call("decrypt", helpers.base64Encode(selectedRequestOrResponse)); - - if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { - selectedItems[0].setRequest(ret_str.getBytes()); - } else { - - final String msg = ret_str.substring(ret_str.indexOf("\r\n\r\n")+4); - SwingUtilities.invokeLater(new Runnable() { - - @Override - public void run() { - JTextArea ta = new JTextArea(10, 30); - ta.setText(msg); - ta.setLineWrap(true); - ta.setWrapStyleWord(true); - ta.setCaretPosition(0); - ta.setEditable(false); - - JOptionPane.showMessageDialog(null, new JScrollPane(ta), "Burpy Dec", JOptionPane.INFORMATION_MESSAGE); - } - }); - } - - } catch (Exception e) { - - printException(e, "Exception with custom context application"); - - } - }else if (command.equals("sign")) { - - IHttpRequestResponse[] selectedItems = currentInvocation.getSelectedMessages(); - byte selectedInvocationContext = currentInvocation.getInvocationContext(); - - try { - // pass directly the bytes of http - byte[] selectedRequestOrResponse = null; - if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { - selectedRequestOrResponse = selectedItems[0].getRequest(); - } else { - selectedRequestOrResponse = selectedItems[0].getResponse(); - } - - String ret_str = (String) pyroBurpyService.call("sign", helpers.base64Encode(selectedRequestOrResponse)); - - if(selectedInvocationContext == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST) { - selectedItems[0].setRequest(ret_str.getBytes()); - } else { - - final String msg = ret_str.substring(ret_str.indexOf("\r\n\r\n")+4); - SwingUtilities.invokeLater(new Runnable() { - - @Override - public void run() { - JTextArea ta = new JTextArea(10, 30); - ta.setText(msg); - ta.setLineWrap(true); - ta.setWrapStyleWord(true); - ta.setCaretPosition(0); - ta.setEditable(false); - - JOptionPane.showMessageDialog(null, new JScrollPane(ta), "Burpy Dec", JOptionPane.INFORMATION_MESSAGE); - } - }); - } - - } catch (Exception e) { - - printException(e, "Exception with custom context application"); - - } - } else if(command.equals("pythonPathSelectFile")) { JFrame parentFrame = new JFrame(); @@ -1111,6 +897,7 @@ public void run() { try { launchPyroServer(pythonPath.getText().trim(),pythonScript); + getMethods(); } catch (final Exception e) { @@ -1124,77 +911,21 @@ public void run() { public List createMenuItems(IContextMenuInvocation invocation) { - if(invocation.getInvocationContext() == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_REQUEST || - invocation.getInvocationContext() == IContextMenuInvocation.CONTEXT_MESSAGE_EDITOR_RESPONSE) { - currentInvocation = invocation; List menu = new ArrayList(); - JMenuItem itemCustom1 = new JMenuItem("Burpy Main"); - itemCustom1.setActionCommand("contextcustom1"); - itemCustom1.addActionListener(this); - - itemEnc = new JMenuItem("Burpy Enc"); - itemEnc.setActionCommand("encrypt"); - itemEnc.addActionListener(this); - itemDec = new JMenuItem("Burpy Dec"); - itemDec.setActionCommand("decrypt"); - itemDec.addActionListener(this); - - JMenuItem itemSign = new JMenuItem("Burpy Sign"); - itemSign.setActionCommand("sign"); - itemSign.addActionListener(this); - - menu.add(itemCustom1); - if (should_enc) { - menu.add(itemEnc); - } - - if (should_dec) { - menu.add(itemDec); - } - - if (should_sign) { - menu.add(itemSign); - } - return menu; - - } else if(invocation.getInvocationContext() == IContextMenuInvocation.CONTEXT_MESSAGE_VIEWER_REQUEST || - invocation.getInvocationContext() == IContextMenuInvocation.CONTEXT_MESSAGE_VIEWER_RESPONSE) { - - currentInvocation = invocation; - - List menu = new ArrayList(); - - JMenuItem itemCustom1 = new JMenuItem("Burpy Main"); - itemCustom1.setActionCommand("contextcustom1"); - itemCustom1.addActionListener(this); - - - - JMenuItem itemDec = new JMenuItem("Burpy Dec"); - itemDec.setActionCommand("decrypt"); - itemDec.addActionListener(this); - - - - menu.add(itemCustom1); - - if (should_dec) { - menu.add(itemDec); - } + + this.burpyMethods.forEach(method_name -> { + JMenuItem item = new JMenuItem("Burpy " + method_name); + item.setActionCommand(method_name); + item.addActionListener(this); + menu.add(item); + }); return menu; - - } else { - - return null; - - } - } static String byteArrayToHexString(byte[] raw) { @@ -1411,7 +1142,7 @@ public byte[] processPayload(byte[] currentPayload, byte[] originalPayload, byte try { PyroProxy pp = new PyroProxy(new PyroURI(pyroUrl)); - final String s = (String) (pyroBurpyService.call("processor", new String(currentPayload))); + final String s = (String) (pyroBurpyService.call("invoke_method", "processor", new String(currentPayload))); ret = s.getBytes(); pp.close(); } catch (Exception e) { @@ -1446,7 +1177,7 @@ public void processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequ try { PyroProxy pp = new PyroProxy(new PyroURI(pyroUrl)); - ret = (String) pyroBurpyService.call("encrypt", helpers.base64Encode(request)); + ret = (String) pyroBurpyService.call("invoke_method", "encrypt", helpers.base64Encode(request)); pp.close(); } catch(Exception e) { @@ -1487,7 +1218,7 @@ public void processHttpMessage(int toolFlag, boolean messageIsRequest, IHttpRequ String ret = ""; try { PyroProxy pp = new PyroProxy(new PyroURI(pyroUrl)); - ret = (String) pyroBurpyService.call("encrypt", helpers.base64Encode(response)); + ret = (String) pyroBurpyService.call("invoke_method", "decrypt", helpers.base64Encode(response)); stderr.println(ret); pp.close();