Skip to content

Commit

Permalink
Merge pull request AlessandroZ#354 from ocastejon/master
Browse files Browse the repository at this point in the history
Dump valid JSON file and minor correction for opensshforwindows keys
  • Loading branch information
AlessandroZ authored Feb 19, 2019
2 parents c96744a + d692b35 commit e9f13f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Linux/lazagne/config/write_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def write_in_file(result):
# Human readable Json format
pretty_json = json.dumps(result, sort_keys=True, indent=4, separators=(',', ': '))
with open(os.path.join(constant.folder_name, constant.file_name_results + '.json'), 'a+b') as f:
f.write(pretty_json.decode('unicode-escape').encode('UTF-8'))
f.write(pretty_json.encode('UTF-8'))

constant.st.do_print(u'[+] File written: {file}'.format(
file=os.path.join(constant.folder_name, constant.file_name_results + '.json'))
Expand Down
2 changes: 1 addition & 1 deletion Mac/lazagne/config/write_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def write_in_file(result):
# Human readable Json format
pretty_json = json.dumps(result, sort_keys=True, indent=4, separators=(',', ': '))
with open(os.path.join(constant.folder_name, constant.file_name_results + '.json'), 'a+b') as f:
f.write(pretty_json.decode('unicode-escape').encode('UTF-8'))
f.write(pretty_json.encode('UTF-8'))
constant.st.do_print(
'[+] File written: ' + constant.folder_name + os.sep + constant.file_name_results + '.json')
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/config/write_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def write_in_file(result):
# Human readable Json format
pretty_json = json.dumps(result, sort_keys=True, indent=4, separators=(',', ': '))
with open(os.path.join(constant.folder_name, constant.file_name_results + '.json'), 'a+b') as f:
f.write(pretty_json.decode('unicode-escape').encode('UTF-8'))
f.write(pretty_json.encode('UTF-8'))

constant.st.do_print(u'[+] File written: {file}'.format(
file=os.path.join(constant.folder_name, constant.file_name_results + '.json'))
Expand Down
2 changes: 1 addition & 1 deletion Windows/lazagne/softwares/sysadmin/opensshforwindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run(self):
# Parse and process the list of keys
key_found = []
for key in unprotected_private_keys:
values = {"PrivateKey": key}
values = {"Privatekey": key}
key_found.append(values)

return key_found

0 comments on commit e9f13f4

Please sign in to comment.