Skip to content

Simple virus written in bash, the virus searches for other bash scripts and the copy itself into these scripts.

Notifications You must be signed in to change notification settings

a7medayman6/Self-Replicating-Virus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SELF-REPLICATING VIRUS

Simple virus written in bash, the virus searches for other bash scripts and the copy itself into these scripts.

Input

  • The script takes no input

Output

  • infects the virus code into all the bash scripts under the . directory

How

  • the script lists all the directories and files in the current directory
  • loop through each one of them
    • if the ith is a directory it recursively calls the infect function again with this directory as the root
    • if the ith is a file
      • checks if the file is a bash script
        • inject the code into the other bash script

Notes

  • the code doesn't do anything malicious, it just infects itself into other bash scripts.
  • but by adding a malicious code inside it it will infect all the bash scripts with the same malicious code
  • you can test the script in an empty directory by placing some unimportant scripts in side it.

About

Simple virus written in bash, the virus searches for other bash scripts and the copy itself into these scripts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages