Skip to content

Commit c998d11

Browse files
committed
2.3.3
- Minor update to license file - The field `.decrypt_failure__` is not only output when there is an error (previously always output) - If the emit function is ommitted, the output now defaults to 'decrypted' as the field name
1 parent efbd5f8 commit c998d11

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The following example will transform the sourcetype field into its hex represent
2525

2626
`... | decrypt field=sourcetype hex() emit('sourcetype')`
2727
Note: Fields must be output via the emit function. The input field is not modified in place.
28+
If the emit function is not mentioned, an emit('decrypted') is automatically added so the data is output
2829

2930
# Arguments
3031
## field
@@ -161,7 +162,9 @@ Shannon Davis (Splunk)
161162

162163
# Release Notes
163164
## 2.3.3
164-
Minor update to license file
165+
- Minor update to license file
166+
- The field `.decrypt_failure__` is not only output when there is an error (previously always output)
167+
- If the emit function is ommitted, the output now defaults to 'decrypted' as the field name
165168

166169
## 2.3.2
167170
Fork of version 2.3.1 of DECRYPT app from SplunkBase (under MIT license)

app.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": {
66
"group": null,
77
"name": "decrypt2",
8-
"version": "2.3.2"
8+
"version": "2.3.3"
99
},
1010
"author": [
1111
{

bin/decrypt.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ def stream(self, records):
3333

3434
except Exception as e:
3535
exception_string = str(e)
36-
37-
finally:
3836
record[".decrypt_failure__"] = exception_string
3937

4038
yield record

bin/lib/decryptlib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,15 @@ def getargs(g):
265265
return args
266266

267267
def parsestmt(s):
268+
# always emit the decrypted value even if not requested
269+
if s.find("emit(") == -1:
270+
s = s + " emit('decrypted') "
271+
268272
try:
269273
g = Tokenizer(s)
270274
except:
271275
raise Exception("syntax error")
276+
272277
for toknum, tokval, _, _, _ in g:
273278
cmd = None
274279

@@ -327,4 +332,3 @@ def parsestmt(s):
327332

328333
else:
329334
raise Exception("'%s' is not a recognized command" % cmd)
330-

default/app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ is_visible = false
1212
[launcher]
1313
author = Gareth Anderson
1414
description = A library of common routines to analyze malware and data exfiltration communications (based on the work of Michael Zalewski).
15-
version = 2.3.2
15+
version = 2.3.3
1616

0 commit comments

Comments
 (0)