Hello everybody.
I have a veeery weird and interesting problem.

I downloaded a little piece of code, in *.txt form. It it said to be a polyglot, that is, exactly the same code would compile and work in more programming languages.
In this case, the languages are : COBOL, Pascal, Fortran, C, Postscript, sh, 8086 asm.
I downloaded it and renamed the text as "polyglot.com". Then i opened it.
A DOS window did pop up, no text on it, just some "_" were poping in the window randomly and thats it. BUT, in the exact same moment i opened "polyglot.com", my printer started to roll the paper without stopping.
I have a very old matriceal printer, Epson LX-300+. It uses rolls of paper, not A4 papers. After i opened the program, the paper started to roll, like it was printing, but nothing was written on the paper. It was just moving the paper, over and over.

I stopped the program imediately with Task Manager and deleted it from the desktop.
I stopped the printer, but when i opened it again, it was still rolling the paper without printing anything.

I restarted the computer, with the printer closed, everything was fine, but when i started the printer, damn, it was rolling the paper again.
I restarted in safe mode. The printer was fine...

This is the link to the nasty program. : http://www.nyx.net/~gthompso/poly/polyglot.htm
Search for "polyglot.txt", authors: Kevin Bungard, Peter Lisle and Chris Tham.

The text file seems to be innocent, it is not a virus or spyware. I have Avira Free installed on my system and updated everyday and i also scanned the file, (renamed as .com) with Nod32.
In source code form, it is even more innocent. A lot of commented lines and 2-3 lines of code.

I don't understand how this program acts as a COM application, that's the problem.
And WHY, does this program affect my printer driver, even AFTER i reboot?
I checked the startup with msconfig, but nothing new was added

Can anyone suggest a solution, or an explanation?
Please?

(My system is mb: Kobian KOB KT133a FSX, cpu: AMD Athlon, 1000 MHz, mem: 512 MB (PC133 SDRAM), vc: NVIDIA Vanta, os: Xp Professional SP2 with all the updates and security patches.)

Thank you very much.

I don't understand how this program acts as a COM application, that's the problem.

Well, you tried to run it as a .COM but you did not compile it first.
Any file with the extension .com is a candidate to be run as a program under windows.
Windows will try to run it, but obviously fail, because it is just a text file instead of a compiled program.

So, to try it out properly, rename the file to e.g. polyglot.c, and try to produce an executable program using a C compiler/linker.

If the printer behaviour really happened because of you 'running' polyglot.com, it is quite amusing actually - LOL.

The guilty file has a lot of comments in it, and one of the first lines sais:
" Usage: 1. Rename this file to polyglot.[cob|pas|f77|c|ps|sh|com] "
so it probably doesn't need compilation.

I checked the program with notepad++ as C file, Pascal and Cobol.

And, i am pretty sure that this program drove my printer crazy. I only had an instance of Firefox, and this program.
And it's not funny... i am almost desperate... :S

Please take a closer look at the file, you have found the first usage step i.e.

Usage: 1. Rename this file to ...

but there is more to it, i.e. the step 2 says:

2. Compile and/or run with appropriate compiler and operating system

Under Windows, the instruction to compile and run it (as an executable application) is a must. It really makes no sense at all just to rename the file to something that looks like an executable application (i.e. a .COM).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.