aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/data/plugins/cookies.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/data/plugins/cookies.py b/examples/data/plugins/cookies.py
index 721feef..bf59e96 100644
--- a/examples/data/plugins/cookies.py
+++ b/examples/data/plugins/cookies.py
@@ -47,7 +47,9 @@ class TextStore(object):
'TRUE' : 'https',
'FALSE' : 'http'
}
+ extra = ''
if cookie[0].startswith("#HttpOnly_"):
+ extra = 'Only'
domain = cookie[0][len("#HttpOnly_"):]
elif cookie[0].startswith('#'):
return None
@@ -58,7 +60,7 @@ class TextStore(object):
cookie[2],
cookie[5],
cookie[6],
- scheme[cookie[3]],
+ scheme[cookie[3]] + extra,
cookie[4])
except (KeyError,IndexError):
# Let malformed rows pass through like comments
@@ -68,9 +70,17 @@ class TextStore(object):
"""Convert cookie event to cookie.txt row"""
secure = {
'https' : 'TRUE',
- 'http' : 'FALSE'
+ 'http' : 'FALSE',
+ 'httpsOnly' : 'TRUE',
+ 'httpOnly' : 'FALSE'
}
- return (cookie[0],
+ http_only = {
+ 'https' : '',
+ 'http' : '',
+ 'httpsOnly' : '#HttpOnly_',
+ 'httpOnly' : '#HttpOnly_'
+ }
+ return (http_only[cookie[4]] + cookie[0],
'TRUE' if cookie[0].startswith('.') else 'FALSE',
cookie[1],
secure[cookie[4]],