Originally posted by tuxd3v
View Post
2. Point me to the magic number that says an ASCII file is a shell script https://en.wikipedia.org/wiki/List_of_file_signatures
(no you can't, as there isn't any) the ELF header for any plain text file is exactly the same, it does not tell the difference between shell, python, perl, ruby, javascript, C, C#, Java or whatever the fuck else so you can't use the magic number to decide what is the best parser for your script.
3. parsing an extension is faster than parsing the text to detect what kind of code is that.
Comment