Community
    • Login

    My Notepad++ binhex plugin

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    binhex
    19 Posts 7 Posters 14.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chcgC
      chcg
      last edited by chcg

      @Costin-Manda See https://github.com/skycc86/npp_binhex_plugin/issues/3. Maybe you want to contribute there.

      1 Reply Last reply Reply Quote 1
      • guy038G
        guy038
        last edited by guy038

        Hello, @skycc-lim, @costin-manda, and All

        I tested your plugin features and everything works as expected ! Great :-))

        Notes :

        • When you speak of HEX shift and HEX rotate, I think that you should write, strictly, BIN shift and BIN rotate !

        • To avoid shortcut conflicts, mentioned by @costin-manda, I personally use the < and > symbols, instead. Note, that, on my French keyboard, these two symbols are obtained with the same key, as shown here :

        http://ascii-table.com/keyboard.php/189

        For people, having a key for the < symbol and an other key for the > symbol, on their keyboard, as the US one, for instance, shortcuts would be more simple to create !

        • On the other hand, to avoid the shortcut conflict with the native Select All Between Matching Braces option of N++, I changed the B with the N letter ( from word biN ) and I also changed the hex2bin shortcut, accordingly !

        So, may be, @skycc-lim, it would judicious to, globally, change the BinHex menu, as below :

                           BEFORE                                                      AFTER
                          ¯¯¯¯¯¯                                                      ¯¯¯¯¯
        				 
        --------------------------------------------                --------------------------------------------
          bin2hex          Ctrl + Shift + H                           bin2Hex          Ctrl + Shift + H
          hex2bin          Ctrl + Shift + B                           hex2biN          Ctrl + Shift + N
          bin_invert       Ctrl + Alt + B                             Hex_invert       Ctrl + Alt + H      <-- Swapped
          hex_invert       Ctrl + Alt + H                             biN_invert       Ctrl + Alt + N      <-- Swapped
          reverse          Ctrl + R                                   Reverse          Ctrl + R
        --------------------------------------------                --------------------------------------------
          hex_shift >>     Ctrl + Shift + Right                       bin_shift >>     Ctrl + Shift + <>
          hex_shift <<     Ctrl + Shift + Left                        bin_shift <<     Ctrl + <>
          hex_rotate >>    Ctrl + Alt + Right                         bin_rotate >>    Ctrl + Alt + Shift + <>
          hex_rotate <<    Ctrl + Alt + Left                          bin_rotate <<    Ctrl + Alt + <>
        --------------------------------------------                --------------------------------------------
          grouping_2       Ctrl + Alt + 2                             grouping_2       Ctrl + Alt + 2
          grouping_4       Ctrl + Alt + 4                             grouping_4       Ctrl + Alt + 4
          grouping_8       Ctrl + Alt + 8                             grouping_8       Ctrl + Alt + 8
          grouping_16      Ctrl + Alt + 6                             grouping_16      Ctrl + Alt + 6
          ungroup          Ctrl+  Alt + 1                             ungroup          Ctrl+  Alt + 1  
        --------------------------------------------                --------------------------------------------
          incremental search                                          incremental search
          move to other view                                          move to other view
        --------------------------------------------                --------------------------------------------
          help                                                        help
        --------------------------------------------                --------------------------------------------
        

        Just a suggestion, of course ;-))


        Now, for people, not acquainted to bits manipulation, here are, below, some explanations, on the different commands of the BinHex plugin :

        In this summary, I use, in all the examples, the hexadecimal number f2a58b0437fc5e8223a6bd401cff90a7 ( two Q-words )

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          ORIGINAL Number N ( 2 Q-words )  =  f2a58b0437fc5e8223a6bd401cff90a7
        
        
          Hex2Bin  ( Replace each HEX symbol with its 4-Bits BINARY equivalent )  =>  11110010101001011000101100000100001101111111110001011110100000100010001110100110101111010100000000011100111111111001000010100111
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          ORIGINAL Number N ( 128 bits )  =  11110010101001011000101100000100001101111111110001011110100000100010001110100110101111010100000000011100111111111001000010100111
        
        
          Bin2Hex  ( Replace each group of 4 BIN symbols with its HEX equivalent )  =>  f2a58b0437fc5e8223a6bd401cff90a7
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          ORIGINAL Number N ( 2 Q-words )  =  f2a58b0437fc5e8223a6bd401cff90a7
        
          As :
        
          Bin-Invert of 0 (0000)  =  F  (1111)    Bin-Invert of 4 (0100)  =  B  (1011)    Bin-Invert of 8 (1000)  =  7  (0111)    Bin-Invert of C (1100)  =  3  (0011)
          Bin-Invert of 1 (0001)  =  E  (1110)    Bin-Invert of 5 (0101)  =  A  (1010)    Bin-Invert of 9 (1001)  =  6  (0110)    Bin-Invert of D (1101)  =  2  (0010)
          Bin-Invert of 2 (0010)  =  D  (1101)    Bin-Invert of 6 (0110)  =  9  (1001)    Bin-Invert of A (1010)  =  5  (0101)    Bin-Invert of E (1110)  =  1  (0001)
          Bin-Invert of 3 (0011)  =  C  (1100)    Bin-Invert of 7 (0111)  =  8  (1000)    Bin-Invert of B (1011)  =  4  (0100)    Bin-Invert of F (1111)  =  0  (0000)
        
        
          Hex_Invert  =>  0d5a74fbc803a17ddc5942bfe3006f58  —  Strictly,  Bin2Hex (Bin_Invert (Hex2Bin (N)))
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          ORIGINAL Number N ( 2 Q-words )  =  f2a58b0437fc5e8223a6bd401cff90a7
        
        
          Reverse  ( RIGHT to LEFT reading of the HEX string )  =>  7a09ffc104db6a3228e5cf7340b85a2f
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          Hex2Bin + Grouping_4  =>  1111_0010_1010_0101_1000_1011_0000_0100_0011_0111_1111_1100_0101_1110_1000_0010_0010_0011_1010_0110_1011_1101_0100_0000_0001_1100_1111_1111_1001_0000_1010_0111
        
          As MSB = Most Significant Bit  and  LSB = Least Significant Bit :
        
        
          Bin-Shift >>  ( Add 0 as MSB — Shift OUT the LSB )  =>  7952c5821bfe2f4111d35ea00e7fc853
        
          =  0111_1001_0101_0010_1100_0101_1000_0010_0001_1011_1111_1110_0010_1111_0100_0001_0001_0001_1101_0011_0101_1110_1010_0000_0000_1110_0111_1111_1100_1000_0101_0011
        
        
          Bin-Shift <<  ( Shift OUT the MSB — Add 0 as LSB )  =>  e54b16086ff8bd04474d7a8039ff214e
        
          =  1110_0101_0100_1011_0001_0110_0000_1000_0110_1111_1111_1000_1011_1101_0000_0100_0100_0111_0100_1101_0111_1010_1000_0000_0011_1001_1111_1111_0010_0001_0100_1110
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          Hex2Bin + Grouping_4  =>  1111_0010_1010_0101_1000_1011_0000_0100_0011_0111_1111_1100_0101_1110_1000_0010_0010_0011_1010_0110_1011_1101_0100_0000_0001_1100_1111_1111_1001_0000_1010_0111
        
          As MSB = Most Significant Bit  and  LSB = Least Significant Bit :
        
        
          Bin-Rotate >>  ( Move the LSB as the MSB )  =>  f952c5821bfe2f4111d35ea00e7fc853
        
          =  1111_1001_0101_0010_1100_0101_1000_0010_0001_1011_1111_1110_0010_1111_0100_0001_0001_0001_1101_0011_0101_1110_1010_0000_0000_1110_0111_1111_1100_1000_0101_0011
        
          Bin-Rotate <<  ( Move the MSB as the LSB )  =>  e54b16086ff8bd04474d7a8039ff214f
        
          =  1110_0101_0100_1011_0001_0110_0000_1000_0110_1111_1111_1000_1011_1101_0000_0100_0100_0111_0100_1101_0111_1010_1000_0000_0011_1001_1111_1111_0010_0001_0100_1111
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
          ORIGINAL Number N ( 2 Q-words )  =  f2a58b0437fc5e8223a6bd401cff90a7
        
          Grouping_2   =>  f2_a5_8b_04_37_fc_5e_82_23_a6_bd_40_1c_ff_90_a7  :   16 Bytes   of  8 bits  ( 128 bits )
                                                                             
          Grouping_4   =>  f2a5_8b04_37fc_5e82_23a6_bd40_1cff_90a7          :    8 Words   of 16 bits  ( 128 bits )
                                                                             
          Grouping_8   =>  f2a58b04_37fc5e82_23a6bd40_1cff90a7              :    4 D-Words of 32 bits  ( 128 bits )
                                                                                
          Grouping_16  =>  f2a58b0437fc5e82_23a6bd401cff90a7                :    2 Q-Words of 64 bits  ( 128 bits )
        
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 0
        • Skycc LimS
          Skycc Lim
          last edited by

          Hi @guy038
          Thanks for your suggestions, i will look into it when i have some time.
          I am quite busy recently

          For the shortcut key mapping,
          User can change this anytime to their preference. The shortcut key can be change as below
          goto Settings -> Shortcut Mapper
          then click on Plugin commands tab on top, then you will see list of plugin and its correspond function and shortcut key
          look for binhex.dll, just click on the shortcut key you wish to change then save it

          Scott SumnerS 1 Reply Last reply Reply Quote 0
          • Scott SumnerS
            Scott Sumner @Skycc Lim
            last edited by

            @Skycc-Lim

            I think the shortcuts problem people keep talking about is that you’ve taken over very common key-combinations in your plugin. Sure, people can remap them, but really, why not supply the plugin without these?

            I dislike it when a plugin I’m simply trying out takes over my keycombos assigned to other things. Grr…

            IMO plugins should not set default shortcut keycombos at all. Sure, provide mappable commands, but let the end-user map them as desired.

            1 Reply Last reply Reply Quote 1
            • Skycc LimS
              Skycc Lim
              last edited by

              hi @Scott Summer

              this sounds like a good idea, i have just made an release v2.0.0.1
              this removing the default shortcut that clash with npp default shortcut

              1 Reply Last reply Reply Quote 3
              • chcgC
                chcg
                last edited by

                updated pluginmanager with v2.0.0.1

                1 Reply Last reply Reply Quote 2
                • Skycc LimS
                  Skycc Lim
                  last edited by

                  hi @chcg ,
                  after i try to update my binhex plugin from v2.0.0.0 to v2.0.0.1, the update run successfully, however, under the updates tab from the plugin manager, its still showing current install version as 2.0 and require update. can you help to take a look ?

                  binhex plugin is not showing up at the available and installed tab from plugin manager too.

                  1 Reply Last reply Reply Quote 0
                  • Skycc LimS
                    Skycc Lim
                    last edited by

                    Hi @chcg
                    please ignore my previous post, i have found the issue, i forgot to change the versioning in the dll, i have fix it and made a new release to overwrite previous release, its still same version v2.0.0.1.

                    however plugin manager show it fail to validate the integrity of binhex.dll, i guess might need to update on the new binhex.dll checksum or some integrity check ? can you help ?

                    1 Reply Last reply Reply Quote 0
                    • chcgC
                      chcg
                      last edited by

                      Done. Updated the md5 sums.

                      1 Reply Last reply Reply Quote 1
                      • donhoD
                        donho @Skycc Lim
                        last edited by

                        FWIW, just FYI:
                        The Mistpen malware is a modification of a legitimate plugin for the Notepad++ open-source text and source code editor.
                        Ref: https://cybersecuritynews.com/hackers-targeting-job-seekers/

                        Another link: https://therecord.media/north-korea-hackers-energy-aerospace

                        It seems the malware in question reuses only the ability of binhex, but not uses Notepad++ as loader.

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors