inject-macro | Inject VBA macro code into Excel documents | Reflection library

 by   coldfusion39 PowerShell Version: Current License: MIT

kandi X-RAY | inject-macro Summary

kandi X-RAY | inject-macro Summary

inject-macro is a PowerShell library typically used in Programming Style, Reflection applications. inject-macro has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Inject-Macro allows for the injection of VBA macros into Microsoft Excel and Word documents; specifically targeting the 97-2003 '.xls' and '.doc' file format due to their ability to contain VBA macros without having a '.xlsm' or '.docm' file extension. Inject-Macro requires an Excel or Word file, specified with '-Doc', and a plain text VBA macro file, specified with '-Macro'. The macro will be injected into the document and file metadata such as the last author will be removed. This is intended to be a quick way to prepare a templated Excel or Word document with a macro payload. If the '-Infect' flag is given, the supplied VBA macro will be injected into all Excel or Word documents found in the user specified '-Doc' directory path. Inject-Macro will read the first line of the user supplied macro and look for 'Auto_Open' or 'AutoOpen'. Excel uses 'Sub Auto_Open()' to automatically run macro code when the documet is opened; Word uses 'Sub AutoOpen()'. This will determine if the macro will be injected into Excel or Word documents. The VBA 'Security' registry keys are disabled and not re-enabled on exit when using the '-Infect' flag. This removes that pesky 'Macros have been disabled.' warning, and executes the macro without prompting the user. Additionally, the 'LastAccessTime', 'LastWriteTime' and 'Author' file properties of the document are initially copied and replaced after injection to make the file appear untouched. Ideally this would be used to establish a low level form of persistence. For clean-up, the location of all injected documents are written to '$env:temp\inject.log' when running Inject-Macro with the '-Infect' flag. If the '-Clean' flag is given, the VBA macro code will be removed from the documents and the registry keys will be re-enabled.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              inject-macro has a low active ecosystem.
              It has 21 star(s) with 17 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              inject-macro has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of inject-macro is current.

            kandi-Quality Quality

              inject-macro has 0 bugs and 0 code smells.

            kandi-Security Security

              inject-macro has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              inject-macro code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              inject-macro is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              inject-macro releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of inject-macro
            Get all kandi verified functions for this library.

            inject-macro Key Features

            No Key Features are available at this moment for inject-macro.

            inject-macro Examples and Code Snippets

            No Code Snippets are available at this moment for inject-macro.

            Community Discussions

            QUESTION

            add macro to excel using python xlswriter with data in original excel
            Asked 2018-Jun-15 at 09:42

            I'm using the following code to add a Macro to Excel. I notice that the data / other WorkSheets from the original Excel had dropped completely but the Macro is showing.

            This is the code that I am using:

            ...

            ANSWER

            Answered 2018-May-04 at 19:02

            Unfortunately, xlsxwriter can't load information from already existing Excel workbooks; it is only used for making new ones. You are overwriting your old workbook with a blank one that has your macros.

            If you need to load information, look into openpyxl. It can be used for creating .xlsm files.

            Source https://stackoverflow.com/questions/50138068

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install inject-macro

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/coldfusion39/inject-macro.git

          • CLI

            gh repo clone coldfusion39/inject-macro

          • sshUrl

            git@github.com:coldfusion39/inject-macro.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Reflection Libraries

            object-reflector

            by sebastianbergmann

            cglib

            by cglib

            reflection

            by doctrine

            avo

            by mmcloughlin

            rttr

            by rttrorg

            Try Top Libraries by coldfusion39

            domi-owned

            by coldfusion39Python

            geOSINT

            by coldfusion39Python

            VertXploit

            by coldfusion39Python

            excel-press

            by coldfusion39Python

            FacebookEnum

            by coldfusion39Python