Strings in executables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Goldenpi

    Strings in executables

    Newbie here. Just got three questions.

    1. Im working on a program where every byte counts. But a hex editor says
    the EXE files strings are in what looks like unicode. How do I fix this?

    2. Anyone tried messing with a VB output executable with a hex editor after
    compilation to reduce space a bit? I was thinking my print lines have a lot
    of CHR$(13) in them, if I were to replace that in the code with an easily
    recognised character (éé) and then go through the file in hex replacing that
    character in strings with the hex 0d0a, or whatever works, I can get a few
    fewer bytes. Ive got to work on it with the editor anyway, its got a
    self-check function which requires setting a few bytes in the file to its
    compiled checksum.


  • Dillon Mantle

    #2
    Re: Strings in executables

    There was a tool I used, I think it was UPX. Can't remember, just serach for
    it. It compresses/decompresses exe files

    --
    Regards
    Dillon Mantle
    "Goldenpi" <Goldenpi@softh ome.net> wrote in message
    news:kCVMb.1462 0$_y5.161666288 @news-text.cableinet. net...[color=blue]
    > Newbie here. Just got three questions.
    >
    > 1. Im working on a program where every byte counts. But a hex editor says
    > the EXE files strings are in what looks like unicode. How do I fix this?
    >
    > 2. Anyone tried messing with a VB output executable with a hex editor[/color]
    after[color=blue]
    > compilation to reduce space a bit? I was thinking my print lines have a[/color]
    lot[color=blue]
    > of CHR$(13) in them, if I were to replace that in the code with an easily
    > recognised character (éé) and then go through the file in hex replacing[/color]
    that[color=blue]
    > character in strings with the hex 0d0a, or whatever works, I can get a few
    > fewer bytes. Ive got to work on it with the editor anyway, its got a
    > self-check function which requires setting a few bytes in the file to its
    > compiled checksum.
    >
    >[/color]


    Comment

    • Goldenpi

      #3
      Re: Strings in executables

      That would mess up my viral detection. Anyway, the files so small a
      compression program will add more than the size saved in overhead code. I
      have done a little for compression through: Everything will be inspected
      using a hex editor to make it as much a null-filled file as possible. Even
      the icons mostly black. Current size 15.5k uncompressed, 5.9k in a zip file.

      Is there a way to stop VB putting in those metatags. Company, version,
      original filename, etc?



      "Dillon Mantle" <dillonm@dasolu tions.co.za> wrote in message
      news:rIOdnUfTJ_ GhtZndRVn-uQ@is.co.za...[color=blue]
      > There was a tool I used, I think it was UPX. Can't remember, just serach[/color]
      for[color=blue]
      > it. It compresses/decompresses exe files
      >
      > --
      > Regards
      > Dillon Mantle
      > "Goldenpi" <Goldenpi@softh ome.net> wrote in message
      > news:kCVMb.1462 0$_y5.161666288 @news-text.cableinet. net...[color=green]
      > > Newbie here. Just got three questions.
      > >
      > > 1. Im working on a program where every byte counts. But a hex editor[/color][/color]
      says[color=blue][color=green]
      > > the EXE files strings are in what looks like unicode. How do I fix this?
      > >
      > > 2. Anyone tried messing with a VB output executable with a hex editor[/color]
      > after[color=green]
      > > compilation to reduce space a bit? I was thinking my print lines have a[/color]
      > lot[color=green]
      > > of CHR$(13) in them, if I were to replace that in the code with an[/color][/color]
      easily[color=blue][color=green]
      > > recognised character (éé) and then go through the file in hex replacing[/color]
      > that[color=green]
      > > character in strings with the hex 0d0a, or whatever works, I can get a[/color][/color]
      few[color=blue][color=green]
      > > fewer bytes. Ive got to work on it with the editor anyway, its got a
      > > self-check function which requires setting a few bytes in the file to[/color][/color]
      its[color=blue][color=green]
      > > compiled checksum.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • xyz

        #4
        Re: Strings in executables

        It seems to me that if the size of the code is so important, you are
        wasting your time with Visual Basic. Code in C. I am sure that a the
        same functionality will take 1/10th of the space.

        Besides, by the time you are done manually changing bytes with hex
        editors, you will have code that nobody will be able to maintain.

        xyz

        Comment

        • xyz

          #5
          Re: Strings in executables

          Why don't you store the print messages as an ASCII file. Read it in at
          initialization. Your program will only need to know the line number
          to print out for each message.

          xyz

          Comment

          • Goldenpi

            #6
            Re: Strings in executables


            "xyz" <xyz@mailinator .com> wrote in message
            news:3p7h00tofa a1leuqdaur522g4 lmg7a1dal@4ax.c om...[color=blue]
            > It seems to me that if the size of the code is so important, you are
            > wasting your time with Visual Basic. Code in C. I am sure that a the
            > same functionality will take 1/10th of the space.[/color]

            Yes. Shame I dont know enough C, but ive only worked with GCC command line,
            and im not much good with that.
            [color=blue]
            >
            > Besides, by the time you are done manually changing bytes with hex
            > editors, you will have code that nobody will be able to maintain.[/color]

            As opposed to my ordinary code, which perhaps 1% of programers could read. I
            use magic number systems a lot, and my variable naming system is unusual.
            Its not unusual to see something like "xnegypospicbox a" as an object name.
            Anyway, noones going to be maintaining this code except me.


            Comment

            Working...