View Single Post
  #13  
Old November 27th 17, 02:31 AM posted to microsoft.public.windowsxp.general,alt.windows7.general
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default hiding extensions by default

J. P. Gilliver (John) wrote:
In message , Mark Lloyd
writes:


It's multiple dots. A file has one and only one extension.
"file.txt.exe" is NOT a text file. Windows knows that even if it lies
to you in a directory window or open dialog.


You know that, and I know that, but you know what I meant (-:


That would be classed as a "land mine".

There are ways to encode with "." but that's not a good example.

Here are some examples.

1) "Isolation" (you read these from right-to-left)

dangerous_virus.exe == dangerous_virus.exe.txt

That's the practice of "de-elevation", preventing
a dangerous thing from being triggered by accident
by double-clicking. Due to the logic the OS uses, it
will open in a text editor.

nifty_shellex.reg == nifty_shellex.reg.txt

While a registry file (which is a text file) shouldn't
merge into the Registry all on its own, I'm using the
text extension there, so there is absolutely no
possibility of that happening.

2) "Encoding" (you read these from left to right to understand them)

something.tar.gz.7z

This hints that some item has been processed several times.
Reading from left to right, first "Tape Archive" was used,
then "GZIP Compressor", then "7ZIP Compressor".

The Tape Archive step implies a folder, if the Tape
Archive step is being used for a valid reason. We
can guess then, that "something" just might be a folder.
So it's an encoded folder that's been through three steps
of processing.

The "file.txt.exe" example is "elevation", something you
don't generally do on purpose.

Say for example, you just wrote your own reg file and
stored it (for some strange reason) as a text file.

TakeOwn.txt

and then wanted it to be recognized as a registry file
to be merged

TakeOwn.txt.reg

Well, it would be just as sensible to remove all doubt
and make it

TakeOwn.reg

leaving no doubt as to its purpose. The "TakeOwn.txt.reg"
is attempting elevation, a bad practice, and not something
your built-in parser will appreciate later.

3) And while you can use dots for delineation, this
isn't really a good formulation. You don't want to
force people to parse this for danger.

AdobeFlash.23.0.0.171.exe

Now, that one isn't bad, since numeric fields won't
get confused as file types. Whereas this is just terrible.

Ive.been.working.on.the.railroad.xls

You can make ones like this a little clearer by
using some other punctuation scheme.

Ive_been_working_on_the_railroad.xls

Ive-been-working-on-the-railroad.xls

And when picking characters, be careful not to
select punctuation which is not "cross-platform".
Even though you think today, your file is never
leaving the PC, ten minutes from now you're
uploading it onto your Android and "someting bwoke"
because of your poor hygiene practices when
selecting punctuation characters.

*******

As for the land mine in the example

"file.txt.exe"

the system loader will attempt to look for signature
symbols of various sorts in the file, and seeing that
they don't exist, it'll throw an appropriate error
if you double-click on that. But there are other cases
where you were attempting elevation via extension,
where the outcome might not be all that you expected.

I can't think of too many cases, where I've added ".exe"
to the end of something for "fun" :-)

And leaving file extensions viewable, makes parsing
monstrosities like these, easier.

Paul
Ads