Skip to content

Commit

Permalink
#1 work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
gingeleski committed Jun 8, 2018
1 parent 6dfe83e commit a0aa74e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
File renamed without changes.
24 changes: 16 additions & 8 deletions wcf_binary_soap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
from burp import IMessageEditorTab

from datetime import datetime
from subprocess import PIPE, Popen

class CustomDecoderTab(IMessageEditorTab):

def __init__(self, extender, controller, editable):
self._extender = extender
self._editable = editable
Expand Down Expand Up @@ -66,13 +67,20 @@ def setMessage(self, content, isRequest):
headers = requestInfo.getHeaders()
for h in headers:
if 'application/soap+msbin' in h:
# TODO do something here then set this content
content = 'PLACEHOLDER'
if content:
self._txtInput.setText(content)
self._currentMessage = content
else:
self._currentMessage = ''
decodedContent = ''
requestBodyOffset = int(requestInfo.getBodyOffset())
requestBody = content[requestBodyOffset:]
requestBody64 = self._extender._helpers.base64Encode(requestBody)
try:
p1 = Popen(['NBFS','DECODE',requestBody64],stdout=PIPE)
print(p1.communicate())
except Exception, e:
print('Call to NBFS failed - is \{repo\}/bin is on your path??')
print(e.__doc__)
print(e.message)
decodedContent = requestBody64
self._txtInput.setText(decodedContent)
self._currentMessage = decodedContent
except Exception, e:
print(e.__doc__)
print(e.message)
Expand Down

0 comments on commit a0aa74e

Please sign in to comment.