Skip to content

Commit

Permalink
Updated script, as results are currently failing
Browse files Browse the repository at this point in the history
  • Loading branch information
weslambert authored Mar 21, 2020
1 parent 752a3cb commit 427a9a7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions analyzers/CyberChef/cyberchef.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ def run(self):
data = { "input": observable, "recipe":[{"op":"Regular expression","args":["User defined","([0-9]{2,3}(,\\s|))+",True,True,False,False,False,False,"List matches"]},{"op":"From Charcode","args":["Comma",10]},{"op":"Regular expression","args":["User defined","([0-9]{2,3}(,\\s|))+",True,True,False,False,False,False,"List matches"]},{"op":"From Charcode","args":["Space",10]}]}
headers = { 'Content-Type': 'application/json' }
r = requests.post(url.strip('/') + '/bake', headers=headers, data=json.dumps(data))
response_bytes = r.text
clean_bytes = response_bytes.strip('[').strip(']').split(',')
output_data = ""
for i in clean_bytes:
output_data = str(output_data + str(chr(int(i))))
output_data = "".join([chr(x) for x in r.json().get('value', [])])
self.report({ 'input_data': observable, 'output_data': output_data })
except:
self.error("Could not convert provided data.")
Expand Down

0 comments on commit 427a9a7

Please sign in to comment.