Does it check
argv[0]
and does a switch/case in the code?
Estude o código e descubra você mesmo. Mas tenho certeza que a resposta geral é: sim, algo assim.
Este é um truque conhecido. Tome BusyBox como um exemplo. De Wikipedia :
Typical computer programs have a separate binary (executable) file for each application. BusyBox is a single binary, which is a conglomerate of many applications, each of which can be accessed by calling the single BusyBox binary with various names (supported by having a symbolic link or hard link for each different name) in a specific manner with appropriate arguments.
Bash é outro exemplo. De man bash
:
If
bash
is invoked with the namesh
, it tries to mimic the startup behavior of historical versions ofsh
as closely as possible, while conforming to the POSIX standard as well.
Verifique o /bin/sh
no seu Debian Stretch. É um link simbólico para (provavelmente) ... dash
. Este site explica:
Up to Debian Lenny, the default
/bin/sh
shell wasbash
. Starting with Debian Squeeze, the default shell will bedash
.