Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Simulations are like miniskirts, they show a lot and hide the essentials. -- Hubert Kirrman


devel / comp.unix.shell / Re: Check the hashbang (magic number) in a executable file.

SubjectAuthor
* Check the hashbang (magic number) in a executable file.hongy...@gmail.com
+- Re: Check the hashbang (magic number) in a executable file.Eli the Bearded
+* Re: Check the hashbang (magic number) in a executable file.Keith Thompson
|`* Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| +* Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| |+* Re: Check the hashbang (magic number) in a executable file.Ben Bacarisse
| ||`* Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| || `* Re: Check the hashbang (magic number) in a executable file.Ben Bacarisse
| ||  `* Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| ||   `* Re: Check the hashbang (magic number) in a executable file.Ben Bacarisse
| ||    `* Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| ||     +- Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| ||     `* Re: Check the hashbang (magic number) in a executable file.David W. Hodgins
| ||      `- Re: Check the hashbang (magic number) in a executable file.Janis Papanagnou
| |`* Re: Check the hashbang (magic number) in a executable file.hongy...@gmail.com
| | `- Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
| `* Re: Check the hashbang (magic number) in a executable file.hongy...@gmail.com
|  `* Re: Check the hashbang (magic number) in a executable file.Lew Pitcher
|   +* Re: Check the hashbang (magic number) in a executable file.Chris Elvidge
|   |+- Re: Check the hashbang (magic number) in a executable file.David W. Hodgins
|   |`- Re: Check the hashbang (magic number) in a executable file.hongy...@gmail.com
|   +* Re: Check the hashbang (magic number) in a executable file.Spiros Bousbouras
|   |`- Re: Check the hashbang (magic number) in a executable file.Kenny McCormack
|   `- Re: Check the hashbang (magic number) in a executable file.hongy...@gmail.com
`* Re: Check the hashbang (magic number) in a executable file.David W. Hodgins
 `- Re: Check the hashbang (magic number) in a executable file.hongy...@gmail.com

Pages:12
Re: Check the hashbang (magic number) in a executable file.

<c0cacbaa-5793-4000-99a7-7d027355e68bn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4399&group=comp.unix.shell#4399

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ad4:45e7:: with SMTP id q7mr23664227qvu.23.1632127293486;
Mon, 20 Sep 2021 01:41:33 -0700 (PDT)
X-Received: by 2002:ac8:7d0c:: with SMTP id g12mr555187qtb.214.1632127293340;
Mon, 20 Sep 2021 01:41:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Mon, 20 Sep 2021 01:41:33 -0700 (PDT)
In-Reply-To: <si7nj1$tri$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=13.209.82.85; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 13.209.82.85
References: <6607ce2c-8820-4b22-9181-35cb829aa3e7n@googlegroups.com>
<87y27ud5xa.fsf@nosuchdomain.example.com> <si511d$72b$1@dont-email.me>
<a9739838-cfe8-4bad-ba77-9e0737f054c0n@googlegroups.com> <si7i85$csu$1@dont-email.me>
<si7nj1$tri$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c0cacbaa-5793-4000-99a7-7d027355e68bn@googlegroups.com>
Subject: Re: Check the hashbang (magic number) in a executable file.
From: hongyi.z...@gmail.com (hongy...@gmail.com)
Injection-Date: Mon, 20 Sep 2021 08:41:33 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 52
 by: hongy...@gmail.com - Mon, 20 Sep 2021 08:41 UTC

On Monday, September 20, 2021 at 12:13:27 AM UTC+8, Chris Elvidge wrote:
> On 19/09/2021 03:42 pm, Lew Pitcher wrote:
> > On Sat, 18 Sep 2021 17:00:56 -0700, hongy...@gmail.com wrote:
> >
> >> On Saturday, September 18, 2021 at 11:36:19 PM UTC+8, Lew Pitcher wrote:
> > [snip]
> >>> Hongy also seems to be assuming that a "non-script executable file" only
> >>> consists of an ELF executable. Under Linux, this is not true, as almost
> >>> /any/ file can be executed using the binfmt_misc facility. This facility
> >>> allows the sysop to define new "magic numbers" for "non-script executable"
> >>> files (such as a+x WAV files, or a+x pdf files) and the interpreter that
> >>> the kernel will automagically invoke to execute that sort of file.
> >>>
> >>> See /usr/src/linux/Documentation/binfmt_misc.txt for details,
> >>
> >> $ ls /usr/src/linux/Documentation/binfmt_misc.txt
> >> ls: cannot access '/usr/src/linux/Documentation/binfmt_misc.txt': No such file or directory
> >
> > Did you install the appropriate kernel source code?
> >
> > /usr/src/linux usually symlinks to the Linux kernel source code (which is
> > named with the full kernel version, something like /usr/src/linux-4.4.276)
> > and the Documentation subdirectory of that source code directory contains
> > the binfmt_misc.txt file.
> I found :
> /usr/src/linux-5.13.13/Documentation/admin-guide/binfmt-misc.rst

This file comes from linux-doc package:

$ apt-file search binfmt-misc.rst
linux-doc: /usr/share/doc/linux-doc/admin-guide/binfmt-misc.rst.gz
linux-doc: /usr/share/doc/linux-doc/html/_sources/admin-guide/binfmt-misc.rst.txt

> >
> > If you don't want to install the kernel source code, you might look at
> > https://lwn.net/Articles/679310/
> > which contains a version of the binfmt_misc.txt file
> >
> >>
> >>> or
> >>> https://linuxgazette.net/118/lg_tips.html#tips.2 for my short summary.
> >>
> >> Thank you for your wonderful and elaborate tips.
> >
> > You're welcome
> >
>
>
> --
> Chris Elvidge
> England

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor