示例#1
0
文件: whoyou.py 项目: aslanon/whoyou
from encrypt import Encrypt

locale.setlocale(locale.LC_ALL, "tr_TR.UTF-8")
TIME = time.strftime("%X")
DATE = time.strftime("%d.%m.%Y")
DATETIME = DATE, TIME  

MINUTE = int("30")
AMOUNT = int("2")
fileDirectory = "/tmp/whoyou"
VIDEO_X = "video0"


encryp = Encrypt()
key = open("%s/wykey" % fileDirectory).read()
openPass = encryp.xor(key, False)
MAIL_PASSWORD = encryp.decrypt(openPass)
MAIL = open("%s/usernames" % fileDirectory).readlines()[0]
tweet_user = open("%s/usernames" % fileDirectory).readlines()[1]
SUBJECT = "-*-whoyou-*-"

VALUEURL = "http://twitter.com/%s" % tweet_user # command: PC:Close and PC:Open


TEXT = """
Merhaba %s,\n%s tarhinde sisteminize giriş yapıldı. 
Bilgisayarınız ile ilgili işlem yapmak için verdiğiniz adrese (%s) bir değer giriniz. Aksi halde bilgisayarınız açık kalacaktır.
İlgili görsellere "%s" dizininden bakabilirsiniz.""" % (MAIL.split("@")[0], DATETIME, VALUEURL, fileDirectory)
  

if os.path.isdir(fileDirectory) == True:
示例#2
0
  print "Work Dir: %s" % fileDirectory
desktopFile = glob.glob1(path, "*.desktop")
for dpFile in desktopFile:
  print "copying %s  --> /etc/xdg/autostart" % dpFile
  os.system("cp %s /etc/xdg/autostart" % dpFile)

pyFile = glob.glob1(path, "*.py")
for pyFile in pyFile:
  print "copying %s --> /usr/bin" % pyFile
  os.system("cp %s /usr/bin" % pyFile)

mail = raw_input("Your Mail: ")

encryp = Encrypt()
password = raw_input("Your Mail Password: "******"\nTwitter status is read and command is sent to the computer\nTwitter Commands: PC:Close and PC:Open"
twitter_name = raw_input("Twitter Name: ")
twitter_file = open("%s/usernames" % fileDirectory, "w")
twitter_file.write("%s\n%s" % (mail, twitter_name))
twitter_file.close()

file = open("%s/wykey" % fileDirectory, "w")
file.write(pwd)
file.close()

user = os.listdir("/home/")
if user[0] != "samba":
  os.system("chown -R %s:users %s" % (user[0], fileDirectory))