bao7uo/waf-cookie-fetcher

Support for regexp

Opened this issue · 1 comments

I have some cookies which have dynamic name. Therefore, I would like to use regexp to take care of these. However I think that is not possible, because when I tried, I had this Traceback:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\BurpSuite\bapps\0f6ce51c1cb349689ecb4025e8db060a\waf-cookie-fetcher.py", line 370, in performAction
    cb.callbacks.stdOutput("Removed cookie: " + cookie_name)
AttributeError: 'burp.jbf' object has no attribute 'stdOutput'

	at org.python.core.Py.AttributeError(Py.java:205)
	at org.python.core.PyObject.noAttributeError(PyObject.java:1013)
	at org.python.core.PyObject.__getattr__(PyObject.java:1008)
	at org.python.pycode._pyx4.performAction$38(C:\Users\user\AppData\Roaming\BurpSuite\bapps\0f6ce51c1cb349689ecb4025e8db060a\waf-cookie-fetcher.py:351)
	at org.python.pycode._pyx4.call_function(C:\Users\user\AppData\Roaming\BurpSuite\bapps\0f6ce51c1cb349689ecb4025e8db060a\waf-cookie-fetcher.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:167)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:307)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:198)
	at org.python.core.PyFunction.__call__(PyFunction.java:482)
	at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
	at org.python.core.PyMethod.__call__(PyMethod.java:228)
	at org.python.core.PyMethod.__call__(PyMethod.java:218)
	at org.python.core.PyMethod.__call__(PyMethod.java:213)
	at org.python.core.PyObject._jcallexc(PyObject.java:3626)
	at org.python.core.PyObject._jcall(PyObject.java:3658)
	at org.python.proxies.__main__$SHA_Remove_Cookies$6.performAction(Unknown Source)
	at burp.l0c.a(Unknown Source)
	at burp.xx.a(Unknown Source)
	at burp.zx.a(Unknown Source)
	at burp.dy.a(Unknown Source)
	at burp.qyi.a(Unknown Source)
	at burp.fhf.a(Unknown Source)
	at burp.fhf.a(Unknown Source)
	at burp.fhf.a(Unknown Source)
	at burp.k4b.l(Unknown Source)
	at burp.k4b.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)

I tried to remove cookies like this:
image
Thanks,
Andrej

That's right, it is not currently possible, however I hope to add this feature in future. Or feel free to implement and I will accept a pull request.