From 1a4894bf7edb549a06bb7c8870ecfb30ef1ce650 Mon Sep 17 00:00:00 2001 From: Alexander Bilz Date: Tue, 29 Jun 2021 10:31:58 +0100 Subject: [PATCH] chore: added a MIT license --- Forensicsim_Parser.py | 38 +++++++++++++++++++------------------- LICENSE.md | 21 +++++++++++++++++++++ utils/dump_leveldb.py | 24 ++++++++++++++++++++++++ utils/main.py | 34 +++++++++++++++++++++++++++++----- utils/shared.py | 24 ++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 24 deletions(-) create mode 100644 LICENSE.md diff --git a/Forensicsim_Parser.py b/Forensicsim_Parser.py index a6ed400..c563fd6 100644 --- a/Forensicsim_Parser.py +++ b/Forensicsim_Parser.py @@ -2,28 +2,28 @@ # # Contact: Alexander Bilz [mail alexbilz [dot] com] # -# This is free and unencumbered software released into the public domain. + +# MIT License +# +# Copyright (c) 2021 Alexander Bilz # -# Anyone is free to copy, modify, publish, use, compile, sell, or -# distribute this software, either in source code form or as a compiled -# binary, for any purpose, commercial or non-commercial, and by any -# means. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# In jurisdictions that recognize copyright laws, the author or authors -# of this software dedicate any and all copyright interest in the -# software to the public domain. We make this dedication for the benefit -# of the public at large and to the detriment of our heirs and -# successors. We intend this dedication to be an overt act of -# relinquishment in perpetuity of all present and future rights to this -# software under copyright law. +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. # -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. # Parses LevelDb's of Electron-based Microsoft Teams Desktop Client # May 2021 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..e80fb55 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Alexander Bilz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/utils/dump_leveldb.py b/utils/dump_leveldb.py index 5ee30eb..1ce0aee 100644 --- a/utils/dump_leveldb.py +++ b/utils/dump_leveldb.py @@ -1,3 +1,27 @@ +""" +MIT License + +Copyright (c) 2021 Alexander Bilz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + from pathlib import Path import argparse diff --git a/utils/main.py b/utils/main.py index 9e20017..4cc7671 100644 --- a/utils/main.py +++ b/utils/main.py @@ -1,10 +1,33 @@ +""" +MIT License + +Copyright (c) 2021 Alexander Bilz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + +import argparse import json from datetime import datetime from pathlib import Path import pyfiglet -import argparse - from bs4 import BeautifulSoup import shared @@ -103,7 +126,7 @@ def parse_reply_chain(reply_chains): # -> creator 8:orgid:54dd27a7-fbb0-4bf0-8208-a4b31a578a3f # -> clientmessageid 6691174965251523000 if x['creator'] is not None and x['clientmessageid'] is not None: - x['cachedDeduplicationKey'] = str(x['creator']+x['clientmessageid']) + x['cachedDeduplicationKey'] = str(x['creator'] + x['clientmessageid']) cleaned.append(x) # Other types include ThreadActivity/TopicUpdate and ThreadActivity/AddMember # -> ThreadActivity/TopicUpdate occurs for meeting updates @@ -190,17 +213,17 @@ def process_db(filepath, output_path): extracted_values = shared.parse_db(filepath) - # extracted_values = shared.parse_json() - # parse records parsed_records = parse_records(extracted_values) # write the output to a json file shared.write_results_to_json(parsed_records, output_path) + def run(args): process_db(args.filepath, args.outputpath) + def parse_cmdline(): description = 'Forensics.im Xtract Tool' parser = argparse.ArgumentParser(description=description) @@ -210,6 +233,7 @@ def parse_cmdline(): args = parser.parse_args() return args + def cli(): header = pyfiglet.figlet_format("Forensics.im Xtract Tool") print(header) diff --git a/utils/shared.py b/utils/shared.py index c4545ec..20e44fb 100644 --- a/utils/shared.py +++ b/utils/shared.py @@ -1,3 +1,27 @@ +""" +MIT License + +Copyright (c) 2021 Alexander Bilz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + import io import json