Skip to content

Releases: TeamMsgExtractor/msg-extractor

Version 0.29.4

27 Jan 19:31
Compare
Choose a tag to compare
Version 0.29.4 Pre-release
Pre-release

v0.29.4

  • Fixed typo in utils.knownMsgClass.
  • Updated contributing guidelines and pull request template.

Version 0.30.0

20 Jan 06:08
4aabd61
Compare
Choose a tag to compare
Version 0.30.0 Pre-release
Pre-release

v0.30.0

  • Removed all support for Python 2. This caused a lot of things to be moved around and changed from indirect references to direct references, so it's possible something fell through the cracks. I'm doing my best to test it, but let me know if you have an issue.
  • Changed classes to now prefer super() over direct superclass initialization.
  • Removed explicit object subclassing (it's implicit in Python 3 so we don't need it anymore).
  • Converted most .formats into f strings.
  • Improved consistency of docstrings. It's not perfect, but it should at least be better.
  • Started the addition of type hints to functions and methods.
  • Updated utils.bytesToGuid to make it faster and more efficient.
  • Renamed utils.msgEpoch to utils.filetimeToUtc to be more descriptive.
  • Updated internal variable names to be more consistent.
  • Improvements to the way __main__ works. This does not affect the output it will generate, only the efficiency and readability.

Version 0.29.3

19 Jan 20:13
Compare
Choose a tag to compare
Version 0.29.3 Pre-release
Pre-release

v0.29.3

  • [TeamMsgExtractor #226] Fix typo in command parsing that prevented the usage of allowFallback.
  • Fixed main still manually navigating to a new directory with os.chdir instead of using customPath.
  • Fixed issue in main where the --html option was being using for both html and rtf. This meant if you wanted rtf it would not have used it, and if you wanted html it would have thrown an error.
  • Fixed --out-name having no effect.
  • Fixed --out having no effect.

Version 0.29.2

17 Jan 03:01
Compare
Choose a tag to compare
Version 0.29.2 Pre-release
Pre-release

v0.29.2

  • Fixed issue where the RTF injection was accidentally doing HTML escapes for non-encapsulated streams and not doing escapes for encapsulated streams.
  • Fixed name error in Message.save causing bad logic. For context, the internal variable zip was renamed to _zip to avoid a name conflict with the built-in function. Some instances of it were missed.

Version 0.29.1

17 Jan 00:36
Compare
Choose a tag to compare
Version 0.29.1 Pre-release
Pre-release

v0.29.1

  • [TeamMsgExtractor #198] Added a feature to save the header in it's own file (prefers the full raw header if it can find it, otherwise puts in a generated one) that was actually supposed to be in v0.29.0 but I forgot, lol.

Version 0.29.0

14 Jan 06:14
125ad02
Compare
Choose a tag to compare
Version 0.29.0 Pre-release
Pre-release

v0.29.0

  • [TeamMsgExtractor #207] Made it so that unspecified dates are handled properly. For clarification, an unspecified date is a custom value in MSG files for dates that means that the date is unspecified. It is distinctly different from a property not existing, which will still return None. For unspecified dates, datetime.datetime.max is returned. While perhaps not the best solution, it will have to do for now.
  • Fixed an issue where utils.parseType was returning a string for the date when it makes more sense to return an actual datetime instance.
  • [TeamMsgExtractor #165] [TeamMsgExtractor #191] Completely redesigned all existing save functions. You can now properly save to custom locations under custom file names. This change may break existing code for several reasons. First, all arguments have been changed to keyword arguments. Second, a few keyword arguments have been renamed to better fit the naming conventions.
  • [TeamMsgExtractor #200] Changed imports to use relative imports instead of hard imports where applicable.
  • Updated the save functions to no longer rely on the current working directory to save things. The module now does what it can to use hard pathing so that if you spontaneously change working directory it will not cause problems. This should also allow for saving to be threaded, if I am correct.
  • [TeamMsgExtractor #197] Added new property Message.defaultFolderName. This property returns the default name to be used for a Message if none of the options change the name.
  • [TeamMsgExtractor #201] Fixed an issue where if the class type was all caps it would not be recognized. According to the documentation the comparisons should have been case insensitive, but I must have misread it at some point.
  • [TeamMsgExtractor #202] Module will now handle path lengths in a semi-intelligent way to determine how best to save the MSG files. Default path length max is 255.
  • [TeamMsgExtractor #203] Fixed an issue where having multiple "." characters in your file name would cause the directories to be incorrectly named when using the useFileName (now useMsgFilename) argument in the save function.
  • [TeamMsgExtractor #204] Fixed an issue where the failsafe name used by attachments wasn't being encoded before hand causing encoding errors.
  • MSG files with a type of simply IPM will now be returned as MSGFile by openMsg, as this specifies that no format has been specified.
  • [TeamMsgExtractor #214] Attachments that error because the MSG class type wasn't recognized or isn't supported will now correctly be UnsupportedAttachment instead of BrokenAttachment.
  • Improved internal code in many functions to make them faster and more efficient.
  • openMsg will now tell you if a class type is simply unsupported rather than unrecognized. If it is found in the list, the function will raise UnsupportedMSGTypeError.
  • Added caching to MSGFile.listDir. I found that if you have larger files this single function might be taking up over half of the processing time because of how many times it is used in the module.
  • Fully implemented raw saving.
  • Extended the Contact class to have more properties.
  • Added new function MSGFile._ensureSetTyped which acts like the other ensure set functions but doesn't require you to know the type. Prefer to use other ensure set function when you know exactly what type it will be.
  • Changed Message.saveRaw to MSGFile.saveRaw.
  • Changed MSGFile.saveRaw to take a path and save the contents to a zip file.
  • Corrected the help doc to reflect the current repository (was still on mattgwwalker).
  • Fixed a bug that would cause an exception on trying to access the RTF body on a file that didn't have one. This is now correctly returning None.
  • The raw keyword of Message.save now actually works.
  • Added property Attachment.randomFilename which allows you to get the randomly generated name for attachments that don't have a usable one otherwise.
  • Added function Attachment.regenerateRandomName for creating a new random name if necessary.
  • Added function Attachment.getFilename. This function is used to get the name an attachment will be saved with given the specified arguments. Arguments are identical to Attachment.save.
  • Changed pull requests to reflect new style.
  • Added additional properties for defined MSG file fields.
  • Added zip file support for the Attachment.save and Message.save. Simply pass a path for the zip keyword argument and it will create a new ZipFile instance and save all of it's data inside there. Alternatively, you can pass an instance of a class that is either a ZipFile or ZipFile-like and it will simply use that. When this argument is defined, the customPath argument refers to the path inside the zip file.
  • Added the html and rtf keywords to Message.save. These will attempt to save the body in the html or rtf format, respectively. If the program cannot save in those formats, it will raise an exception unless the allowFallback keyword argument is True.
  • Changed utils.hasLen to use hasattr instead of the try-except method it was using.
  • Added new option recipientSeparator to MessageBase allowing you to specify a custom recipient separator (default is ";" to match Microsoft Outlook).
  • Changed the openMsg function in Attachment to not be strict. This allows you to actually open the MSG file even if we don't recognize the type of embedded MSG that is being used.
  • Attempted to normalize encoding names throughout the module so that a certain encoding will only show up using one name and not multiple.
  • Finally figured out what CRC32 algorithm is used in named properties after directly asking in a Microsoft forum (see the thread here). Fortunately the is already defined in the compressed-rtf module so we can take advantage of that.
  • Reworked MessageBase._genRecipient to improve it (because what on earth was that code it was using before?). Variables in the function are now more descriptive. Added comments in several places.
  • Many renames to better fit naming convention:
    • dev.setup_dev_logger to dev.setupDevLogger.
    • MSGFile.fix_path to MSGFile.fixPath.
    • MessageBase.save_attachments to MessageBase.saveAttachments.
    • *.Exists to exists.
    • *.ExistsTypedProperty to *.existsTypedProperty.
    • prop.create_prop to prop.createProp.
    • Properties.attachment_count to Properties.attachmentCount.
    • Properties.next_attachment_id to Properties.nextAttachmentId.
    • Properties.next_recipient_id to Properties.nextRecipientId.
    • Properties.recipient_count to Properties.recipientCount.
    • utils.get_command_args to utils.getCommandArgs.
    • utils.get_full_class_name to utils.getFullClassName.
    • utils.get_input to utils.getInput.
    • utils.has_len to utils.hasLen.
    • utils.setup_logging to utils.setupLogging.
    • constants.int_to_data_type to constants.intToDataType.
    • constants.int_to_intelligence to constants.intToIntelligence.
    • constants.int_to_recipient_type to constants.intToRecipientType.
    • Misc internal function variables.

Version 0.28.5

20 Feb 04:24
58c45ff
Compare
Choose a tag to compare
Version 0.28.5 Pre-release
Pre-release

v0.28.5

  • [TeamMsgExtractor #189] Forgot to import prepareFilename in attachment.py.
  • Fixed bad link in the changelog.

Version 0.28.4

18 Feb 11:18
7e8e3c4
Compare
Choose a tag to compare
Version 0.28.4 Pre-release
Pre-release

v0.28.4

  • [TeamMsgExtractor #184] Added code to Message to ensure subjects with null characters get stripped of them.
  • Moved code for stripping subjects of bad characters to prepareFilename in utils.

Version 0.28.3

16 Feb 10:16
472674f
Compare
Choose a tag to compare
Version 0.28.3 Pre-release
Pre-release

v0.28.3

  • Fixed minor typo in an exception description.
  • Updated the README this time. Forgot to do it for at least 1 update.

Version 0.28.2

16 Feb 10:12
0b7bb8d
Compare
Choose a tag to compare
Version 0.28.2 Pre-release
Pre-release

v0.28.2

  • Started preparing more of the code for when HTML and RTF saving are fully implemented. Please note that they do not work at all right now. Commented out the code for this because it wasn't meant to be uncommented.
  • [TeamMsgExtractor #184] Added code to ensure file names don't have null characters when saving an attachment.
  • Minor improvement to the section of the save code that checks if you have provided incompatible options.
  • [TeamMsgExtractor #185] Added the IncompatibleOptionsError. It was supposed to be added a few updates ago, but was accidentally left out.
  • Modified Message.save to return the current Message instance to allow for chained commands. This allows you to do something like extract_msg.openMsg("path/to/message.msg").save().close() where you could not before.