excel docs & useful prism script
1 parent 0df6e82 commit 718a4bc7e447fb59292fb5ce34ebccd0124c925f
root authored on 22 Apr 2022
Showing 3 changed files
View
30
RS/ExcelCal/README.md 0 → 100644
1) make outlook automatically store xls to folder
 
update reg key to enable "run script"
 
enable in trust center settings: APPLY MACRO SECURITY SETTINGS to INSTALLED ADD-INS
 
create the following vbs script:
 
```
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "Z:\Docs\RootShell\cal_xls\"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & Format(Now, "yyyymmdd") & ".txt"
Next
End Sub
```
 
create rule:
 
subject contains "calendar" and has attachment
move to folder "calendars" and run above macro
 
2) store the files in this repo somewhere calendar can access.
 
update the config options in xls2ical.php
 
3) add url http://secretplace.com/xls2ical.php - boom calendar
View
4
RS/README.md
If you can't read the code then this isn't for you.
 
Please do not ask for help regarding anything here, you will be ignored
 
after exploding jsons, tidy with following sed: (changing hostnames)
 
sed -i 's/www\.rsbp-ca\.org/www\.rsbp-tn\.org/g' *.json
View
24
RS/pjson_split.py 0 → 100755
#!/usr/bin/python3
import sys
import json
 
def file_save(file_name, text_to_save):
with open(file_name, "w") as sysfile:
sysfile.write(text_to_save)
sysfile.close
 
data = open(sys.argv[1]).read().replace('\n','')
jdata = json.loads(data)
 
for issue in jdata['issues']:
vuln = {}
vuln['version'] = 1
vuln['issues'] = []
dissue = issue
for i in dissue['affected_hosts']:
i['id'] = None
dissue['id'] = None
dissue['status'] = 'Draft'
vuln['issues'].append(dissue)
file_save(str(str(vuln['issues'][0]['name']).replace(' ', '_').replace('<', '_').replace('/', '_').replace('=', '_'))+ '.json', json.dumps(vuln, indent=4, sort_keys=True))
Buy Me A Coffee