Safety of opening .txt files [closed]
-
09-07-2021 - |
Question
If I'm given a URL that points to a .txt
file, is it always safe to open it? Can it possibly contain virus or malicious content?
Solution
A genuine txt-file can contain virus code but it cannot be executed, so it's totally safe. However, a file can use double file extension like this, so watch out:
a-virus-file.txt.exe
Windows hides by default .exe because it's a known file type.
OTHER TIPS
It is not safe to rely solely on a file extension. The real file type can easily be masked by someone changing the extension, so the file could easily be a virus or malicious content.
For example:
MyVirus.exe -> SeeminglyHarmlessFile.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow