Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Is there a way to prevent the file type recognition ?


    I was wondering if this was possible to prevent a file type to be recognized by tools like the "file" command for example.

    If yes, how ?
    If not, why ?

    Thanks you !

  2. #2
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    Hmmm ... this sounds like you did not check out the man page.

  3. #3
    Well there is no translation for my native language for the "file" man page, I found it to be quite hard to read but I guess I'll have to try harder

  4. $spacer_open
  5. #4
    Well as I understand, it perform a series of test,
    first if this is a "special file" such as system specifics, pipe, link, socket etc.
    then it perform tests with the help of a "magic file" that seems to contains a lot of information to recognize the file type
    and lastly if none of these worked, the file is considered as "data".

    "file" give me this result for a file encrypted with openssl called hey.txt :
    hey.txt: openssl enc'd data with salted password, base64 encoded

    I guess that knowing exactly how "file" use it's magic file to find the file type and editing the exact string used for recognition inside of hey.txt , but that will potentially corrupt the ability to decrypt the file wich would be pointless .. Maybe using an other encryption method will prevent knowing which encryption method was used ?
    But what if I wanted to prevent a .jpeg to be recognized, isn't there a kind of "header" that says "this is a jpeg file", and simply deleting it would result to be recognized as .jpeg file ?

    I'm sorry I'm not a computer scientist, I'm just 16 years old and learning

  6. #5
    Linux Guru Segfault's Avatar
    Join Date
    Jun 2008
    OK, so the idea is to prevent potential hacker from recognizing the encryption type used? Forget it, there are multiple ways to determine what kind of encryption was in use. The strength of encryption is not in hiding the algorithm.

  7. #6
    That's absolutly not the idea, I'm just walking around and trying stuff, I'm just wondering if it's possible to prevent a file type to be recognized, I know that's not really useful in any way .. But I'm just being curious here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts