Anaconda installer barfs an ELF file in stdout

$ bash Anaconda3-2022.10-Linux-x86_64.sh.1
...
Anaconda3 will now be installed into this location:
/modules/apps/anaconda/2022.10

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/modules/apps/anaconda/2022.10] >>> 
PREFIX=/modules/apps/anaconda/2022.10
WARNING: md5sum mismatch of tar archive
expected: 99d75ec01f88bdbe69e8829301036b13
     got: 3a08e72d69520a6290b48cb685bd8c28  -
Unpacking payload ...
/modules/apps/anaconda/2022.10/conda.exe: line 1: @@END_HEADER@@: command not found
/modules/apps/anaconda/2022.10/conda.exe: command substitution: line 2: syntax error near unexpected token `$'\037\020\001\001\006''
/modules/apps/anaconda/2022.10/conda.exe: command substitution: line 2: `(( � � ��H����������  P�td,q,q,q,,Q�tdR�td � � ���/lib64/ld-linux-x86-64.so.2GNU �P>89F*K."3M)#4&1(:,'G?EHNB5/O<2L$I-

I confirmed the md5sum of my anaconda installer.

I’m assuming that this conda.exe is not a windows executable but just an arbitrary file extension…

I’m also assuming that mismatch of tar archive is nothing to worry about…

The problem was that I modified the installer script. It uses dd to extract parts of the .sh file into other files, and it knows exactly what byte in the file to start from. Any modification to the installer will cause it to extract the wrong parts of the file, and make a bunch of corrupted stuff.